Documentation ¶
Index ¶
- func AddDefaultRoute(gw net.IP, dev netlink.Link) error
- func AddHostRoute(ipn *net.IPNet, gw net.IP, dev netlink.Link) error
- func AddRoute(ipn *net.IPNet, gw net.IP, dev netlink.Link) error
- func DelLinkByName(ifName string) error
- func DelLinkByNameAddr(ifName string, family int) (*net.IPNet, error)
- func Network(ipn *net.IPNet) *net.IPNet
- func NextIP(ip net.IP) net.IP
- func ParseCIDR(s string) (*net.IPNet, error)
- func PluginMain(cmdAdd, cmdDel func(_ *CmdArgs) error)
- func PrevIP(ip net.IP) net.IP
- func SetNS(f *os.File, flags uintptr) error
- func SetupIPMasq(ipn *net.IPNet, chain string) error
- func SetupVeth(entropy, podVethName string, mtu int, hostNS *os.File) (hostVeth, podVeth netlink.Link, err error)
- func TeardownIPMasq(ipn *net.IPNet, chain string) error
- func WithNetNS(ns *os.File, f func(*os.File) error) error
- func WithNetNSPath(nspath string, f func(*os.File) error) error
- type CmdArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultRoute ¶
AddDefaultRoute sets the default route on the given gateway.
func AddHostRoute ¶
AddHostRoute adds a host-scoped route to a device.
func DelLinkByName ¶
DelLinkByName removes an interface link.
func DelLinkByNameAddr ¶ added in v0.3.2
DelLinkByNameAddr remove an interface returns its IP address of the specified family
func PluginMain ¶ added in v0.4.0
func SetupIPMasq ¶ added in v0.3.2
Installs iptables rules to masquerade traffic coming from ipn and going outside of it
func SetupVeth ¶
func SetupVeth(entropy, podVethName string, mtu int, hostNS *os.File) (hostVeth, podVeth netlink.Link, err error)
SetupVeth sets up a virtual ethernet link. Should be in pod netns. TODO(eyakubovich): get rid of entropy and ask kernel to pick name via pattern
func TeardownIPMasq ¶ added in v0.3.2
Undoes the effects of SetupIPMasq
Types ¶
Click to show internal directories.
Click to hide internal directories.