Libbpf userspace function bpf_program__set_autoload
Changes the auto-load status of a BPF program.
Definition
int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
Parameters
prog: The BPF program.autoload: The new autoload status.
Returns
0 on success, or a negative error code on failure.
Usage
This method changes the auto-load status of a BPF program. If autoload is true, the program will be loaded when the object is loaded.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome