bridge

package
v0.4.10-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach added in v0.4.9

func Attach(link netlink.Link, bridge *netlink.Bridge, name ...string) error

Attach attaches any link to a bridge, based on the link type can be directly plugged or crossed over with a veth pair if name is provided, the name will be used in case of veth pair instead of a generated name

func AttachNic

func AttachNic(link netlink.Link, bridge *netlink.Bridge) error

AttachNic attaches an interface to a bridge

func AttachNicWithMac

func AttachNicWithMac(link netlink.Link, bridge *netlink.Bridge) error

AttachNicWithMac attaches an interface to a bridge and sets the MAC of the bridge to the same of the NIC

func Delete

func Delete(name string) error

Delete remove a bridge

func DetachNic

func DetachNic(link netlink.Link) error

DetachNic detaches an interface from a bridge

func Exists

func Exists(name string) bool

Exists check if a bridge named name already exists

func Get

func Get(name string) (*netlink.Bridge, error)

Get a bridge by name

func List

func List() ([]*netlink.Bridge, error)

List list all the bridge interfaces

func New

func New(name string) (*netlink.Bridge, error)

New creates a bridge and set it up

Types

This section is empty.

Jump to

Keyboard shortcuts

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