Skip to content

Libbpf userspace function bpf_object__btf_fd

0.0.1

Returns the file descriptor of the BTF loaded into the kernel for a given BPF object.

Definition

int bpf_object__btf_fd(const struct bpf_object *obj);

Parameters

  • obj: Pointer to a valid BPF object

Returns

The file descriptor of the BTF loaded into the kernel for the BPF object, or -1 if the BPF object has no BTF or the BTF has not yet been loaded into the kernel.

Usage

Docs could be improved

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

Example

Docs could be improved

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