Libbpf userspace function bpf_program__set_flags
Set flags with which the BPF program will be loaded.
Definition
int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
Parameters
prog
: BPF program to set the flags forflags
: flags to set the BPF program to have
Return
error code; or 0
if no error. An error occurs if the object is already loaded.
Usage
This must be called before the BPF object is loaded, otherwise it has no effect and an error is returned.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome