Skip to content

Libbpf userspace function bpf_link__unpin

0.0.8

Unpins the BPF link from a file in the BPFFS specified by a path. This decrements the links reference count.

Definition

int bpf_link__unpin(struct bpf_link *link);

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

The file pinning the BPF link 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