Documentation ¶
Index ¶
- func CheckBridgeUp(name string) (bool, error)
- func IPExists(ip net.IP) (bool, error)
- func LinkAddAddr(linkName, ip string) error
- func LinkAddGateway(linkName, gatewayIP string) error
- func LinkRename(old, new string) error
- func LinkSetMaster(linkName, masterName string) error
- func LinkSetNSByFile(filename, linkName string) error
- func LinkSetup(linkName string) error
- func MountNetNS(nsTarget string) (filesystem.Unmounter, error)
- func SetupBridge(name, ip string) error
- func SetupVirtualEthernet(name, peer string) error
- type Unsetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBridgeUp ¶
CheckBridgeUp check whether the bridge is up
func LinkAddAddr ¶
LinkAddAddr adds an IP address to the link device
func LinkAddGateway ¶
LinkAddGateway adds route for the system set gateway for the link device
func LinkRename ¶
LinkRename sets the name of the link device
func LinkSetMaster ¶
LinkSetMaster sets the master of the link device
func LinkSetNSByFile ¶
LinkSetNSByFile puts link device into a new network namespace
func MountNetNS ¶
func MountNetNS(nsTarget string) (filesystem.Unmounter, error)
MountNetNS creates and mounts a new network namespace, then return a function to unmount
func SetupBridge ¶
SetupBridge sets up the default bridge interface. To keep things simple, assign ip 172.69.0.1 to it (yeah, I fixed it!) which is from the range of IPs which will also use for the containers
func SetupVirtualEthernet ¶
SetupVirtualEthernet creates and configures a virtual ethernet on host