Skip to content

Libbpf userspace function bpf_link__update_program

0.0.8

Updates the BPF program associated with a BPF link.

Definition

int bpf_link__update_program(struct bpf_link *link, struct bpf_program *prog);

Parameters

  • link: BPF link to update
  • prog: BPF program to associate with the link

Return

0, on success; negative error code, otherwise

Usage

This functions allows you to swap out the existing program associated with a BPF link with a new one. For cases where you do not want to miss any events that might occur between removing and re-creating a link.

Example

Docs could be improved

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