types

package
v0.0.0-...-04f2983 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNeedSandbox       = errors.New("Sandbox must be specified")
	ErrNeedSandboxID     = errors.New("Sandbox ID cannot be empty")
	ErrNeedContainerID   = errors.New("Container ID cannot be empty")
	ErrNeedState         = errors.New("State cannot be empty")
	ErrNoSuchContainer   = errors.New("Container does not exist")
	ErrInvalidConfigType = errors.New("Invalid config type")
)

common error objects used for argument checking

Functions

This section is empty.

Types

type ARPNeighbor

type ARPNeighbor struct {
	ToIPAddress *IPAddress
	Device      string
	LLAddr      string
	State       int
	Flags       int
}

type IPAddress

type IPAddress struct {
	Family  int
	Address string
	Mask    string
}

IPAddress describes an IP address.

type Interface

type Interface struct {
	Device      string
	Name        string
	IPAddresses []*IPAddress
	Mtu         uint64
	RawFlags    uint32
	HwAddr      string
	// PCI path for the interface
	PciPath PciPath
	// LinkType defines the type of interface described by this structure.
	// The expected values are the one that are defined by the netlink
	// library, regarding each type of link. Here is a non exhaustive
	// list: "veth", "macvtap", "vlan", "macvlan", "tap", ...
	LinkType string
}

Interface describes a network interface.

type PciPath

type PciPath struct {
	// contains filtered or unexported fields
}

A PciPath describes where a PCI sits in a PCI hierarchy.

Consists of a list of PCI slots, giving the slot of each bridge that must be traversed from the PCI root to reach the device, followed by the slot of the device itself

When formatted into a string is written as "xx/.../yy/zz" Here, zz is the slot of the device on its PCI bridge, yy is the slot of the bridge on its parent bridge and so forth until xx is the slot of the "most upstream" bridge on the root bus. If a device is connected directly to the root bus, its PciPath is just "zz"

func PciPathFromSlots

func PciPathFromSlots(slots ...PciSlot) (PciPath, error)

func PciPathFromString

func PciPathFromString(s string) (PciPath, error)

func (PciPath) IsNil

func (p PciPath) IsNil() bool

func (PciPath) String

func (p PciPath) String() string

type PciSlot

type PciSlot struct {
	// contains filtered or unexported fields
}

A PciSlot describes where a PCI device sits on a single bus

This encapsulates the PCI slot number a.k.a device number, which is limited to a 5 bit value [0x00..0x1f] by the PCI specification

XXX In order to support multifunction device's we'll need to extend this to include the PCI 3-bit function number as well.

func PciSlotFromInt

func PciSlotFromInt(v int) (PciSlot, error)

func PciSlotFromString

func PciSlotFromString(s string) (PciSlot, error)

func (PciSlot) String

func (slot PciSlot) String() string

type Route

type Route struct {
	Dest    string
	Gateway string
	Device  string
	Source  string
	Scope   uint32
}

Route describes a network route.

Jump to

Keyboard shortcuts

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