18 #include "libbpf/src/libbpf_common.h"
19 #undef LIBBPF_DEPRECATED
20 #define LIBBPF_DEPRECATED(x)
29 #define __SIZEOF_SIZE_T__ 8
30 #define __SIZEOF_LONG_LONG__ 8
103 #pragma warning(push)
104 #pragma warning(disable : 4201)
This file contains eBPF definitions common to eBPF programs, core execution engine as well as eBPF AP...
bpf_prog_type
Definition: ebpf_structs.h:167
bpf_attach_type
Definition: ebpf_structs.h:257
bpf_map_type
Definition: ebpf_structs.h:18
int32_t __s32
Definition: bpf.h:32
uint32_t __u32
Definition: bpf.h:35
uint64_t u64
Definition: bpf.h:26
bpf_func_id
Definition: bpf.h:40
@ BPF_FUNC_ID_UNKNOWN
Definition: bpf.h:41
uint8_t __u8
Definition: bpf.h:34
uint32_t pid_t
Definition: bpf.h:37
uint8_t u8
Definition: bpf.h:24
bpf_cmd_id
Definition: bpf.h:50
@ BPF_MAP_LOOKUP_AND_DELETE_ELEM
Definition: bpf.h:66
@ BPF_PROG_RUN
Definition: bpf.h:72
@ BPF_MAP_CREATE
Definition: bpf.h:51
@ BPF_OBJ_GET
Definition: bpf.h:58
@ BPF_PROG_LOAD
Definition: bpf.h:56
@ BPF_PROG_DETACH
Definition: bpf.h:60
@ BPF_PROG_GET_NEXT_ID
Definition: bpf.h:61
@ BPF_PROG_ATTACH
Definition: bpf.h:59
@ BPF_OBJ_PIN
Definition: bpf.h:57
@ BPF_MAP_GET_FD_BY_ID
Definition: bpf.h:65
@ BPF_LINK_GET_NEXT_ID
Definition: bpf.h:63
@ BPF_LINK_DETACH
Definition: bpf.h:69
@ BPF_PROG_TEST_RUN
Definition: bpf.h:71
@ BPF_PROG_BIND_MAP
Definition: bpf.h:70
@ BPF_MAP_GET_NEXT_KEY
Definition: bpf.h:55
@ BPF_LINK_GET_FD_BY_ID
Definition: bpf.h:67
@ BPF_PROG_GET_FD_BY_ID
Definition: bpf.h:64
@ BPF_OBJ_GET_INFO_BY_FD
Definition: bpf.h:68
@ BPF_MAP_GET_NEXT_ID
Definition: bpf.h:62
@ BPF_MAP_UPDATE_ELEM
Definition: bpf.h:53
@ BPF_MAP_LOOKUP_ELEM
Definition: bpf.h:52
@ BPF_MAP_DELETE_ELEM
Definition: bpf.h:54
uint64_t __u64
Definition: bpf.h:36
int bpf(int cmd, union bpf_attr *attr, unsigned int size)
int32_t s32
Definition: bpf.h:23
bpf_stats_type
Definition: bpf.h:45
@ BPF_STATS_TYPE_UNKNOWN
Definition: bpf.h:46
uint32_t u32
Definition: bpf.h:25
Attributes used by BPF_LINK_DETACH.
Definition: bpf.h:90
uint32_t link_fd
File descriptor of link to detach.
Definition: bpf.h:91
Attributes used by BPF_OBJ_GET_INFO_BY_FD.
Definition: bpf.h:77
uint32_t info_len
On input, contains the maximum number of bytes to write into the info. On output, contains the actual...
Definition: bpf.h:85
uint32_t bpf_fd
File descriptor referring to an eBPF object.
Definition: bpf.h:78
uint64_t info
Pointer to memory in which to write the info obtained.
Definition: bpf.h:79
Attributes used by BPF_PROG_BIND_MAP.
Definition: bpf.h:96
uint32_t prog_fd
File descriptor of program to bind map to.
Definition: bpf.h:97
uint32_t map_fd
File descriptor of map to bind.
Definition: bpf.h:98
uint32_t flags
Flags affecting the bind operation.
Definition: bpf.h:99
Parameters used by the bpf() API.
Definition: bpf.h:108
uint32_t insn_cnt
Number of instructions in the array.
Definition: bpf.h:140
uint32_t map_id
ID of map for BPF_MAP_GET_FD_BY_ID to find.
Definition: bpf.h:176
uint32_t log_level
Logging level (currently ignored on Windows).
Definition: bpf.h:142
uint32_t next_id
On return, contains the next ID.
Definition: bpf.h:172
enum bpf_attach_type attach_type
Type of program to attach/detach to/from.
Definition: bpf.h:154
uint64_t pathname
Path name for pinning.
Definition: bpf.h:162
uint32_t data_size_out
Size in bytes of output data.
Definition: bpf.h:199
uint64_t data_out
Pointer to output data.
Definition: bpf.h:201
uint32_t log_size
Size in bytes of the log buffer.
Definition: bpf.h:144
struct bpf_attr::@40 test
Attributes used by BPF_PROG_TEST_RUN.
uint32_t bpf_fd
File descriptor referring to the program or map.
Definition: bpf.h:163
uint32_t prog_id
ID of program for BPF_PROG_GET_FD_BY_ID to find.
Definition: bpf.h:179
uint32_t repeat
Number of times to repeat the program.
Definition: bpf.h:202
bpf_link_detach_attr_t link_detach
Attributes used by BPF_LINK_DETACH.
Definition: bpf.h:188
uint32_t link_id
ID of link for BPF_LINK_GET_FD_BY_ID to find.
Definition: bpf.h:182
uint32_t start_id
ID to look for an ID after. The start_id need not exist.
Definition: bpf.h:171
uint32_t data_size_in
Size in bytes of input data.
Definition: bpf.h:198
uint64_t ctx_out
Pointer to output context.
Definition: bpf.h:207
uint64_t insns
Array of instructions.
Definition: bpf.h:139
bpf_prog_bind_map_attr_t prog_bind_map
Attributes used by BPF_PROG_BIND_MAP.
Definition: bpf.h:191
uint64_t key
Pointer to key to look up.
Definition: bpf.h:126
uint32_t retval
On return, contains the return value of the program.
Definition: bpf.h:197
uint32_t map_fd
File descriptor of map.
Definition: bpf.h:125
uint32_t duration
Duration in milliseconds to run the program.
Definition: bpf.h:203
uint64_t license
Optional pointer to a string specifying the license (currently ignored on Windows).
Definition: bpf.h:141
uint64_t log_buf
Pointer to a buffer in which log info can be written.
Definition: bpf.h:143
uint32_t key_size
Size in bytes of keys.
Definition: bpf.h:113
uint64_t next_key
Pointer to next key.
Definition: bpf.h:130
uint32_t attach_flags
Flags affecting the attach operation.
Definition: bpf.h:155
uint32_t value_size
Size in bytes of values.
Definition: bpf.h:114
uint64_t ctx_in
Pointer to input context.
Definition: bpf.h:206
uint32_t map_flags
Flags (currently 0).
Definition: bpf.h:116
bpf_obj_info_attr_t info
Attributes used by BPF_OBJ_GET_INFO_BY_FD.
Definition: bpf.h:185
uint64_t flags
Flags (currently 0).
Definition: bpf.h:132
uint32_t kern_version
Kernel version (currently ignored on Windows).
Definition: bpf.h:145
enum bpf_prog_type prog_type
Program type to use for loading the program.
Definition: bpf.h:138
uint64_t value
Pointer to value.
Definition: bpf.h:129
uint32_t ctx_size_out
Size in bytes of output context.
Definition: bpf.h:205
uint32_t target_fd
eBPF target to attach/detach to/from.
Definition: bpf.h:152
uint32_t prog_fd
File descriptor of program to run.
Definition: bpf.h:196
uint64_t data_in
Pointer to input data.
Definition: bpf.h:200
uint32_t cpu
CPU to run the program on.
Definition: bpf.h:209
enum bpf_map_type map_type
Type of map to create.
Definition: bpf.h:112
uint32_t max_entries
Maximum number of entries in the map.
Definition: bpf.h:115
uint32_t flags
Flags (currently 0).
Definition: bpf.h:208
uint32_t ctx_size_in
Size in bytes of input context.
Definition: bpf.h:204
uint32_t attach_bpf_fd
File descriptor of program to attach to.
Definition: bpf.h:153
uint32_t batch_size
Number of times to run the program in a batch.
Definition: bpf.h:210