kernel

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 8 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
Package iprule provides networkservice chain elements that support setting ip rules
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/iptables4nattemplate
Package iptables4nattemplate provides chain element for setup iptables nat rules
Package iptables4nattemplate provides chain element for setup iptables nat rules
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
connectioncontextkernel/pinggrouprange
Package pinggrouprange sets /proc/sys/net/ipv4/ping_group_range variable
Package pinggrouprange sets /proc/sys/net/ipv4/ping_group_range variable
connectioncontextkernel/routelocalnet
Package routelocalnet provides chain element that enables route_localnet flat for connection network interface
Package routelocalnet provides chain element that enables route_localnet flat for connection network interface
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
setiptables4nattemplate
Package setiptables4nattemplate provides chain element for setup iptables rules template properties
Package setiptables4nattemplate provides chain element for setup iptables rules template properties
setroutelocalnet
Package setroutelocalnet provides chain element for setup routelocalnet property
Package setroutelocalnet provides chain element for setup routelocalnet property
vfconfig
Package vfconfig provides VF config
Package vfconfig provides VF config
tools
heal
Package heal contains an implementation of LivenessChecker.
Package heal contains an implementation of LivenessChecker.
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