Documentation ¶
Index ¶
- Constants
- func Route2String(route netlink.Route) (string, error)
- func String2Route(route string) (*netlink.Route, error)
- type Bridge
- func (br *Bridge) Addr() []netlink.Addr
- func (br *Bridge) ClearAddr() error
- func (br *Bridge) Ensure() error
- func (br *Bridge) Fetch() error
- func (br *Bridge) Index() int
- func (br *Bridge) LinkAttrs() *netlink.LinkAttrs
- func (br *Bridge) Name() string
- func (br *Bridge) Routes() []netlink.Route
- func (br *Bridge) SyncIPv4Addr(slave IFace) error
- func (br *Bridge) ToLink() *Link
- func (br *Bridge) Type() string
- type IFace
- type Link
- func (l *Link) AddBridgeVlan(vid uint16) error
- func (l *Link) AddRoutes(link IFace) error
- func (l *Link) Addr() []netlink.Addr
- func (l *Link) DelBridgeVlan(vid uint16) error
- func (l *Link) DeleteIptForward() error
- func (l *Link) DeleteRoutes() error
- func (l *Link) EnsureIptForward() error
- func (l *Link) Fetch() error
- func (l *Link) Index() int
- func (l *Link) LinkAttrs() *netlink.LinkAttrs
- func (l *Link) Name() string
- func (l *Link) Routes() []netlink.Route
- func (l *Link) SetMaster(br *Bridge, vids []uint16) error
- func (l *Link) SetNoMaster() error
- func (l *Link) Type() string
Constants ¶
View Source
const ( TypeLoopback = "loopback" TypeDevice = "device" TypeBond = "bond" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) SyncIPv4Addr ¶
Keep the bridge's IPv4 addresses are the same with the slave
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func GetLinkByIndex ¶ added in v0.1.7
func GetLinkByName ¶ added in v0.1.7
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) DeleteRoutes ¶
func (*Link) EnsureIptForward ¶ added in v0.1.8
func (*Link) SetNoMaster ¶
Click to show internal directories.
Click to hide internal directories.