Libbpf userspace function bpf_map_lookup_and_delete_elem_flags
Low level wrapper around the BPF_MAP_LOOKUP_AND_DELETE_ELEM
syscall command.
Definition
int bpf_map_lookup_and_delete_elem_flags(int fd, const void *key, void *value, __u64 flags);
Parameters
fd
: file descriptor of the map to lookup element inkey
: pointer to memory containing bytes of the key used for lookupvalue
: pointer to memory in which looked up value will be storedflags
: flags passed to kernel for this operation
Return
0
, on success; negative error, otherwise
Usage
This function should only be used if you need precise control over the map element lookup and delete process. In most cases the bpf_map__lookup_and_delete_elem
function should be used instead.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome