Libbpf userspace function bpf_map_get_next_key
Low level wrapper around the BPF_MAP_GET_NEXT_KEY
syscall command.
Definition
int bpf_map_get_next_key(int fd, const void *key, void *next_key);
Parameters
fd
: file descriptor of the map to get the next key fromkey
: pointer to memory containing bytes of the key used for lookupnext_key
: pointer to memory in which the next key will be stored
Return
0
, on success; negative error, otherwise
Usage
This function should only be used if you need precise control over the map element lookup process. In most cases the bpf_map__get_next_key
function should be used instead.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome