bridge

package
v0.0.0-...-d79a36e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge [unix.IFNAMSIZ]byte

Bridge is an abstract representation of a 802.1d Ethernet Bridge.

func Create

func Create(name string) (b Bridge, err error)

Create requests the OS create a named bridge interface.

func (Bridge) Add

func (b Bridge) Add(n netif.NetIf) (err error)

Add attempts to add the interface to the bridge.

func (Bridge) AddInterface

func (b Bridge) AddInterface(ifname string) (err error)

AddInterface attempts to add the named interface to the bridge.

func (Bridge) Destroy

func (b Bridge) Destroy() (err error)

Destroy takes a Bridge and requests the OS remove it.

func (Bridge) NetIf

func (b Bridge) NetIf() (n netif.NetIf)

NetIf returns a NetIf for the bridge. For example:

b := bridge.Create("testbr0")
b.NetIf().Up()

func (Bridge) Remove

func (b Bridge) Remove(n netif.NetIf) (err error)

Remove attempts to remove the interface to the bridge.

func (Bridge) RemoveInterface

func (b Bridge) RemoveInterface(ifname string) (err error)

RemoveInterface attempts to remove the named interface from the bridge.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL