Skip to content

Libbpf userspace function bpf_program__insn_cnt

0.6.0

Returns number of struct bpf_insn's that form specified BPF program.

Definition

size_t bpf_program__insn_cnt(const struct bpf_program *prog);

Parameters

  • prog: BPF program for which to return number of BPF instructions

Usage

See bpf_program__insns documentation for notes on how libbpf can change instructions and their count during different phases of bpf_object lifetime.

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome