nl

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Overview

Package nl provides wrappers for netlink functionality and adding interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownInterface

func DownInterface(name string) error

DownInterface Takes down a single interface

func GetMtu

func GetMtu(name string) (int, error)

GetMtu gets the current MTU for an interface

func RemoveInterface

func RemoveInterface(name string) error

RemoveInterface complete removes the interface

func SetMtu

func SetMtu(name string, mtu int) error

SetMtu sets the MTU of an interface

func UpInterface

func UpInterface(name string) error

UpInterface brings up an interface by name

func UpInterfacePoll

func UpInterfacePoll(name string) error

UpInterfacePoll waits until an interface can be resolved by netlink and then call up on the interface.

Types

type BoundIP

type BoundIP struct {
	*net.IPNet
	Label string
}

BoundIP contains an IPNet / Label pair

func GetIPs

func GetIPs() ([]BoundIP, error)

GetIPs returns IPs allocated to interfaces, in all namespaces TODO: Remove addresses on control plane interfaces, filters

Jump to

Keyboard shortcuts

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