ip

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomVethName

func RandomVethName() (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL