capturer

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capturer

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

func NewCapturer

func NewCapturer(opts *Options) *Capturer

func (*Capturer) AttachTcHooksToDevs

func (c *Capturer) AttachTcHooksToDevs(devs []types.Device) error

func (*Capturer) AttachTracingHooks

func (c *Capturer) AttachTracingHooks() error

func (*Capturer) BPF

func (c *Capturer) BPF() *bpf.BPF

func (*Capturer) Prepare

func (c *Capturer) Prepare() error

func (*Capturer) Start

func (c *Capturer) Start(ctx context.Context, stopFunc context.CancelFunc) error

func (*Capturer) StartSubProcessLoader

func (c *Capturer) StartSubProcessLoader(ctx context.Context, program string, subProgramArgs []string) error

func (*Capturer) Stop

func (c *Capturer) Stop()

func (*Capturer) StopByInternal

func (c *Capturer) StopByInternal() bool

func (*Capturer) Wait

func (c *Capturer) Wait()

type Options

type Options struct {
	Pids           []uint
	Comm           string
	FollowForks    bool
	WriteFilePath  string
	ReadFilePath   string
	PcapFilter     string
	MaxPacketCount uint
	DirectionOut   bool
	DirectionIn    bool
	OneLine        bool

	PrintPacketNumber   bool
	DontPrintTimestamp  bool
	OnlyPrintCount      bool
	PrintDataAsHex      int
	PrintDataAsHexASCII int
	PrintDataAsASCII    bool

	TimeStampPrecision string
	TimeStampMicro     bool
	TimeStampNano      bool

	DontConvertAddr int

	ContainerId   string
	ContainerName string
	PodName       string
	PodNamespace  string

	EventChanSize                 uint
	DelayBeforeHandlePacketEvents time.Duration
	ExecEventsWorkerNumber        uint
	SnapshotLength                uint32

	DockerEndpoint     string
	ContainerdEndpoint string
	CriRuntimeEndpoint string

	WriteTLSKeyLogPath     string
	EmbedTLSKeyLogToPcapng bool

	SubProgArgs []string

	MntnsIds []uint32
	NetnsIds []uint32
	PidnsIds []uint32

	BTFPath string

	Connections  []metadata.Connection
	ProcessCache *metadata.ProcessCache
	NetNSCache   *metadata.NetNsCache
	DeviceCache  *metadata.DeviceCache

	Writers []writer.PacketWriter

	Gcr            *consumer.GoKeyLogEventConsumer
	ExecConsumer   *consumer.ExecEventConsumer
	ExitConsumer   *consumer.ExitEventConsumer
	PacketConsumer *consumer.PacketEventConsumer

	NetNsPaths    []string
	DevNames      []string
	AllDev        bool
	AllNetNs      bool
	AllNewlyNetNs bool
}

Jump to

Keyboard shortcuts

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