Libbpf userspace function bpf_obj_get_info_by_fd
Low level wrapper around the BPF_OBJ_GET_INFO_BY_FD
syscall command.
Definition
int bpf_obj_get_info_by_fd(int bpf_fd, void *info, __u32 *info_len);
Parameters
bpf_fd
: file descriptor of the BPF objectinfo
: buffer to store the information about the BPF objectinfo_len
: size of theinfo
buffer
Return
>0
, amount of information written to the info
buffer; negative error code, otherwise
Usage
This function allows you to retrieve information about a BPF object by its file descriptor. The information will be written to info
, the structure of the info depends on the underlying object type.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome