eBPF for Windows
|
Parameters used by the bpf() API. More...
#include <bpf.h>
Data Fields | |
struct { | |
enum bpf_map_type map_type | |
Type of map to create. More... | |
uint32_t key_size | |
Size in bytes of keys. More... | |
uint32_t value_size | |
Size in bytes of values. More... | |
uint32_t max_entries | |
Maximum number of entries in the map. More... | |
uint32_t map_flags | |
Flags (currently 0). More... | |
}; | |
Attributes used by BPF_MAP_CREATE. More... | |
struct { | |
uint32_t map_fd | |
File descriptor of map. More... | |
uint64_t key | |
Pointer to key to look up. More... | |
union { | |
uint64_t value | |
Pointer to value. More... | |
uint64_t next_key | |
Pointer to next key. More... | |
} | |
uint64_t flags | |
Flags (currently 0). More... | |
}; | |
Attributes used by BPF_MAP_LOOKUP_ELEM, BPF_MAP_UPDATE_ELEM, BPF_MAP_DELETE_ELEM, and BPF_MAP_GET_NEXT_KEY. More... | |
struct { | |
enum bpf_prog_type prog_type | |
Program type to use for loading the program. More... | |
uint64_t insns | |
Array of instructions. More... | |
uint32_t insn_cnt | |
Number of instructions in the array. More... | |
uint64_t license | |
Optional pointer to a string specifying the license (currently ignored on Windows). More... | |
uint32_t log_level | |
Logging level (currently ignored on Windows). More... | |
uint64_t log_buf | |
Pointer to a buffer in which log info can be written. More... | |
uint32_t log_size | |
Size in bytes of the log buffer. More... | |
uint32_t kern_version | |
Kernel version (currently ignored on Windows). More... | |
}; | |
Attributes used by BPF_PROG_LOAD. More... | |
struct { | |
uint32_t target_fd | |
eBPF target to attach/detach to/from. More... | |
uint32_t attach_bpf_fd | |
File descriptor of program to attach to. More... | |
enum bpf_attach_type attach_type | |
Type of program to attach/detach to/from. More... | |
uint32_t attach_flags | |
Flags affecting the attach operation. More... | |
}; | |
Attributes used by BPF_PROG_ATTACH/DETACH. More... | |
struct { | |
uint64_t pathname | |
Path name for pinning. More... | |
uint32_t bpf_fd | |
File descriptor referring to the program or map. More... | |
}; | |
Attributes used by BPF_OBJ_PIN and BPF_OBJ_GET. More... | |
struct { | |
uint32_t start_id | |
ID to look for an ID after. The start_id need not exist. More... | |
uint32_t next_id | |
On return, contains the next ID. More... | |
}; | |
Attributes used by BPF_PROG_GET_NEXT_ID, BPF_MAP_GET_NEXT_ID, and BPF_LINK_GET_NEXT_ID. More... | |
uint32_t | map_id |
ID of map for BPF_MAP_GET_FD_BY_ID to find. More... | |
uint32_t | prog_id |
ID of program for BPF_PROG_GET_FD_BY_ID to find. More... | |
uint32_t | link_id |
ID of link for BPF_LINK_GET_FD_BY_ID to find. More... | |
bpf_obj_info_attr_t | info |
Attributes used by BPF_OBJ_GET_INFO_BY_FD. More... | |
bpf_link_detach_attr_t | link_detach |
Attributes used by BPF_LINK_DETACH. More... | |
bpf_prog_bind_map_attr_t | prog_bind_map |
Attributes used by BPF_PROG_BIND_MAP. More... | |
struct { | |
uint32_t prog_fd | |
File descriptor of program to run. More... | |
uint32_t retval | |
On return, contains the return value of the program. More... | |
uint32_t data_size_in | |
Size in bytes of input data. More... | |
uint32_t data_size_out | |
Size in bytes of output data. More... | |
uint64_t data_in | |
Pointer to input data. More... | |
uint64_t data_out | |
Pointer to output data. More... | |
uint32_t repeat | |
Number of times to repeat the program. More... | |
uint32_t duration | |
Duration in milliseconds to run the program. More... | |
uint32_t ctx_size_in | |
Size in bytes of input context. More... | |
uint32_t ctx_size_out | |
Size in bytes of output context. More... | |
uint64_t ctx_in | |
Pointer to input context. More... | |
uint64_t ctx_out | |
Pointer to output context. More... | |
uint32_t flags | |
Flags (currently 0). More... | |
uint32_t cpu | |
CPU to run the program on. More... | |
uint32_t batch_size | |
Number of times to run the program in a batch. More... | |
} | test |
Attributes used by BPF_PROG_TEST_RUN. More... | |
Parameters used by the bpf() API.
struct { ... } |
Attributes used by BPF_MAP_CREATE.
struct { ... } |
Attributes used by BPF_MAP_LOOKUP_ELEM, BPF_MAP_UPDATE_ELEM, BPF_MAP_DELETE_ELEM, and BPF_MAP_GET_NEXT_KEY.
struct { ... } |
Attributes used by BPF_PROG_LOAD.
struct { ... } |
Attributes used by BPF_PROG_ATTACH/DETACH.
struct { ... } |
Attributes used by BPF_OBJ_PIN and BPF_OBJ_GET.
struct { ... } |
Attributes used by BPF_PROG_GET_NEXT_ID, BPF_MAP_GET_NEXT_ID, and BPF_LINK_GET_NEXT_ID.
uint32_t bpf_attr::attach_bpf_fd |
File descriptor of program to attach to.
uint32_t bpf_attr::attach_flags |
Flags affecting the attach operation.
enum bpf_attach_type bpf_attr::attach_type |
Type of program to attach/detach to/from.
uint32_t bpf_attr::batch_size |
Number of times to run the program in a batch.
uint32_t bpf_attr::bpf_fd |
File descriptor referring to the program or map.
uint32_t bpf_attr::cpu |
CPU to run the program on.
uint64_t bpf_attr::ctx_in |
Pointer to input context.
uint64_t bpf_attr::ctx_out |
Pointer to output context.
uint32_t bpf_attr::ctx_size_in |
Size in bytes of input context.
uint32_t bpf_attr::ctx_size_out |
Size in bytes of output context.
uint64_t bpf_attr::data_in |
Pointer to input data.
uint64_t bpf_attr::data_out |
Pointer to output data.
uint32_t bpf_attr::data_size_in |
Size in bytes of input data.
uint32_t bpf_attr::data_size_out |
Size in bytes of output data.
uint32_t bpf_attr::duration |
Duration in milliseconds to run the program.
uint64_t bpf_attr::flags |
Flags (currently 0).
uint32_t bpf_attr::flags |
Flags (currently 0).
bpf_obj_info_attr_t bpf_attr::info |
Attributes used by BPF_OBJ_GET_INFO_BY_FD.
uint32_t bpf_attr::insn_cnt |
Number of instructions in the array.
uint64_t bpf_attr::insns |
Array of instructions.
uint32_t bpf_attr::kern_version |
Kernel version (currently ignored on Windows).
uint64_t bpf_attr::key |
Pointer to key to look up.
uint32_t bpf_attr::key_size |
Size in bytes of keys.
uint64_t bpf_attr::license |
Optional pointer to a string specifying the license (currently ignored on Windows).
bpf_link_detach_attr_t bpf_attr::link_detach |
Attributes used by BPF_LINK_DETACH.
uint32_t bpf_attr::link_id |
ID of link for BPF_LINK_GET_FD_BY_ID to find.
uint64_t bpf_attr::log_buf |
Pointer to a buffer in which log info can be written.
uint32_t bpf_attr::log_level |
Logging level (currently ignored on Windows).
uint32_t bpf_attr::log_size |
Size in bytes of the log buffer.
uint32_t bpf_attr::map_fd |
File descriptor of map.
uint32_t bpf_attr::map_flags |
Flags (currently 0).
uint32_t bpf_attr::map_id |
ID of map for BPF_MAP_GET_FD_BY_ID to find.
enum bpf_map_type bpf_attr::map_type |
Type of map to create.
uint32_t bpf_attr::max_entries |
Maximum number of entries in the map.
uint32_t bpf_attr::next_id |
On return, contains the next ID.
uint64_t bpf_attr::next_key |
Pointer to next key.
uint64_t bpf_attr::pathname |
Path name for pinning.
bpf_prog_bind_map_attr_t bpf_attr::prog_bind_map |
Attributes used by BPF_PROG_BIND_MAP.
uint32_t bpf_attr::prog_fd |
File descriptor of program to run.
uint32_t bpf_attr::prog_id |
ID of program for BPF_PROG_GET_FD_BY_ID to find.
enum bpf_prog_type bpf_attr::prog_type |
Program type to use for loading the program.
uint32_t bpf_attr::repeat |
Number of times to repeat the program.
uint32_t bpf_attr::retval |
On return, contains the return value of the program.
uint32_t bpf_attr::start_id |
ID to look for an ID after. The start_id need not exist.
uint32_t bpf_attr::target_fd |
eBPF target to attach/detach to/from.
struct { ... } bpf_attr::test |
Attributes used by BPF_PROG_TEST_RUN.
uint64_t bpf_attr::value |
Pointer to value.
uint32_t bpf_attr::value_size |
Size in bytes of values.