recorder

package
v1.12.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Overview

Package recorder represents the BPF map used to (wildcard-)filter traffic that is subject to the pcap recorder. +groupName=maps

Index

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

Functions

This section is empty.

Types

type CaptureMap

type CaptureMap interface {
	Open() error
	Close() error
	Path() (string, error)
	DumpEntries() (string, error)
	DumpWithCallback(bpf.DumpCallback) error
}

type CaptureRule

type CaptureRule struct {
	RuleId   uint16 `align:"rule_id"`
	Reserved uint16 `align:"reserved"`
	CapLen   uint32 `align:"cap_len"`
}

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

type Map struct {
	bpf.Map
	// contains filtered or unexported fields
}

func (*Map) DumpEntries

func (m *Map) DumpEntries() (string, error)

type MapRecord

type MapRecord struct {
	Key   RecorderKey
	Value RecorderEntry
}

type RecorderEntry

type RecorderEntry interface {
	bpf.MapValue
	Dump(sb *strings.Builder)
}

type RecorderKey

type RecorderKey interface {
	bpf.MapKey
	ToHost() RecorderKey
	Dump(sb *strings.Builder)
	Map() *bpf.Map
}

Jump to

Keyboard shortcuts

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