Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetlinkLib ¶
type NetlinkLib interface { // LinkByName finds a link by name and returns a pointer to the object. LinkByName(name string) (Link, error) // LinkSetUp enables the link device. // Equivalent to: `ip link set $link up` LinkSetUp(link Link) error // IsLinkAdminStateUp checks if the admin state of a link is up IsLinkAdminStateUp(link Link) bool // IPv4Addresses return the IPv4 addresses of a link IPv4Addresses(link Link) ([]netlink.Addr, error) // AddrDel delete an IP address from a link AddrDel(link Link, ip string) error // AddrAdd add an IP address to a link AddrAdd(link Link, ip string) error // GetRouteSrc returns the source IP address of a route GetRouteSrc(dst string) (string, error) // NieghList returns the neighbors of a link NeighList(linkIndex int) ([]netlink.Neigh, error) }
func New ¶
func New() NetlinkLib
Click to show internal directories.
Click to hide internal directories.