Skip to content

kbpf ¤

Functions:

Attributes:

parser module-attribute ¤

parser = ArgumentParser(
    description="Prints information about the linux kernel bpf progs and maps."
)

MAX_PRINTED_VALUE_SIZE module-attribute ¤

MAX_PRINTED_VALUE_SIZE = 32

MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN module-attribute ¤

MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN = 16

BPF_AUX_REG_STRING module-attribute ¤

BPF_AUX_REG_STRING = 'ax'

BPF_MAP_ARRAY_TYPES module-attribute ¤

BPF_MAP_ARRAY_TYPES = ('BPF_MAP_TYPE_ARRAY', 'BPF_MAP_TYPE_PROG_ARRAY')

indent module-attribute ¤

handle_bpf_aux_reg_for_insns_bytes ¤

handle_bpf_aux_reg_for_insns_bytes(insns_bytes: bytearray) -> list[int]

handle_bpf_aux_reg_for_opstr ¤

handle_bpf_aux_reg_for_opstr(opstr: str, regflag: int) -> str

bpf_map_array_offset ¤

bpf_map_array_offset(
    bpf_array: int, t: str, max_entries: int, value_size: int
) -> int | None

parse_xa_node ¤

parse_xa_node(xa_node: int | Value) -> list[int]

get_slots ¤

get_slots(idr: Value) -> list[int]

print_bpf_prog_metadata ¤

print_bpf_prog_metadata(
    idx: int | None,
    slot: int | None,
    bpf_prog: Value,
    indent: IndentContextManager,
) -> int

print_bpf_progs ¤

print_bpf_progs(verbose: int, nth: int | None) -> None

print_bpf_maps ¤

print_bpf_maps(verbose: int) -> None

kbpf ¤

kbpf(
    verbose: int, print_progs: bool, print_maps: bool, nth: int | None = None
) -> None