#include "ebpf_structs.h"
#include <intrin.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
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 | _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 | _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...
|
|
|
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. More...
|
|
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. More...
|
|
typedef struct _program_entry | program_entry_t |
| Program entry. This structure contains the address of the program and additional information about the program. More...
|
|
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. More...
|
|
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. More...
|
|
|
uint16_t | swap16 (uint16_t value) |
| Inline function used to implement the 16 bit EBPF_OP_LE/EBPF_OP_BE instruction. More...
|
|
uint32_t | swap32 (uint32_t value) |
| Inline function used to implement the 32 bit EBPF_OP_LE/EBPF_OP_BE instruction. More...
|
|
uint64_t | swap64 (uint64_t value) |
| Inline function used to implement the 64 bit EBPF_OP_LE/EBPF_OP_BE instruction. More...
|
|
◆ htobe16
#define htobe16 |
( |
|
X | ) |
swap16(X) |
◆ htobe32
#define htobe32 |
( |
|
X | ) |
swap32(X) |
◆ htobe64
#define htobe64 |
( |
|
X | ) |
swap64(X) |
◆ htole16
◆ htole32
◆ htole64
◆ IMMEDIATE
#define IMMEDIATE |
( |
|
X | ) |
(int32_t) X |
◆ OFFSET
#define OFFSET |
( |
|
X | ) |
(int16_t) X |
◆ POINTER
#define POINTER |
( |
|
X | ) |
(uint64_t)(X) |
◆ UBPF_STACK_SIZE
#define UBPF_STACK_SIZE 512 |
◆ 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.
◆ 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.
◆ 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.
◆ 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.
◆ program_entry_t
Program entry. This structure contains the address of the program and additional information about the program.
◆ swap16()
uint16_t swap16 |
( |
uint16_t |
value | ) |
|
|
inline |
Inline function used to implement the 16 bit EBPF_OP_LE/EBPF_OP_BE instruction.
- Parameters
-
[in] | value | The value to swap. |
- Returns
- The swapped value.
◆ swap32()
uint32_t swap32 |
( |
uint32_t |
value | ) |
|
|
inline |
Inline function used to implement the 32 bit EBPF_OP_LE/EBPF_OP_BE instruction.
- Parameters
-
[in] | value | The value to swap. |
- Returns
- The swapped value.
◆ swap64()
uint64_t swap64 |
( |
uint64_t |
value | ) |
|
|
inline |
Inline function used to implement the 64 bit EBPF_OP_LE/EBPF_OP_BE instruction.
- Parameters
-
[in] | value | The value to swap. |
- Returns
- The swapped value.