Skip to content

Libbpf userspace function bpf_object__pin_maps

0.0.1

pins each map contained within the BPF object at the passed directory.

Definition

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

Parameters

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

Return

0, on success; negative error code, otherwise

Usage

If path is NULL, bpf_map__pin (which is being used on each map) will use the pin_path attribute of each map. In this case, maps that don't have a pin_path set will be ignored.

Example

Docs could be improved

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