Documentation ¶
Overview ¶
Package bpf is an assembler for the Berkeley Packet Filter (bpf).
Index ¶
- type ALUOp
- type ALUOpConstant
- type ALUOpX
- type Extension
- type Instruction
- type Jump
- type JumpIf
- type JumpIfX
- type JumpTest
- type LoadAbsolute
- type LoadConstant
- type LoadExtension
- type LoadIndirect
- type LoadMemShift
- type LoadScratch
- type NegateA
- type Program
- type RawInstruction
- type Register
- type Registers
- type RetA
- type RetConstant
- type StoreScratch
- type TAX
- type TXA
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Program ¶ added in v1.0.0
type Program []bpf.Instruction
Program is an assembled program.
func Assemble ¶
Assemble BPF instructions from source.
func (Program) Assemble ¶ added in v1.0.0
func (p Program) Assemble() ([]bpf.RawInstruction, error)
type Registers ¶ added in v1.0.0
type Registers struct { PC uint32 // Program Counter A uint32 // Accumulator X uint32 // R [16]uint32 // Scratch }
Registers for a BPF virtual machine.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.