Libbpf userspace function libbpf_probe_bpf_map_type
Detects if host kernel supports BPF maps of a given type.
Definition
int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts);
Parameters
map_type
: BPF map type to detect kernel support foropts
: reserved for future extensibility, should beNULL
Return
1
, if given map type is supported; 0
, if given map type is not supported; negative error code if feature detection failed or can't be performed
Usage
Make sure the process has required set of CAP_*
permissions (or runs as root) when performing feature checking.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome