lxcmap

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MapName = "cilium_lxc"

	// MaxKeys represents the maximum number of keys in the LXCMap.
	MaxKeys = common.EndpointsPerHost

	// PortMapMax represents the maximum number of Ports Mapping per container.
	PortMapMax = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LXCInfo

type LXCInfo struct {
	IfIndex    uint32
	SecLabelID uint16
	LxcID      uint16
	MAC        MAC
	NodeMAC    MAC
	V6Addr     v6Addr
	PortMap    [PortMapMax]PortMap
}

LXCInfo is an internal representation of an LXC most relevant details for eBPF programs.

func (LXCInfo) String

func (lxc LXCInfo) String() string

type LXCMap

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

LXCMap is an internal representation of an eBPF LXC Map.

func OpenMap

func OpenMap() (*LXCMap, error)

OpenMap opens the endpoint map.

func (*LXCMap) DeleteElement

func (m *LXCMap) DeleteElement(ep *endpoint.Endpoint) error

DeleteElement deletes the element with the given id from the LXCMap.

func (*LXCMap) WriteEndpoint

func (m *LXCMap) WriteEndpoint(ep *endpoint.Endpoint) error

WriteEndpoint transforms the ep's relevant data into an LXCInfo and stores it in LXCMap.

type MAC

type MAC uint64

MAC is the __u64 representation of a MAC address.

func ParseMAC

func ParseMAC(s string) (MAC, error)

ParseMAC parses s only as an IEEE 802 MAC-48.

func (MAC) String

func (m MAC) String() string

type PortMap

type PortMap struct {
	From uint16
	To   uint16
}

PortMap represents a port mapping from the host to the LXC.

func (PortMap) String

func (pm PortMap) String() string

Jump to

Keyboard shortcuts

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