Versions in this module Expand all Collapse all v0 v0.0.3 Jul 30, 2020 Changes in this version + var MacVlanModes = map[string]bool — linux/amd64 + func AddToBridge(netIfc, netBridge *net.Interface) error — linux/amd64 + func DeleteLink(name string) error — linux/amd64 + func DockerPidByName(name string, dockerHost string) (int, error) — linux/amd64 + func FindInterfaceByMacAddress(macaddr string) (*net.Interface, error) — linux/amd64 + func MakeNetInterfaceName(base string) string — linux/amd64 + func NetInterfaceNameValid(name string) (bool, error) — linux/amd64 + func NetNsHandle(nspid int) (uintptr, error) — linux/amd64 + func RemoveFromBridge(netIfc *net.Interface) error — linux/amd64 + func RenameInterfaceByName(old string, newName string) error — linux/amd64 + func SetNetNsToPid(nspid int) error — linux/amd64 + type Bridge struct — linux/amd64 + func (br *Bridge) AddSlaveIfc(ifc *net.Interface) error + func (br *Bridge) RemoveSlaveIfc(ifc *net.Interface) error + type Bridger interface — linux/amd64 + AddSlaveIfc func(*net.Interface) error + RemoveSlaveIfc func(*net.Interface) error + func BridgeFromName(ifcName string) (Bridger, error) + func NewBridge() (Bridger, error) + func NewBridgeWithName(ifcName string) (Bridger, error) + type Link struct — linux/amd64 + func (l *Link) DeleteLink() error + func (l *Link) NetInterface() *net.Interface + func (l *Link) SetLinkDefaultGw(gw *net.IP) error + func (l *Link) SetLinkDown() error + func (l *Link) SetLinkIp(ip net.IP, network *net.IPNet) error + func (l *Link) SetLinkMTU(mtu int) error + func (l *Link) SetLinkMacAddress(macaddr string) error + func (l *Link) SetLinkNetInNs(nspid int, ip net.IP, network *net.IPNet, gw *net.IP) error + func (l *Link) SetLinkNetNsPid(nspid int) error + func (l *Link) SetLinkNsFd(nspath string) error + func (l *Link) SetLinkNsToDocker(name string, dockerHost string) error + func (l *Link) SetLinkUp() error + func (l *Link) UnsetLinkIp(ip net.IP, network *net.IPNet) error + type LinkOptions struct — linux/amd64 + Flags net.Flags + MTU int + MacAddr string + Ns int + type Linker interface — linux/amd64 + DeleteLink func() error + NetInterface func() *net.Interface + SetLinkDefaultGw func(*net.IP) error + SetLinkDown func() error + SetLinkIp func(net.IP, *net.IPNet) error + SetLinkMTU func(int) error + SetLinkMacAddress func(string) error + SetLinkNetInNs func(int, net.IP, *net.IPNet, *net.IP) error + SetLinkNetNsPid func(int) error + SetLinkUp func() error + UnsetLinkIp func(net.IP, *net.IPNet) error + func NewLink(ifcName string) (Linker, error) + func NewLinkFrom(ifcName string) (Linker, error) + func NewLinkWithOptions(ifcName string, opts LinkOptions) (Linker, error) + type MacVlanLink struct — linux/amd64 + func (macvln *MacVlanLink) MasterNetInterface() *net.Interface + func (macvln *MacVlanLink) Mode() string + func (macvln *MacVlanLink) NetInterface() *net.Interface + type MacVlanOptions struct — linux/amd64 + Dev string + MacAddr string + Mode string + type MacVlaner interface — linux/amd64 + MasterNetInterface func() *net.Interface + Mode func() string + func NewMacVlanLink(masterDev string) (MacVlaner, error) + func NewMacVlanLinkWithOptions(masterDev string, opts MacVlanOptions) (MacVlaner, error) + type MacVtapLink struct — linux/amd64 + type MacVtaper interface — linux/amd64 + func NewMacVtapLink(masterDev string) (MacVtaper, error) + func NewMacVtapLinkWithOptions(masterDev string, opts MacVlanOptions) (MacVtaper, error) + type NetworkOptions struct + Gw string + IpAddr string + Routes []netlink.Route + type VethOptions struct — linux/amd64 + PeerName string + TxQueueLen int + type VethPair struct — linux/amd64 + func (veth *VethPair) DeletePeerLink() error + func (veth *VethPair) NetInterface() *net.Interface + func (veth *VethPair) PeerNetInterface() *net.Interface + func (veth *VethPair) SetPeerLinkIp(ip net.IP, nw *net.IPNet) error + func (veth *VethPair) SetPeerLinkNetInNs(nspid int, ip net.IP, network *net.IPNet, gw *net.IP) error + func (veth *VethPair) SetPeerLinkNsFd(nspath string) error + func (veth *VethPair) SetPeerLinkNsPid(nspid int) error + func (veth *VethPair) SetPeerLinkNsToDocker(name string, dockerHost string) error + func (veth *VethPair) SetPeerLinkUp() error + type Vether interface — linux/amd64 + DeletePeerLink func() error + PeerNetInterface func() *net.Interface + SetPeerLinkIp func(net.IP, *net.IPNet) error + SetPeerLinkNetInNs func(int, net.IP, *net.IPNet, *net.IP) error + SetPeerLinkNsFd func(string) error + SetPeerLinkNsPid func(int) error + SetPeerLinkNsToDocker func(string, string) error + SetPeerLinkUp func() error + func NewVethPair() (Vether, error) + func NewVethPairWithOptions(ifcName string, opts VethOptions) (Vether, error) + type VlanLink struct — linux/amd64 + func (vln *VlanLink) Id() uint16 + func (vln *VlanLink) MasterNetInterface() *net.Interface + func (vln *VlanLink) NetInterface() *net.Interface + type VlanOptions struct — linux/amd64 + Dev string + Id uint16 + MacAddr string + type Vlaner interface — linux/amd64 + Id func() uint16 + MasterNetInterface func() *net.Interface + func NewVlanLink(masterDev string, id uint16) (Vlaner, error) + func NewVlanLinkWithOptions(masterDev string, opts VlanOptions) (Vlaner, error)