bridge

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(link netlink.Link, bridge *netlink.Bridge, vlan *uint16, 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 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 ListNics

func ListNics(bridge *netlink.Bridge, physical bool) ([]netlink.Link, error)

List all nics attached to a bridge

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