Documentation ¶
Index ¶
- func EnableIpForwarding(procSys procsyswrapper.ProcSys, ips []*current.IPConfig) error
- func FindIPConfigsByIfaceIndex(ipConfigs []*current.IPConfig, ifaceIndex int) []*current.IPConfig
- func FindInterfaceByName(ifaceList []*current.Interface, ifaceName string) (ifaceIndex int, iface *current.Interface, found bool)
- func GetNodeMetadata(key string) (string, error)
- func IPsSimilar(ipPool []string, eniIPs []*ec2.NetworkInterfacePrivateIpAddress) bool
- func IsIptableTargetNotExist(err error) bool
- func IsLinkNotFoundError(err error) bool
- func PrefixSimilar(prefixPool []string, eniPrefixes []*ec2.Ipv4PrefixSpecification) bool
- func WaitForAddressesToBeStable(netLink netlinkwrapper.NetLink, ifName string, ...) error
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 FindInterfaceByName ¶
func GetNodeMetadata ¶ added in v1.13.0
GetNodeMetadata calling node local imds metadata service using provided key return either a non-empty value or an error
func IPsSimilar ¶ added in v1.18.4
func IPsSimilar(ipPool []string, eniIPs []*ec2.NetworkInterfacePrivateIpAddress) bool
IPsSimilar checks if ipPool and eniIPs are equivalent.
func IsIptableTargetNotExist ¶ added in v1.13.0
IsIptableTargetNotExist returns true if the error is from iptables indicating that the target does not exist.
func IsLinkNotFoundError ¶ added in v1.13.0
IsLinkNotFoundError return true if err contains "Link not found"
func PrefixSimilar ¶ added in v1.18.4
func PrefixSimilar(prefixPool []string, eniPrefixes []*ec2.Ipv4PrefixSpecification) bool
PrefixSimilar checks if prefix pool and eni prefix are equivalent.
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.