netlink

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Packet netlink provide access to low level Netlink sockets and messages.

Actual implementations are in: netlink_linux.go netlink_darwin.go

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongSockType = errors.New("Wrong socket type")
	ErrShortResponse = errors.New("Got short response from netlink")
)
View Source
var (
	ErrNotImplemented = errors.New("not implemented")
)

Functions

func AddDefaultGw

func AddDefaultGw(ip net.IP) error

func NetworkChangeName added in v0.9.0

func NetworkChangeName(iface *net.Interface, newName string) error

func NetworkCreateVethPair added in v0.9.0

func NetworkCreateVethPair(name1, name2 string) error

func NetworkLinkAdd

func NetworkLinkAdd(name string, linkType string) error

func NetworkLinkAddIp

func NetworkLinkAddIp(iface *net.Interface, ip net.IP, ipNet *net.IPNet) error

func NetworkLinkDown added in v0.9.0

func NetworkLinkDown(iface *net.Interface) error

func NetworkLinkUp

func NetworkLinkUp(iface *net.Interface) error

func NetworkSetMTU

func NetworkSetMTU(iface *net.Interface, mtu int) error

func NetworkSetMaster added in v0.9.0

func NetworkSetMaster(iface, master *net.Interface) error

func NetworkSetNsFd added in v0.9.0

func NetworkSetNsFd(iface *net.Interface, fd int) error

func NetworkSetNsPid added in v0.9.0

func NetworkSetNsPid(iface *net.Interface, nspid int) error

Types

type Route added in v0.8.0

type Route struct {
	*net.IPNet
	Iface   *net.Interface
	Default bool
}

A Route is a subnet associated with the interface to reach it.

func NetworkGetRoutes

func NetworkGetRoutes() ([]Route, error)

Jump to

Keyboard shortcuts

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