Libbpf userspace function bpf_link_update
Low level wrapper around the BPF_LINK_UPDATE syscall command.
Definition
int bpf_link_update(int link_fd, int new_prog_fd, const struct bpf_link_update_opts *opts);
Parameters
link_fd: file descriptor of the link to updatenew_prog_fd: file descriptor of the new program to attachopts: options for configuring the update
Return
0, on success; negative error code, otherwise
Usage
This function should only be used if you require specific control over this process. In most cases, the bpf_program__attach or specific bpf_program__attach_* functions should be used instead.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome