Skip to content

Libbpf userspace function bpf_btf_get_next_id

0.0.5

Low level wrapper around the BPF_BTF_GET_NEXT_ID syscall command.

Definition

int bpf_btf_get_next_id(__u32 start_id, __u32 *next_id);

Parameters

  • start_id: BTF object ID to start from
  • next_id: next BTF object ID

Return

0, on success; negative error code, otherwise

Usage

This function allows you to iterate over loaded BTF objects. It returns the next BTF object ID after the start_id provided. If start_id is 0, the first BTF object ID is returned.

Example

Docs could be improved

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