Documentation ¶
Index ¶
- Variables
- func AddFromRuleTable(logger *zap.Logger, ipAddrs []netlink.Addr, ruleTable int) error
- func AddNeighborTable(iface string, dstIP net.IP, hwAddress net.HardwareAddr) error
- func AddRouteTable(logger *zap.Logger, ruleTable int, scope netlink.Scope, device string, ...) error
- func AddToRuleTable(preInterfaceIPAddress []netlink.Addr, ruleTable int) error
- func AddrsToString(addrs []netlink.Addr) []string
- func EnableIpv6Sysctl(logger *zap.Logger, netns ns.NetNS) error
- func GetGatewayIP(addrs []netlink.Addr) (v4Gw, v6Gw net.IP, err error)
- func GetIPFamily(prevResult cnitypes.Result) (int, error)
- func HwAddressByName(netns ns.NetNS, hostVethPairName string) (net.HardwareAddr, net.HardwareAddr, error)
- func IPAddressByName(netns ns.NetNS, interfacenName string, ipFamily int) ([]netlink.Addr, error)
- func IPAddressOnNode(logger *zap.Logger, ipFamily int) ([]netlink.Addr, error)
- func MoveRoutes(logger *zap.Logger, netns ns.NetNS, routeMoveInterface string, ...) error
- func OverrideHwAddress(logger *zap.Logger, netns ns.NetNS, macPrefix, iface string) (string, error)
- func SysctlRPFilter(netns ns.NetNS, rp *types.RPFilter) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultInterfacesToExclude = []string{
"docker.*", "cbr.*", "dummy.*",
"virbr.*", "lxcbr.*", "veth.*", "lo",
"cali.*", "tunl.*", "flannel.*", "kube-ipvs.*", "cni.*", "vx-submariner",
}
Functions ¶
func AddFromRuleTable ¶
AddFromRuleTable add route rule for calico/cilium cidr(ipv4 and ipv6) Equivalent to: `ip rule add from <cidr> `
func AddNeighborTable ¶
AddNeighborTable add static neighborhood table
func AddRouteTable ¶
func AddToRuleTable ¶
AddToRuleTable
func AddrsToString ¶
AddrsToString convert addr to
func GetGatewayIP ¶ added in v0.1.4
func HwAddressByName ¶
func HwAddressByName(netns ns.NetNS, hostVethPairName string) (net.HardwareAddr, net.HardwareAddr, error)
func IPAddressByName ¶
IPAddressByName returns all IP addresses of the given interface group by ipFamily
func IPAddressOnNode ¶
IPAddressOnNode return all ip addresses on the node, filter by ipFamily skipping any interfaces whose name matches any of the exclusion list regexes
func MoveRoutes ¶
func MoveRoutes(logger *zap.Logger, netns ns.NetNS, routeMoveInterface string, currentInterfaceIPAddress []netlink.Addr, moveValue types.MoveRouteValue, ruleTable, ipFamily int) error
MoveRoutes make sure that the reply packets accessing the overlay interface are still sent from the overlay interface.
func OverrideHwAddress ¶
OverrideHwAddress override the hardware address of the specified interface.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.