Documentation
¶
Index ¶
- Constants
- func DeleteRouteViaGateway(cidr string) error
- func DisableBridgeNF() error
- func EnsureRouteViaGateway(cidr string) error
- func GetManuallyConfiguredVlans(cnName string) ([]uint16, error)
- func GetMgmtInterface() (vlanSubInterface string, err error)
- 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) AddBridgeVlanSelf(vid uint16) error
- func (l *Link) CreateVlanSubInterface(vid uint16) error
- func (l *Link) DelBridgeVlan(vid uint16) error
- func (l *Link) DelBridgeVlanSelf(vid uint16) error
- func (l *Link) DelVlanSubInterface(vid uint16) error
- func (l *Link) DeleteIptForward() error
- func (l *Link) EnsureIptForward() error
- func (l *Link) Fetch() error
- func (l *Link) GetVlanSubInterfaceAndOperState(vid uint16) (netlink.Link, bool, error)
- func (l *Link) ListBridgeVlan() ([]uint16, error)
- func (l *Link) Remove() error
- func (l *Link) SetIPAddress(cidr string, vid uint16) error
- func (l *Link) SetMaster(br *Bridge) error
- func (l *Link) SetNoMaster() error
- func (l *Link) ToVlanIDSet() (*utils.VlanIDSet, error)
Constants ¶
const ( TypeLoopback = "loopback" TypeDevice = "device" TypeBond = "bond" )
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 GetManuallyConfiguredVlans ¶ added in v1.7.0
user might configure sub vlan interface on a bridge directly, should always keep them
func GetMgmtInterface ¶ added in v1.8.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) AddBridgeVlanSelf ¶ added in v1.8.0
AddBridgeVlanSelf adds a new vlan filter entry to -br interface Equivalent to: `bridge vlan add dev DEV vid VID self`
func (*Link) CreateVlanSubInterface ¶ added in v1.8.0
CreateVlanSubInterface creates a new vlan sub-interface Equivalent to: `ip link add link <bridge-link-br> name <vlansubintf-name> type vlan id <vlan-id>.` `ip link set dev <vlansubintf-name> up`
func (*Link) DelBridgeVlan ¶
DelBridgeVlan dels the vlan filter entry Equivalent to: `bridge vlan del dev DEV vid VID master`
func (*Link) DelBridgeVlanSelf ¶ added in v1.8.0
DelBridgeVlan deletes a vlan filter entry from -br interface Equivalent to: `bridge vlan del dev DEV vid VID self`
func (*Link) DelVlanSubInterface ¶ added in v1.8.0
DelVlanSubInterface deletes a vlan sub-interface Equivalent to: `ip link del dev <vlansubintf-name>`