Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/lib/bpf: bpf_program__insns allow to retrieve insns in libbpf
This allows consumers of libbpf to iterate trough the insns of a program without loading it first directly after the ELF parsing. Being able to do that is useful to create tooling that can show the structure of a BPF program using libbpf without having to parse the ELF separately. Usage: struct bpf_insn *insn; insn = bpf_program__insns(prog); Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
- Loading branch information