Interacting With Maps
Table of Contents Interacting with eBPF maps happens through lookup/update/delete primitives. Userspace The userspace API map helpers for eBPF are defined in tools/lib/bpf/bpf.h and include the following functions: /* Userspace helpers */ int bpf_map_lookup_elem(int fd, void *key, void *value); int bpf_map_update_elem(int fd, void *key, void *value, __u64 flags); int bpf_map_delete_elem(int fd, void *key); /* Only userspace: */ int bpf_map_get_next_key(int …