Documentation
¶
Overview ¶
Package ebpf provides eBPF program generation for protocol parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapDef ¶
type MapDef struct {
Name string `json:"name"`
Type string `json:"type"` // hash, array, percpu_hash
KeySize int `json:"key_size"`
ValueSize int `json:"value_size"`
MaxEntries int `json:"max_entries"`
}
MapDef represents an eBPF map definition.
type Program ¶
type Program struct {
Protocol string `json:"protocol"`
Type ProgramType `json:"type"`
Maps []MapDef `json:"maps"`
}
Program represents a generated eBPF program.
func Generate ¶
func Generate(protocol string, progType ProgramType) *Program
Generate generates an eBPF C program for protocol parsing.
type ProgramType ¶
type ProgramType string
ProgramType represents an eBPF program type.
const ( ProgXDP ProgramType = "xdp" ProgTC ProgramType = "tc" )
Click to show internal directories.
Click to hide internal directories.