package
1.5.1
Repository: https://github.com/mirantis/virtlet.git
Documentation: pkg.go.dev

# Functions

ConfigureLink configures a link according to the CNI result.
CreateEscapeVethPair creates a veth pair with innerVeth residing in the specified network namespace innerNS and outerVeth residing in the 'outer' (current) namespace.
CreateTAP sets up a tap link and brings it up.
DetectCalico checks if the specified link in the current network namespace is configured by Calico.
ExtractLinkInfo extracts ip address and netmask from veth interface in the current namespace, together with routes for this interface.
FindVeth locates single veth link in the list of provided links.
FixCalicoNetworking updates netConfig to make Calico work with Virtlet's DHCP-server based scheme.
GenerateMacAddress returns a random locally administrated unicast hardware address.
OpenTAP opens a tap device and returns an os.File for it.
RandomVethName returns string "veth" with random prefix (hashed from entropy).
ReconstructVFs iterates over stored PCI addresses, rebinding each corresponding interface to its host driver, changing its MAC address and name to the values stored in csn and then moving it into the container namespace.
RecoverContainerSideNetwork tries to populate ContainerSideNetwork structure based on a network namespace that was already adjusted for Virtlet.
SetHardwareAddr sets hardware address on provided link.
SetupBridge creates a bridge and adds specified links to it.
SetupContainerSideNetwork sets up networking in container namespace.
SetupVeth sets up a pair of virtual ethernet devices.
StripLink removes addresses from the link along with any routes related to the link, except those created by the kernel.
Teardown cleans up container network configuration.
TeardownBridge removes links from bridge and sets it down.
ValidateAndFixCNIResult verifies that netConfig contains proper list of ips, routes, interfaces and if something is missing it tries to complement that using patch for Weave or for plugins which return their netConfig in v0.2.0 version of CNI SPEC.

# Constants

these constants are only available on Linux.
these constants are only available on Linux.
these constants are only available on Linux.
these constants are only available on Linux.
these constants are only available on Linux.