Libbpf userspace function bpf_prog_query
Queries the BPF programs and BPF links which are attached to target
which can represent a file descriptor or netdevice ifindex.
Definition
int bpf_prog_query(int target_fd, enum bpf_attach_type type, __u32 query_flags, __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt);
Parameters
target
: query location file descriptor or ifindextype
: attach type for the BPF program
Return
0
, on success; negative error code, otherwise (errno
is also set to the error code)
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome