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 LoadNet(path string, n interface{}) error
- func ParseCIDR(s string) (*net.IPNet, error)
- func SetNS(f *os.File, flags uintptr) error
- func SetupVeth(entropy, contVethName string, ipn *net.IPNet, hostNS *os.File) (hostVeth, contVeth netlink.Link, err error)
- func WithNetNSPath(nspath string, f func(*os.File) error) error
- type Net
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.
Types ¶
type Net ¶
type Net struct { Filename string Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` IPAlloc struct { Type string `json:"type,omitempty"` Subnet string `json:"subnet,omitempty"` } `json:"ipAlloc,omitempty"` Routes []string `json:"routes,omitempty"` }
Net describes a network.
Click to show internal directories.
Click to hide internal directories.