Documentation ¶
Index ¶
Constants ¶
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 )
const ( // GCFilterByTime filters CT entries by time GCFilterByTime = 1 << iota // GCFilterByID filters CT entries by IP and IDsToRem GCFilterByID )
Variables ¶
This section is empty.
Functions ¶
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
GetValuePtr returns the unsafe.Pointer for s.
type CtEntryDump ¶
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 // ToNetwork converts fields to network byte order. ToNetwork() CtKey // ToHost converts fields to host byte order. ToHost() 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) Dump ¶
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
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) 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
func (*CtKey4Global) ToHost ¶ added in v0.10.0
func (k *CtKey4Global) ToHost() CtKey
ToHost converts CtKey4Global ports to host byte order.
func (*CtKey4Global) ToNetwork ¶ added in v0.10.0
func (k *CtKey4Global) ToNetwork() CtKey
ToNetwork converts CtKey4Global ports to network byte order.
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) Dump ¶
Dump writes the contents of key to buffer and returns true if the value for next header in the key is nonzero.
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) 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
func (*CtKey6Global) ToHost ¶ added in v0.10.0
func (k *CtKey6Global) ToHost() CtKey
ToHost converts CtKey6Global ports to host byte order.
func (*CtKey6Global) ToNetwork ¶ added in v0.10.0
func (k *CtKey6Global) ToNetwork() CtKey
ToNetwork converts CtKey6Global ports to network byte order.
type CtValue ¶ added in v0.9.0
type CtValue interface { bpf.MapValue // ToNetwork converts fields to network byte order. ToNetwork() CtValue // ToHost converts fields to host byte order. ToHost() CtValue }
CtValue is the interface describing values in the conntrack maps.
type GCFilter ¶ added in v0.10.0
type GCFilter struct { Time uint32 IP net.IP IDsToRm map[uint32]bool // contains filtered or unexported fields }
GCFilter contains the necessary fields to filter the CT maps.
func NewGCFilterBy ¶ added in v0.10.0
func NewGCFilterBy(f GCFilterFlags) *GCFilter
NewGCFilterBy creates a new GCFilter with the given flags.
type GCFilterFlags ¶ added in v0.10.0
type GCFilterFlags uint
GCFilterFlags is the type for the different filter flags