Documentation ¶
Overview ¶
Package networkutils is a collection of iptables and netlink functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigForDebug ¶ added in v1.2.0
func GetConfigForDebug() map[string]interface{}
GetConfigForDebug returns the active values of the configuration env vars (for debugging purposes).
func GetEthernetMTU ¶ added in v1.6.1
GetEthernetMTU gets the MTU setting from AWS_VPC_ENI_MTU if set, or takes the passed in string. Defaults to 9001 if not set.
Types ¶
type NetworkAPIs ¶
type NetworkAPIs interface { // SetupNodeNetwork performs node level network configuration SetupHostNetwork(vpcCIDRs []string, primaryMAC string, primaryAddr *net.IP, enablePodENI bool, v4Enabled bool, v6Enabled bool) error // SetupENINetwork performs ENI level network configuration. Not needed on the primary ENI SetupENINetwork(eniIP string, mac string, deviceNumber int, subnetCIDR string) error // UpdateHostIptablesRules updates the nat table iptables rules on the host UpdateHostIptablesRules(vpcCIDRs []string, primaryMAC string, primaryAddr *net.IP, v4Enabled bool, v6Enabled bool) error UseExternalSNAT() bool GetExcludeSNATCIDRs() []string GetRuleList() ([]netlink.Rule, error) GetRuleListBySrc(ruleList []netlink.Rule, src net.IPNet) ([]netlink.Rule, error) UpdateRuleListBySrc(ruleList []netlink.Rule, src net.IPNet) error GetLinkByMac(mac string, retryInterval time.Duration) (netlink.Link, error) }
NetworkAPIs defines the host level and the ENI level network related operations
Click to show internal directories.
Click to hide internal directories.