kernel

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package kernel contains Link representation of network interface

Index

Constants

View Source
const (
	// FamilyAll is netlink.FAMILY_ALL
	FamilyAll = netlink.FAMILY_ALL
	// NudReachable is netlink.NUD_REACHABLE
	NudReachable = netlink.NUD_REACHABLE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Link interface {
	AddAddress(ip string) error
	DeleteAddress(ip string) error
	MoveToNetns(target netns.NsHandle) error
	SetAdminState(state State) error
	SetName(name string) error
}

Link represents network interface and specifies operations that can be performed on that interface.

func FindHostDevice

func FindHostDevice(pciAddress, name string, namespaces ...netns.NsHandle) (Link, error)

FindHostDevice returns a new instance of link representing host device, based on the PCI address and/or target interface name.

type State

type State uint

State defines admin state of the network interface

const (
	// DOWN is link admin state down
	DOWN State = iota
	// UP is link admin state down
	UP
)

Directories

Path Synopsis
networkservice
ethernetcontext
Package ethernetcontext provides chain element for setup link ethernet properties
Package ethernetcontext provides chain element for setup link ethernet properties
inject
Package inject contains chain element that moves network interface to and from a Client's pod network namespace
Package inject contains chain element that moves network interface to and from a Client's pod network namespace
ipcontext
Package ipcontext provides chain element for setup link ip properties
Package ipcontext provides chain element for setup link ip properties
netns
Package netns provides chain element to switch net NS
Package netns provides chain element to switch net NS
rename
Package rename provides link rename chain element
Package rename provides link rename chain element
vfconfig
Package vfconfig provides VF config
Package vfconfig provides VF config
tools
nshandle
Package nshandle provides utils for creating net NS handles
Package nshandle provides utils for creating net NS handles

Jump to

Keyboard shortcuts

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