Welcome to pybpf_asm’s documentation!

Contents:

bpf_asm

Python BPF Assembler.

Based on the BPF assembler in Linux sources.

class bpf_asm.BpfDumpType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
DEFAULT = 0
MULTILINE = 1
C_ARRAY = 2
exception bpf_asm.Error

Raised when there is an error assembling BPF.

bpf_asm.assemble(str: str) List[Tuple[int, int, int, int]]

Assemble BPF str.

bpf_asm.dumps(bpf: List[Tuple[int, int, int, int]], format=BpfDumpType.DEFAULT) str

Dump bpf to a str in format.

Indices and tables