Skip to content

Libbpf userspace function bpf_object__open_file

0.0.6

creates a struct bpf_object by opening the BPF ELF object file pointed to by the passed path and loading it into memory.

Definition

struct bpf_object * bpf_object__open_file(const char *path, const struct bpf_object_open_opts *opts);

Parameters

  • path: BPF object file path
  • opts: options for how to load the bpf object, this parameter is optional and can be set to NULL

Return

pointer to the new struct bpf_object; or NULL is returned on error, error code is stored in errno

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