kernel

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 7 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

func GetNetlinkHandle

func GetNetlinkHandle(urlString string) (*netlink.Handle, error)

GetNetlinkHandle - mechanism to netlink.Handle for the NetNS specified in mechanism

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
	GetName() string
	GetLink() netlink.Link
}

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
connectioncontextkernel
Package connectioncontextkernel provides networkservice chain elements for applying connection context to the kernel interface side of vWires being plugged into the vpp
Package connectioncontextkernel provides networkservice chain elements for applying connection context to the kernel interface side of vWires being plugged into the vpp
connectioncontextkernel/ipcontext/ipaddress
Package ipaddress provides networkservice chain elements that support setting ip addresses on kernel interfaces
Package ipaddress provides networkservice chain elements that support setting ip addresses on kernel interfaces
connectioncontextkernel/ipcontext/ipneighbors
Package ipneighbors provides networkservice chain elements that support setting ip neighbors on kernel interfaces
Package ipneighbors provides networkservice chain elements that support setting ip neighbors on kernel interfaces
connectioncontextkernel/ipcontext/iprule
Package iprule provides networkservice chain elements that support setting ip rules Code generated by "-output table_map.gen.go -type Map<tableKey,int> -output table_map.gen.go -type Map<tableKey,int>"; DO NOT EDIT.
Package iprule provides networkservice chain elements that support setting ip rules Code generated by "-output table_map.gen.go -type Map<tableKey,int> -output table_map.gen.go -type Map<tableKey,int>"; DO NOT EDIT.
connectioncontextkernel/ipcontext/routes
Package routes provides a networkservice chain elements that sets the routes in the kernel interfaces from the connection context
Package routes provides a networkservice chain elements that sets the routes in the kernel interfaces from the connection context
connectioncontextkernel/mtu
Package mtu provides networkservice chain elements that support setting MTU on kernel interfaces
Package mtu provides networkservice chain elements that support setting MTU on kernel interfaces
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
netns
Package netns provides chain element to switch net NS
Package netns provides chain element to switch net NS
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
peer
Package peer allows storing peer netlink.Link in per Connection.Id metadata
Package peer allows storing peer netlink.Link in per Connection.Id metadata

Jump to

Keyboard shortcuts

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