linux/tools/lib/bpf
Hengqi Chen 6a886de070 libbpf: Add btf__type_cnt() and btf__raw_data() APIs
Add btf__type_cnt() and btf__raw_data() APIs and deprecate
btf__get_nr_type() and btf__get_raw_data() since the old APIs
don't follow the libbpf naming convention for getters which
omit 'get' in the name (see [0]). btf__raw_data() is just an
alias to the existing btf__get_raw_data(). btf__type_cnt()
now returns the number of all types of the BTF object
including 'void'.

  [0] Closes: https://github.com/libbpf/libbpf/issues/279

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211022130623.1548429-2-hengqi.chen@gmail.com
2021-10-22 16:09:14 -07:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
bpf_core_read.h selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro 2021-04-26 18:37:13 -07:00
bpf_endian.h libbpf: Make bpf_endian co-exist with vmlinux.h 2020-07-01 09:06:12 +02:00
bpf_gen_internal.h libbpf: Update gen_loader to emit BTF_KIND_FUNC relocations 2021-10-05 17:07:42 -07:00
bpf_helpers.h libbpf: Use static const fmt string in __bpf_printk 2021-09-17 14:02:05 -07:00
bpf_prog_linfo.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
bpf_tracing.h libbpf: Fail compilation if target arch is missing 2021-06-16 20:15:30 -07:00
bpf.c libbpf: Support kernel module function calls 2021-10-05 17:07:42 -07:00
bpf.h libbpf: Add bpf_cookie support to bpf_link_create() API 2021-08-17 00:45:08 +02:00
btf_dump.c libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
btf.c libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
btf.h libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
Build libbpf: Split CO-RE logic into relo_core.c. 2021-07-26 12:29:14 -07:00
gen_loader.c libbpf: Update gen_loader to emit BTF_KIND_FUNC relocations 2021-10-05 17:07:42 -07:00
hashmap.c libbpf: Centralize poisoning and poison reallocarray() 2020-08-18 18:38:25 -07:00
hashmap.h libbpf, hashmap: Fix undefined behavior in hash_bits 2020-11-02 23:33:51 +01:00
libbpf_common.h libbpf: Schedule open_opts.attach_prog_fd deprecation since v0.7 2021-09-17 09:05:41 -07:00
libbpf_errno.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
libbpf_internal.h libbpf: Use Elf64-specific types explicitly for dealing with ELF 2021-10-21 17:10:10 -07:00
libbpf_legacy.h libbpf: Add opt-in strict BPF program section name handling logic 2021-09-28 13:51:19 -07:00
libbpf_probes.c libbpf: Fix probe for BPF_PROG_TYPE_CGROUP_SOCKOPT 2021-08-07 01:38:52 +02:00
libbpf_version.h libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
libbpf.c libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
libbpf.h libbpf: Deprecate bpf_{map,program}__{prev,next} APIs since v0.7 2021-10-06 12:34:02 -07:00
libbpf.map libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
libbpf.pc.template libbpf: Add zlib as a dependency in pkg-config template 2019-12-16 14:55:29 -08:00
linker.c libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
Makefile libbpf: Remove Makefile warnings on out-of-sync netlink.h/if_link.h 2021-10-19 16:33:10 -07:00
netlink.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.h libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
relo_core.c libbpf: Split CO-RE logic into relo_core.c. 2021-07-26 12:29:14 -07:00
relo_core.h libbpf: Split CO-RE logic into relo_core.c. 2021-07-26 12:29:14 -07:00
ringbuf.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
skel_internal.h libbpf: Fix skel_internal.h to set errno on loader retval < 0 2021-09-29 20:42:32 -07:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
strset.c libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
xsk.c libbpf: Fix build with latest gcc/binutils with LTO 2021-09-07 19:32:04 -07:00
xsk.h libbpf: xsk: Move barriers from libbpf_util.h to xsk.h 2021-03-10 13:45:16 -08:00