87 const struct bpf_map_create_opts* opts);
226 const struct bpf_map_batch_opts* opts);
257 const struct bpf_map_batch_opts* opts);
443 const char* prog_name,
445 const struct bpf_insn* insns,
447 const struct bpf_prog_load_opts* opts);
452 #pragma warning(push)
454 #include "libbpf/src/bpf.h"
int bpf_map_get_next_key(int fd, const void *key, void *next_key)
Look up an element by key in a map and get the next key. If the specific key is not found,...
int bpf_prog_get_next_id(__u32 start_id, __u32 *next_id)
Look for the next program ID greater than a given ID.
int bpf_map_get_next_id(__u32 start_id, __u32 *next_id)
Look for the next map ID greater than a given ID.
int bpf_map_lookup_and_delete_batch(int fd, void *in_batch, void *out_batch, void *keys, void *values, __u32 *count, const struct bpf_map_batch_opts *opts)
bpf_map_lookup_and_delete_batch() allows for batch lookup and deletion of BPF map elements where each...
int bpf_link_get_next_id(__u32 start_id, __u32 *next_id)
Look for the next link ID greater than a given ID.
int bpf_obj_get_info_by_fd(int bpf_fd, void *info, __u32 *info_len)
Obtain information about the eBPF object referred to by bpf_fd. This function populates up to info_le...
int bpf_obj_get(const char *pathname)
Get a file descriptor for a pinned object by pin path.
int bpf_map_update_batch(int fd, const void *keys, const void *values, __u32 *count, const struct bpf_map_batch_opts *opts)
bpf_map_update_batch() updates multiple elements in a map by specifying keys and their corresponding ...
int bpf_map_create(enum bpf_map_type map_type, const char *map_name, __u32 key_size, __u32 value_size, __u32 max_entries, const struct bpf_map_create_opts *opts)
Create a new map.
int bpf_map_lookup_elem(int fd, const void *key, void *value)
Look up an element by key in a specified map and return its value.
int bpf_link_detach(int link_fd)
Detach a link.
int bpf_map_get_fd_by_id(__u32 id)
Get a file descriptor referring to a map with a given ID.
int bpf_obj_pin(int fd, const char *pathname)
Pin an eBPF program or map referred to by fd to the provided pathname.
int bpf_prog_bind_map(int prog_fd, int map_fd, const struct bpf_prog_bind_opts *opts)
Bind a map to a program so that it holds a reference on the map.
int bpf_link_get_fd_by_id(__u32 id)
Get a file descriptor referring to a link with a given ID.
int bpf_prog_load(enum bpf_prog_type prog_type, const char *prog_name, const char *license, const struct bpf_insn *insns, size_t insn_cnt, const struct bpf_prog_load_opts *opts)
Load (but do not attach) an eBPF programs.
int bpf_map_update_elem(int fd, const void *key, const void *value, __u64 flags)
Create or update an element (key/value pair) in a specified map.
int bpf_map_delete_elem(int fd, const void *key)
Look up and delete an element by key in a specified map.
int bpf_map_delete_batch(int fd, const void *keys, __u32 *count, const struct bpf_map_batch_opts *opts)
bpf_map_delete_batch() allows for batch deletion of multiple elements in a BPF map.
int bpf_map_lookup_batch(int fd, void *in_batch, void *out_batch, void *keys, void *values, __u32 *count, const struct bpf_map_batch_opts *opts)
bpf_map_lookup_batch() allows for batch lookup of BPF map elements.
int bpf_prog_get_fd_by_id(__u32 id)
Get a file descriptor referring to a program with a given ID.
bpf_prog_type
Definition: ebpf_structs.h:173
bpf_map_type
Definition: ebpf_structs.h:18
uint32_t __u32
Definition: types.h:6
uint64_t __u64
Definition: types.h:7