Skip to content

Libbpf userspace function bpf_object__pin

0.0.1

Pin all maps and programs contained within the BPF object to the passed directory.

Definition

int bpf_object__pin(struct bpf_object *object, 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

Calls both bpf_object__pin_maps and bpf_object__pin_programs with the same path argument.

Example

Docs could be improved

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