Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomVethName ¶
RandomVethName returns string "veth" with random prefix (hashed from entropy)
func SetupVethWithName ¶
func SetupVethWithName(contVethName, hostVethName string, mtu int, contVethMac string, hostNS ns.NetNS) (net.Interface, net.Interface, error)
SetupVethWithName sets up a pair of virtual ethernet devices. Call SetupVethWithName from inside the container netns. It will create both veth devices and move the host-side veth into the provided hostNS namespace. hostVethName: If hostVethName is not specified, the host-side veth name will use a random string. On success, SetupVethWithName returns (hostVeth, containerVeth, nil)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.