netif

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle interface {
	AddrAdd(link netlink.Link, addr *netlink.Addr) error
	AddrDel(link netlink.Link, addr *netlink.Addr) error
	LinkByName(name string) (netlink.Link, error)
	LinkSetUp(netlink.Link) error
	LinkAdd(netlink.Link) error
	LinkDel(netlink.Link) error
}

type Manager

type Manager interface {
	EnsureIPAddress() error
	RemoveIPAddress() error
	CleanupDevice() error
}

Manager ensures that the dummy device is created or removed.

func NewNetifManager

func NewNetifManager(addr *netlink.Addr, devName string) Manager

NewNetifManager returns a new instance of NetifManager with the ip address set to the provided values These ip addresses will be bound to any devices created by this instance.

Jump to

Keyboard shortcuts

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