Skip to content

Libbpf userspace function bpf_object__find_map_fd_by_name

0.0.2

Returns file descriptor of the BPF map of the given name, if it exists within the passed BPF object

Definition

int bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name);

Parameters

  • obj: BPF object
  • name: name of the BPF map

Return

File descriptor of the BPF map instance, if such map exists within the BPF object; or -1 otherwise.

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome