Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetLinkHandler ¶
NewNetLinkHandler creates new instance of netlink handler
Types ¶
type NetlinkAPI ¶
type NetlinkAPI interface { /* ARP */ // AddArpEntry configures new linux ARP entry AddArpEntry(name string, arpEntry *netlink.Neigh) error // SetArpEntry modifies existing linux ARP entry SetArpEntry(name string, arpEntry *netlink.Neigh) error // DelArpEntry removes linux ARP entry DelArpEntry(name string, arpEntry *netlink.Neigh) error // GetArpEntries returns all configured ARP entries from current namespace GetArpEntries(interfaceIdx int, family int) ([]netlink.Neigh, error) /* Routes */ // AddStaticRoute adds new linux static route AddStaticRoute(name string, route *netlink.Route) error // ReplaceStaticRoute changes existing linux static route ReplaceStaticRoute(name string, route *netlink.Route) error // DelStaticRoute removes linux static route DelStaticRoute(name string, route *netlink.Route) error }
NetlinkAPI interface covers all methods inside linux calls package needed to manage linux ARP entries and routes.
Click to show internal directories.
Click to hide internal directories.