Documentation ¶
Overview ¶
Package recorder represents the BPF map used to (wildcard-)filter traffic that is subject to the pcap recorder. +groupName=maps
Index ¶
- Constants
- Variables
- type CaptureMap
- type CaptureRule
- type CaptureRule4
- type CaptureRule6
- type CaptureWcard4
- func (k *CaptureWcard4) DeepCopyMapKey() bpf.MapKey
- func (k *CaptureWcard4) Dump(sb *strings.Builder)
- func (k *CaptureWcard4) GetKeyPtr() unsafe.Pointer
- func (k *CaptureWcard4) Map() *bpf.Map
- func (k *CaptureWcard4) NewValue() bpf.MapValue
- func (k *CaptureWcard4) String() string
- func (k *CaptureWcard4) ToHost() RecorderKey
- type CaptureWcard6
- func (k *CaptureWcard6) DeepCopyMapKey() bpf.MapKey
- func (k *CaptureWcard6) Dump(sb *strings.Builder)
- func (k *CaptureWcard6) GetKeyPtr() unsafe.Pointer
- func (k *CaptureWcard6) Map() *bpf.Map
- func (k *CaptureWcard6) NewValue() bpf.MapValue
- func (k *CaptureWcard6) String() string
- func (k *CaptureWcard6) ToHost() RecorderKey
- type Map
- type MapRecord
- type RecorderEntry
- type RecorderKey
Constants ¶
View Source
const ( // MapNameWcard4 represents IPv4 capture wildcard table. MapNameWcard4 = "cilium_capture4_rules" // MapNameWcard6 represents IPv6 capture wildcard table. MapNameWcard6 = "cilium_capture6_rules" // MapSize is the default size of the v4 and v6 maps MapSize = 16384 )
Variables ¶
View Source
var CaptureMap4 = &Map{ Map: *bpf.NewMap( MapNameWcard4, bpf.MapTypeHash, &CaptureWcard4{}, int(unsafe.Sizeof(CaptureWcard4{})), &CaptureRule4{}, int(unsafe.Sizeof(CaptureRule4{})), MapSize, bpf.BPF_F_NO_PREALLOC, 0, bpf.ConvertKeyValue, ).WithCache(), v4: true, }
View Source
var CaptureMap6 = &Map{ Map: *bpf.NewMap( MapNameWcard6, bpf.MapTypeHash, &CaptureWcard6{}, int(unsafe.Sizeof(CaptureWcard6{})), &CaptureRule6{}, int(unsafe.Sizeof(CaptureRule6{})), MapSize, bpf.BPF_F_NO_PREALLOC, 0, bpf.ConvertKeyValue, ).WithCache(), v4: false, }
Functions ¶
This section is empty.
Types ¶
type CaptureMap ¶
type CaptureRule ¶
type CaptureRule4 ¶
type CaptureRule4 CaptureRule
func (*CaptureRule4) DeepCopyMapValue ¶ added in v1.10.0
func (v *CaptureRule4) DeepCopyMapValue() bpf.MapValue
func (*CaptureRule4) Dump ¶
func (v *CaptureRule4) Dump(sb *strings.Builder)
func (*CaptureRule4) GetValuePtr ¶ added in v1.10.0
func (v *CaptureRule4) GetValuePtr() unsafe.Pointer
func (*CaptureRule4) String ¶
func (v *CaptureRule4) String() string
type CaptureRule6 ¶
type CaptureRule6 CaptureRule
func (*CaptureRule6) DeepCopyMapValue ¶ added in v1.10.0
func (v *CaptureRule6) DeepCopyMapValue() bpf.MapValue
func (*CaptureRule6) Dump ¶
func (v *CaptureRule6) Dump(sb *strings.Builder)
func (*CaptureRule6) GetValuePtr ¶ added in v1.10.0
func (v *CaptureRule6) GetValuePtr() unsafe.Pointer
func (*CaptureRule6) String ¶
func (v *CaptureRule6) String() string
type CaptureWcard4 ¶
type CaptureWcard4 struct { SrcAddr types.IPv4 `align:"saddr"` DestAddr types.IPv4 `align:"daddr"` SrcPort uint16 `align:"sport"` DestPort uint16 `align:"dport"` NextHdr uint8 `align:"nexthdr"` SrcMask uint8 `align:"smask"` DestMask uint8 `align:"dmask"` Flags uint8 `align:"flags"` }
func (*CaptureWcard4) DeepCopyMapKey ¶ added in v1.10.0
func (k *CaptureWcard4) DeepCopyMapKey() bpf.MapKey
func (*CaptureWcard4) Dump ¶
func (k *CaptureWcard4) Dump(sb *strings.Builder)
func (*CaptureWcard4) GetKeyPtr ¶ added in v1.10.0
func (k *CaptureWcard4) GetKeyPtr() unsafe.Pointer
func (*CaptureWcard4) Map ¶
func (k *CaptureWcard4) Map() *bpf.Map
func (*CaptureWcard4) NewValue ¶ added in v1.10.0
func (k *CaptureWcard4) NewValue() bpf.MapValue
func (*CaptureWcard4) String ¶
func (k *CaptureWcard4) String() string
func (*CaptureWcard4) ToHost ¶
func (k *CaptureWcard4) ToHost() RecorderKey
type CaptureWcard6 ¶
type CaptureWcard6 struct { SrcAddr types.IPv6 `align:"saddr"` DestAddr types.IPv6 `align:"daddr"` SrcPort uint16 `align:"sport"` DestPort uint16 `align:"dport"` NextHdr uint8 `align:"nexthdr"` SrcMask uint8 `align:"smask"` DestMask uint8 `align:"dmask"` Flags uint8 `align:"flags"` }
func (*CaptureWcard6) DeepCopyMapKey ¶ added in v1.10.0
func (k *CaptureWcard6) DeepCopyMapKey() bpf.MapKey
func (*CaptureWcard6) Dump ¶
func (k *CaptureWcard6) Dump(sb *strings.Builder)
func (*CaptureWcard6) GetKeyPtr ¶ added in v1.10.0
func (k *CaptureWcard6) GetKeyPtr() unsafe.Pointer
func (*CaptureWcard6) Map ¶
func (k *CaptureWcard6) Map() *bpf.Map
func (*CaptureWcard6) NewValue ¶ added in v1.10.0
func (k *CaptureWcard6) NewValue() bpf.MapValue
func (*CaptureWcard6) String ¶
func (k *CaptureWcard6) String() string
func (*CaptureWcard6) ToHost ¶
func (k *CaptureWcard6) ToHost() RecorderKey
type Map ¶
func (*Map) DumpEntries ¶
type MapRecord ¶
type MapRecord struct { Key RecorderKey Value RecorderEntry }
type RecorderKey ¶
Click to show internal directories.
Click to hide internal directories.