cniutils

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableIpForwarding added in v1.13.0

func EnableIpForwarding(procSys procsyswrapper.ProcSys, ips []*current.IPConfig) error

EnableIpForwarding sets forwarding to 1 for both IPv4 and IPv6 if applicable. This func is to have a unit testable version of ip.EnableForward in ipforward_linux.go file link: https://github.com/containernetworking/plugins/blob/main/pkg/ip/ipforward_linux.go#L34

func FindIPConfigsByIfaceIndex

func FindIPConfigsByIfaceIndex(ipConfigs []*current.IPConfig, ifaceIndex int) []*current.IPConfig

func FindInterfaceByName

func FindInterfaceByName(ifaceList []*current.Interface, ifaceName string) (ifaceIndex int, iface *current.Interface, found bool)

func GetNodeMetadata added in v1.13.0

func GetNodeMetadata(key string) (string, error)

GetNodeMetadata calling node local imds metadata service using provided key return either a non-empty value or an error

func IsIptableTargetNotExist added in v1.13.0

func IsIptableTargetNotExist(err error) bool

IsIptableTargetNotExist returns true if the error is from iptables indicating that the target does not exist.

func IsLinkNotFoundError added in v1.13.0

func IsLinkNotFoundError(err error) bool

IsLinkNotFoundError return true if err contains "Link not found"

func WaitForAddressesToBeStable added in v1.13.0

func WaitForAddressesToBeStable(netLink netlinkwrapper.NetLink, ifName string, timeout, waitInterval time.Duration) error

WaitForAddressesToBeStable Implements `SettleAddresses` functionality of the `ip` package. waitForAddressesToBeStable waits for all addresses on a link to leave tentative state. Will be particularly useful for ipv6, where all addresses need to do DAD. If any addresses are still tentative after timeout seconds, then error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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