Skip to content

Libbpf userspace function bpf_program__unpin

0.0.1

Unpins the BPF program from a file in the BPFFS specified by a path.

Definition

int bpf_program__unpin(struct bpf_program *prog, const char *path);

Parameters

  • prog: BPF program to unpin
  • path: file path to the pin in a BPF file system

Return

0, on success; negative error code, otherwise

Usage

Unpinning a program decrements the programs reference count. The file pinning the BPF program can also be unlinked by a different process in which case this function will return an error.

Example

Docs could be improved

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