Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetLink ¶
type NetLink interface { // LinkByName gets a link object given the device name LinkByName(name string) (netlink.Link, error) // LinkSetNsFd is equivalent to `ip link set $link netns $ns` LinkSetNsFd(link netlink.Link, fd int) error // ParseAddr parses an address string ParseAddr(s string) (*netlink.Addr, error) // AddrAdd is equivalent to `ip addr add $addr dev $link` AddrAdd(link netlink.Link, addr *netlink.Addr) error // AddrList is equivalent to `ip addr show ` AddrList(link netlink.Link, family int) ([]netlink.Addr, error) // LinkAdd is equivalent to `ip link add` LinkAdd(link netlink.Link) error // LinkSetUp is equivalent to `ip link set $link up` LinkSetUp(link netlink.Link) error // LinkList is equivalent to: `ip link show` LinkList() ([]netlink.Link, error) // LinkSetDown is equivalent to: `ip link set $link down` LinkSetDown(link netlink.Link) error // RouteList gets a list of routes in the system. RouteList(link netlink.Link, family int) ([]netlink.Route, error) // RouteAdd will add a route to the route table RouteAdd(route *netlink.Route) error // RouteDel is equivalent to `ip route del` RouteDel(route *netlink.Route) error NeighAdd(neigh *netlink.Neigh) error LinkDel(link netlink.Link) error NewRule() *netlink.Rule RuleDel(rule *netlink.Rule) error RuleAdd(rule *netlink.Rule) error RuleList(family int) ([]netlink.Rule, error) // LinkSetMTU is equivalent to `ip link set dev $link mtu $mtu` LinkSetMTU(link netlink.Link, mtu int) error }
NetLink wraps methods used from the vishvananda/netlink package
Directories ¶
Path | Synopsis |
---|---|
Package mock_netlink is a generated GoMock package.
|
Package mock_netlink is a generated GoMock package. |
Package mock_netlinkwrapper is a generated GoMock package.
|
Package mock_netlinkwrapper is a generated GoMock package. |
Package mock_netlink is a generated GoMock package.
|
Package mock_netlink is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.