linux

package
v0.0.0-...-c34bea4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package linux implements the Linux specific datapath implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMinRequirements

func CheckMinRequirements()

CheckMinRequirements checks that minimum kernel requirements are met for configuring the BPF datapath. If not, fatally exits.

func NewDatapath

NewDatapath creates a new Linux datapath

func NewNodeAddressing

func NewNodeAddressing() types.NodeAddressing

NewNodeAddressing returns a new linux node addressing model

func NewNodeHandler

func NewNodeHandler(datapathConfig DatapathConfiguration, nodeAddressing types.NodeAddressing, wgAgent datapath.WireguardAgent) datapath.NodeHandler

NewNodeHandler returns a new node handler to handle node events and implement the implications in the Linux datapath

func NodeDeviceNameWithDefaultRoute

func NodeDeviceNameWithDefaultRoute() (string, error)

NodeDeviceNameWithDefaultRoute returns the node's device name which handles the default route in the current namespace

Types

type DatapathConfiguration

type DatapathConfiguration struct {
	// HostDevice is the name of the device to be used to access the host.
	HostDevice string

	ProcFs string
}

DatapathConfiguration is the static configuration of the datapath. The configuration cannot change throughout the lifetime of a datapath object.

type DeviceManager

type DeviceManager struct {
	lock.Mutex
	// contains filtered or unexported fields
}

func NewDeviceManager

func NewDeviceManager() (*DeviceManager, error)

func NewDeviceManagerAt

func NewDeviceManagerAt(netns netns.NsHandle) (*DeviceManager, error)

func (*DeviceManager) AreDevicesRequired

func (dm *DeviceManager) AreDevicesRequired() bool

func (*DeviceManager) Detect

func (dm *DeviceManager) Detect() ([]string, error)

Detect tries to detect devices to which BPF programs may be loaded. See AreDevicesRequired() for features that require the device information.

The devices are detected by looking at all the configured global unicast routes in the system.

func (*DeviceManager) Listen

func (dm *DeviceManager) Listen(ctx context.Context) (chan []string, error)

Listen starts listening to changes to network devices. When devices change the new set of devices is sent on the returned channel.

type NeighLink struct {
	Name string `json:"link-name"`
}

NeighLink contains the details of a NeighLink

type NextHop

type NextHop struct {
	Name  string
	IP    net.IP
	IsNew bool
}

Directories

Path Synopsis
Package ipsec provides the Linux datpaath specific abstraction and useful helpers to manage IPSec via Linux xfrm.
Package ipsec provides the Linux datpaath specific abstraction and useful helpers to manage IPSec via Linux xfrm.
Package linux_defaults provides the Linux datapath defaults
Package linux_defaults provides the Linux datapath defaults
Package probes provides BPF features checks based on bpftool.
Package probes provides BPF features checks based on bpftool.
Package route provides the Cilium specific abstraction and useful helpers to manage network routes
Package route provides the Cilium specific abstraction and useful helpers to manage network routes

Jump to

Keyboard shortcuts

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