nl

package
v0.0.0-...-f852ded Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScopeLink netlink.Scope // Overwritten in nl_linux.go

ScopeLink represents link scope for linux routing table entires.

Functions

This section is empty.

Types

type I

type I interface {
	AddVeth(name, alias, peer string, mtu int) error
	AddrAdd(link Link, ip net.IPNet) error

	LinkSetUp(link Link) error
	LinkDel(link Link) error
	LinkSetNs(link Link, nsh netns.NsHandle) error
	LinkSetName(link Link, name string) error
	LinkByName(name string) (Link, error)
	LinkByAlias(alias string) (Link, error)
	LinkByIndex(index int) (Link, error)
	LinkSetHardwareAddr(link Link, hwaddr net.HardwareAddr) error

	RouteList(family int) ([]Route, error)
	RouteAdd(r Route) error

	GetNetns() (netns.NsHandle, error)
	GetNetnsFromPath(string) (netns.NsHandle, error)
	SetNetns(ns netns.NsHandle) error
	CloseNsHandle(ns netns.NsHandle) error
}

I implements a mock interface netlink.

var N I = n{}

N holds a global instance of I.

type Link netlink.Link

Link wraps netlink.Link.

type Route

type Route netlink.Route

Route wraps netlink.Route.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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