Libbpf userspace function bpf_map__initial_value
Get the initial value of a BPF map.
Definition
void *bpf_map__initial_value(const struct bpf_map *map, size_t *psize);
Parameters
map
: Pointer to the BPF map.psize
: Pointer to the size of the initial value.
Return
Pointer to the initial value of the BPF map. NULL
on error.
Usage
Libbpf automatically creates array maps for certain ELF sections in which global variables are stored. This function allows you to get the initial value of these maps and arena maps.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome