ctmap

package
v0.9.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MapName6       = "cilium_ct6_"
	MapName4       = "cilium_ct4_"
	MapName6Global = MapName6 + "global"
	MapName4Global = MapName4 + "global"

	MapNumEntriesLocal  = 64000
	MapNumEntriesGlobal = 1000000

	TUPLE_F_OUT     = 0
	TUPLE_F_IN      = 1
	TUPLE_F_RELATED = 2
)

Variables

This section is empty.

Functions

func GC added in v0.9.0

func GC(m *bpf.Map, interval uint16, mapName string) int

GC runs garbage collection for map m with name mapName with interval interval. It returns how many items were deleted from m.

func ToString added in v0.9.0

func ToString(m *bpf.Map, mapName string) (string, error)

ToString iterates through Map m and writes the values of the ct entries in m to a string.

Types

type CtEntry

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

CtEntry represents an entry in the connection tracking table.

func (*CtEntry) GetValuePtr added in v0.9.0

func (c *CtEntry) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe.Pointer for s.

type CtEntryDump

type CtEntryDump struct {
	Key   CtKey
	Value CtEntry
}

CtEntryDump represents the key and value contained in the conntrack map.

type CtKey

type CtKey interface {
	bpf.MapKey

	// Returns human readable string representation
	String() string

	// Convert converts fields between host byte order and map byte order
	// if necessary.
	Convert() CtKey

	// Dumps contents of key to buffer. Returns true if successful.
	Dump(buffer *bytes.Buffer) bool
}

CtKey is the interface describing keys to the conntrack maps.

type CtKey4

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

CtKey4 represents the key for IPv4 entries in the local BPF conntrack map.

func (*CtKey4) Convert added in v0.9.0

func (k *CtKey4) Convert() CtKey

Convert converts CtKey4 ports between host bye order and map byte order.

func (CtKey4) Dump

func (k CtKey4) Dump(buffer *bytes.Buffer) bool

Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.

func (*CtKey4) GetKeyPtr added in v0.9.0

func (k *CtKey4) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe.Pointer for k.

func (*CtKey4) NewValue added in v0.9.0

func (k *CtKey4) NewValue() bpf.MapValue

NewValue creates a new bpf.MapValue.

func (*CtKey4) String added in v0.9.0

func (k *CtKey4) String() string

type CtKey4Global added in v0.9.0

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

CtKey4Global represents the key for IPv4 entries in the global BPF conntrack map.

func (*CtKey4Global) Convert added in v0.9.0

func (k *CtKey4Global) Convert() CtKey

Convert converts CtKey4Global ports between host bye order and map byte order.

func (CtKey4Global) Dump added in v0.9.0

func (k CtKey4Global) Dump(buffer *bytes.Buffer) bool

Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.

func (*CtKey4Global) GetKeyPtr added in v0.9.0

func (k *CtKey4Global) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe.Pointer for k.

func (*CtKey4Global) NewValue added in v0.9.0

func (k *CtKey4Global) NewValue() bpf.MapValue

NewValue creates a new bpf.MapValue.

func (*CtKey4Global) String added in v0.9.0

func (k *CtKey4Global) String() string

type CtKey6

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

CtKey6 represents the key for IPv6 entries in the local BPF conntrack map.

func (*CtKey6) Convert added in v0.9.0

func (k *CtKey6) Convert() CtKey

Convert converts CtKey6 ports between host bye order and map byte order.

func (CtKey6) Dump

func (k CtKey6) Dump(buffer *bytes.Buffer) bool

Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.

func (*CtKey6) GetKeyPtr added in v0.9.0

func (k *CtKey6) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe.Pointer for k.

func (*CtKey6) NewValue added in v0.9.0

func (k *CtKey6) NewValue() bpf.MapValue

NewValue creates a new bpf.MapValue.

func (*CtKey6) String added in v0.9.0

func (k *CtKey6) String() string

type CtKey6Global added in v0.9.0

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

CtKey6Global represents the key for IPv6 entries in the global BPF conntrack map.

func (*CtKey6Global) Convert added in v0.9.0

func (k *CtKey6Global) Convert() CtKey

Convert converts CtKey6Global ports between host bye order and map byte order.

func (CtKey6Global) Dump added in v0.9.0

func (k CtKey6Global) Dump(buffer *bytes.Buffer) bool

Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.

func (*CtKey6Global) GetKeyPtr added in v0.9.0

func (k *CtKey6Global) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe.Pointer for k.

func (*CtKey6Global) NewValue added in v0.9.0

func (k *CtKey6Global) NewValue() bpf.MapValue

NewValue creates a new bpf.MapValue.

func (*CtKey6Global) String added in v0.9.0

func (k *CtKey6Global) String() string

type CtType

type CtType int

type CtValue added in v0.9.0

type CtValue interface {
	bpf.MapValue

	// Convert converts fields between host byte order and map byte order
	// if necessary.
	Convert() CtValue
}

CtValue is the interface describing values in the conntrack maps.

Jump to

Keyboard shortcuts

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