Documentation
¶
Index ¶
- Constants
- func DeleteRouteViaGateway(cidr string) error
- func DisableBridgeNF() error
- func EnsureRouteViaGateway(cidr string) error
- func GenerateName(prefix, suffix string) string
- func Route2String(route netlink.Route) (string, error)
- func String2Route(route string) (*netlink.Route, error)
- type Bond
- type Bridge
- type Link
- func (l *Link) AddBridgeVlan(vid uint16) error
- func (l *Link) DelBridgeVlan(vid uint16) error
- func (l *Link) DeleteIptForward() error
- func (l *Link) EnsureIptForward() error
- func (l *Link) Fetch() error
- func (l *Link) ListBridgeVlan() ([]uint16, error)
- func (l *Link) Remove() error
- func (l *Link) SetMaster(br *Bridge) error
- func (l *Link) SetNoMaster() error
Constants ¶
View Source
const ( TypeLoopback = "loopback" TypeDevice = "device" TypeBond = "bond" )
View Source
const BondSuffix = "-bo"
View Source
const (
BridgeSuffix = "-br"
)
View Source
const MaxDeviceNameLen = 15
Variables ¶
This section is empty.
Functions ¶
func DeleteRouteViaGateway ¶ added in v0.2.3
func DisableBridgeNF ¶ added in v0.4.2
func DisableBridgeNF() error
func EnsureRouteViaGateway ¶ added in v0.2.3
EnsureRouteViaGateway will add the route via gateway if not existing
func GenerateName ¶ added in v0.3.0
Types ¶
type Bond ¶ added in v0.3.0
func (*Bond) EnsureBond ¶ added in v0.3.0
EnsureBond cares about the bond attributes excluding the master index and the slaves
type Link ¶
func (*Link) AddBridgeVlan ¶
AddBridgeVlan adds a new vlan filter entry Equivalent to: `bridge vlan add dev DEV vid VID master`
func (*Link) DelBridgeVlan ¶
DelBridgeVlan adds a new vlan filter entry Equivalent to: `bridge vlan del dev DEV vid VID master`
func (*Link) DeleteIptForward ¶ added in v0.1.8
func (*Link) EnsureIptForward ¶ added in v0.1.8
func (*Link) ListBridgeVlan ¶ added in v0.3.0
func (*Link) SetNoMaster ¶
Click to show internal directories.
Click to hide internal directories.