Skip to content

Libbpf userspace function bpf_object__pin_programs

0.0.1

Pins each program contained within the BPF object at the passed directory.

Definition

int bpf_object__pin_programs(struct bpf_object *obj, const char *path);

Parameters

  • obj: Pointer to a valid BPF object
  • path: A directory where programs should be pinned.

Return

0, on success; negative error code, otherwise

Usage

Each program will be pinned in this directory, path must be set to a valid directory. The name of the pin-file will be the name of the program.

Example

Docs could be improved

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