linuxcalls

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetLinkHandler

func NewNetLinkHandler(stopwatch *measure.Stopwatch) *netLinkHandler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL