libbpf: add bpf_btf_get_next_id() to cycle through BTF objects
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 20 Aug 2019 09:31:53 +0000 (10:31 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 20 Aug 2019 16:51:06 +0000 (09:51 -0700)
commit09d7c2e32b6e06d58fe7a5aa38847f4719ab4cc7
tree468ec4aa0449a0e88497e2ab306f567dda65f0bf
parenta6e130c4203bcc73450a00f647d99bd75ded95cb
libbpf: add bpf_btf_get_next_id() to cycle through BTF objects

Add an API function taking a BTF object id and providing the id of the
next BTF object in the kernel. This can be used to list all BTF objects
loaded on the system.

v2:
- Rebase on top of Andrii's changes regarding libbpf versioning.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/lib/bpf/libbpf.map