Skip to content

Libbpf userspace function bpf_link_get_next_id

0.0.9

Low level wrapper around the BPF_LINK_GET_NEXT_ID syscall command.

Definition

int bpf_link_get_next_id(__u32 start_id, __u32 *next_id);

Parameters

  • start_id: link ID to start from
  • next_id: next link ID

Return

0, on success; negative error code, otherwise

Usage

This function allows you to iterate over loaded BPF links. It returns the next link ID after the start_id provided. If start_id is 0, the first link ID is returned.

Example

Docs could be improved

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