eBPF for Windows
|
Go to the source code of this file.
Data Structures | |
struct | _helper_function_entry |
Helper function entry. This structure defines a helper function entry in the metadata table. The address of the helper function is written into the entry during load time. The helper_id and name are used to identify the helper function to bind to when the program is loaded. More... | |
struct | _helper_function_data |
struct | _map_entry |
Map entry. This structure contains the address of the map and the map definition. The address is written into the entry during load time. The map definition is used to initialize the map when the program is loaded. More... | |
struct | _map_data |
struct | _map_initial_values |
Map initial values. This structure contains the initial values for a map. The values are used to initialize the map when the program is loaded. Values are specified as strings and are converted to the appropriate type based on the map definition. Only BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_PROG_ARRAY map types are supported. More... | |
struct | _global_variable_section_info |
struct | _global_variable_section_data |
struct | _program_runtime_context |
struct | _program_entry |
Program entry. This structure contains the address of the program and additional information about the program. More... | |
struct | _bpf2c_version |
Version information for the bpf2c compiler. This structure contains the version information for the bpf2c compiler that generated the module. It can be used to determine if the module is compatible with the current version of the eBPF for Windows runtime. More... | |
struct | _metadata_table |
Metadata table for a module. This structure is returned by the module's metadata function, get_metadata_table and contains information about the module including the list of programs and maps. More... | |
Typedefs | |
typedef uint64_t(* | helper_function_t) (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, void *) |
typedef struct _helper_function_entry | helper_function_entry_t |
Helper function entry. This structure defines a helper function entry in the metadata table. The address of the helper function is written into the entry during load time. The helper_id and name are used to identify the helper function to bind to when the program is loaded. | |
typedef struct _helper_function_data | helper_function_data_t |
typedef struct _map_entry | map_entry_t |
Map entry. This structure contains the address of the map and the map definition. The address is written into the entry during load time. The map definition is used to initialize the map when the program is loaded. | |
typedef struct _map_data | map_data_t |
typedef struct _map_initial_values | map_initial_values_t |
Map initial values. This structure contains the initial values for a map. The values are used to initialize the map when the program is loaded. Values are specified as strings and are converted to the appropriate type based on the map definition. Only BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_PROG_ARRAY map types are supported. | |
typedef struct _global_variable_section_info | global_variable_section_info_t |
typedef struct _global_variable_section_data | global_variable_section_data_t |
typedef struct _program_runtime_context | program_runtime_context_t |
typedef struct _program_entry | program_entry_t |
Program entry. This structure contains the address of the program and additional information about the program. | |
typedef struct _bpf2c_version | bpf2c_version_t |
Version information for the bpf2c compiler. This structure contains the version information for the bpf2c compiler that generated the module. It can be used to determine if the module is compatible with the current version of the eBPF for Windows runtime. | |
typedef struct _metadata_table | metadata_table_t |
Metadata table for a module. This structure is returned by the module's metadata function, get_metadata_table and contains information about the module including the list of programs and maps. | |
Functions | |
uint16_t | swap16 (uint16_t value) |
Inline function used to implement the 16 bit EBPF_OP_LE/EBPF_OP_BE instruction. | |
uint32_t | swap32 (uint32_t value) |
Inline function used to implement the 32 bit EBPF_OP_LE/EBPF_OP_BE instruction. | |
uint64_t | swap64 (uint64_t value) |
Inline function used to implement the 64 bit EBPF_OP_LE/EBPF_OP_BE instruction. | |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_DATA_CURRENT_VERSION 1 |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_DATA_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(global_variable_section_data_t, address_of_map_value) |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_DATA_CURRENT_VERSION_TOTAL_SIZE sizeof(global_variable_section_data_t) |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_DATA_HEADER |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_INFO_CURRENT_VERSION 1 |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_INFO_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(global_variable_section_info_t, initial_data) |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_INFO_CURRENT_VERSION_TOTAL_SIZE sizeof(global_variable_section_info_t) |
#define EBPF_NATIVE_GLOBAL_VARIABLE_SECTION_INFO_HEADER |
#define EBPF_NATIVE_HELPER_FUNCTION_DATA_CURRENT_VERSION 1 |
#define EBPF_NATIVE_HELPER_FUNCTION_DATA_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(helper_function_data_t, tail_call) |
#define EBPF_NATIVE_HELPER_FUNCTION_DATA_CURRENT_VERSION_TOTAL_SIZE sizeof(helper_function_data_t) |
#define EBPF_NATIVE_HELPER_FUNCTION_DATA_HEADER |
#define EBPF_NATIVE_HELPER_FUNCTION_ENTRY_CURRENT_VERSION 1 |
#define EBPF_NATIVE_HELPER_FUNCTION_ENTRY_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(helper_function_entry_t, name) |
#define EBPF_NATIVE_HELPER_FUNCTION_ENTRY_CURRENT_VERSION_TOTAL_SIZE sizeof(helper_function_entry_t) |
#define EBPF_NATIVE_HELPER_FUNCTION_ENTRY_HEADER |
#define EBPF_NATIVE_MAP_DATA_CURRENT_VERSION 1 |
#define EBPF_NATIVE_MAP_DATA_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(map_data_t, address) |
#define EBPF_NATIVE_MAP_DATA_CURRENT_VERSION_TOTAL_SIZE sizeof(map_data_t) |
#define EBPF_NATIVE_MAP_DATA_HEADER |
#define EBPF_NATIVE_MAP_ENTRY_CURRENT_VERSION 1 |
#define EBPF_NATIVE_MAP_ENTRY_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(map_entry_t, name) |
#define EBPF_NATIVE_MAP_ENTRY_CURRENT_VERSION_TOTAL_SIZE sizeof(map_entry_t) |
#define EBPF_NATIVE_MAP_ENTRY_HEADER |
#define EBPF_NATIVE_MAP_INITIAL_VALUES_CURRENT_VERSION 1 |
#define EBPF_NATIVE_MAP_INITIAL_VALUES_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(map_initial_values_t, values) |
#define EBPF_NATIVE_MAP_INITIAL_VALUES_CURRENT_VERSION_TOTAL_SIZE sizeof(map_initial_values_t) |
#define EBPF_NATIVE_MAP_INITIAL_VALUES_HEADER |
#define EBPF_NATIVE_METADATA_TABLE_CURRENT_VERSION 1 |
#define EBPF_NATIVE_METADATA_TABLE_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(metadata_table_t, map_initial_values) |
#define EBPF_NATIVE_METADATA_TABLE_CURRENT_VERSION_TOTAL_SIZE sizeof(metadata_table_t) |
#define EBPF_NATIVE_METADATA_TABLE_HEADER |
#define EBPF_NATIVE_PROGRAM_ENTRY_CURRENT_VERSION 1 |
#define EBPF_NATIVE_PROGRAM_ENTRY_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(program_entry_t, program_info_hash_type) |
#define EBPF_NATIVE_PROGRAM_ENTRY_CURRENT_VERSION_TOTAL_SIZE sizeof(program_entry_t) |
#define EBPF_NATIVE_PROGRAM_ENTRY_HEADER |
#define EBPF_NATIVE_PROGRAM_RUNTIME_CONTEXT_CURRENT_VERSION 1 |
#define EBPF_NATIVE_PROGRAM_RUNTIME_CONTEXT_CURRENT_VERSION_SIZE EBPF_SIZE_INCLUDING_FIELD(program_runtime_context_t, map_data) |
#define EBPF_NATIVE_PROGRAM_RUNTIME_CONTEXT_CURRENT_VERSION_TOTAL_SIZE sizeof(program_runtime_context_t) |
#define EBPF_NATIVE_PROGRAM_RUNTIME_CONTEXT_HEADER |
#define htobe16 | ( | X | ) | swap16(X) |
#define htobe32 | ( | X | ) | swap32(X) |
#define htobe64 | ( | X | ) | swap64(X) |
#define htole16 | ( | X | ) | (X) |
#define htole32 | ( | X | ) | (X) |
#define htole64 | ( | X | ) | (X) |
#define IMMEDIATE | ( | X | ) | (int32_t) X |
#define OFFSET | ( | X | ) | (int16_t) X |
#define POINTER | ( | X | ) | (uint64_t)(X) |
#define UBPF_STACK_SIZE 512 |
#define UNREFERENCED_PARAMETER | ( | P | ) | (P) |
typedef struct _bpf2c_version bpf2c_version_t |
Version information for the bpf2c compiler. This structure contains the version information for the bpf2c compiler that generated the module. It can be used to determine if the module is compatible with the current version of the eBPF for Windows runtime.
typedef struct _global_variable_section_data global_variable_section_data_t |
typedef struct _global_variable_section_info global_variable_section_info_t |
typedef struct _helper_function_data helper_function_data_t |
typedef struct _helper_function_entry helper_function_entry_t |
Helper function entry. This structure defines a helper function entry in the metadata table. The address of the helper function is written into the entry during load time. The helper_id and name are used to identify the helper function to bind to when the program is loaded.
typedef uint64_t(* helper_function_t) (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, void *) |
typedef struct _map_data map_data_t |
typedef struct _map_entry map_entry_t |
Map entry. This structure contains the address of the map and the map definition. The address is written into the entry during load time. The map definition is used to initialize the map when the program is loaded.
typedef struct _map_initial_values map_initial_values_t |
Map initial values. This structure contains the initial values for a map. The values are used to initialize the map when the program is loaded. Values are specified as strings and are converted to the appropriate type based on the map definition. Only BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_PROG_ARRAY map types are supported.
typedef struct _metadata_table metadata_table_t |
Metadata table for a module. This structure is returned by the module's metadata function, get_metadata_table and contains information about the module including the list of programs and maps.
typedef struct _program_entry program_entry_t |
Program entry. This structure contains the address of the program and additional information about the program.
typedef struct _program_runtime_context program_runtime_context_t |
|
inline |
Inline function used to implement the 16 bit EBPF_OP_LE/EBPF_OP_BE instruction.
[in] | value | The value to swap. |
|
inline |
Inline function used to implement the 32 bit EBPF_OP_LE/EBPF_OP_BE instruction.
[in] | value | The value to swap. |
|
inline |
Inline function used to implement the 64 bit EBPF_OP_LE/EBPF_OP_BE instruction.
[in] | value | The value to swap. |