Skip to content

Libbpf userspace function bpf_obj_get

0.0.1

Low level wrapper around the BPF_OBJ_GET syscall command.

Definition

int bpf_obj_get(const char *pathname);

Parameters

  • pathname: path to the object to retrieve

Return

>0, file descriptor of the object; negative error code, otherwise

Usage

This function should only be used if you need precise control over the object retrieval process. In most cases the bpf_object__open or similar high level API functions should be used instead.

Example

Docs could be improved

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