network

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerSideNetwork

type ContainerSideNetwork struct {
	// Result contains CNI result object describing the network settings.
	Result *cnicurrent.Result
	// NsPath specifies the path to the container network namespace.
	NsPath string
	// Interfaces contains a list of interfaces with data needed
	// to configure them.
	Interfaces []*InterfaceDescription
}

ContainerSideNetwork struct describes the container (VM) network namespace properties.

type InterfaceDescription

type InterfaceDescription struct {
	// Type contains interface type designator.
	Type InterfaceType
	// Fo contains open File object pointing to tap device inside network
	// namespace or to control file in sysfs for sr-iov VF.
	// It may be nil if the interface was recovered after restarting Virtlet.
	// It's only needed during the initial VM startup.
	// The json tag is here so that bogus File object doesn't get stored
	// in the metadata db.
	Fo *os.File `json:"-"`
	// Name contains original interface name for sr-iov interface.
	Name string
	// HardwareAddr contains original hardware address for CNI-created
	// veth link.
	HardwareAddr net.HardwareAddr
	// PCIAddress contains a pci address for sr-iov vf interface.
	PCIAddress string
	// MTU contains max transfer unit value for interface.
	MTU uint16
	// VlanID contains vlan id of sr-iov vf interface.
	VlanID int
}

InterfaceDescription holds all data required by tapmanager to identify network interface.

type InterfaceType

type InterfaceType int

InterfaceType presents type of network interface instance.

const (
	// InterfaceTypeTap is a marker for tap type interface.
	InterfaceTypeTap InterfaceType = iota
	// InterfaceTypeVF is a marker for SR-IOV VF type interface.
	InterfaceTypeVF
)

Jump to

Keyboard shortcuts

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