rawpacket

package
v0.0.0-...-272716f Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rawpacket holds rawpacket related files

Package rawpacket holds raw_packet related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BPFFilterToInsts

func BPFFilterToInsts(_ int, _ string, _ ProgOpts) (asm.Instructions, error)

BPFFilterToInsts compile a bpf filter expression

func FiltersToProgramSpecs

func FiltersToProgramSpecs(_, _ int, _ []Filter, _ ProgOpts) ([]*ebpf.ProgramSpec, error)

FiltersToProgramSpecs returns list of program spec from raw packet filters definitions

Types

type Filter

type Filter struct {
	RuleID    eval.RuleID
	BPFFilter string
}

Filter defines a raw packet filter

type ProgOpts

type ProgOpts struct {
	// MaxTailCalls maximun number of tail calls generated
	MaxTailCalls int
	// number of instructions
	MaxProgSize int
	// Number of nop instruction inserted in each program
	NopInstLen int
}

ProgOpts defines options

var DefaultProgOpts ProgOpts

DefaultProgOpts default options

Jump to

Keyboard shortcuts

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