eBPF for Windows
ebpf_windows.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation
2 // SPDX-License-Identifier: MIT
3 #pragma once
4 
5 #ifdef _MSC_VER
6 #include <guiddef.h>
7 #else
8 typedef uint8_t GUID[16];
9 #endif
10 
11 // This file contains eBPF definitions needed by eBPF programs as well as
12 // the verifier and execution context.
13 
14 #define EBPF_ROOT_REGISTRY_PATH L"\\Registry\\Machine\\Software\\eBPF"
15 #define EBPF_ROOT_RELATIVE_PATH L"Software\\eBPF"
16 #define EBPF_STORE_REGISTRY_PATH L"Software\\eBPF\\Providers"
17 
18 #define EBPF_PROVIDERS_REGISTRY_PATH L"Providers"
19 #define EBPF_SECTIONS_REGISTRY_PATH L"SectionData"
20 #define EBPF_PROGRAM_DATA_REGISTRY_PATH L"ProgramData"
21 #define EBPF_PROGRAM_DATA_HELPERS_REGISTRY_PATH L"Helpers"
22 #define EBPF_GLOBAL_HELPERS_REGISTRY_PATH L"GlobalHelpers"
23 
24 #define EBPF_SECTION_DATA_PROGRAM_TYPE L"ProgramType"
25 #define EBPF_SECTION_DATA_ATTACH_TYPE L"AttachType"
26 
27 #define EBPF_PROGRAM_DATA_NAME L"Name"
28 #define EBPF_PROGRAM_DATA_CONTEXT_DESCRIPTOR L"ContextDescriptor"
29 #define EBPF_PROGRAM_DATA_PLATFORM_SPECIFIC_DATA L"PlatformSpecificData"
30 #define EBPF_PROGRAM_DATA_PRIVELEGED L"IsPrivileged"
31 #define EBPF_PROGRAM_DATA_HELPER_COUNT L"HelperCount"
32 
33 #define EBPF_HELPER_DATA_PROTOTYPE L"Prototype"
34 
35 #define EBPF_DATA_BPF_PROG_TYPE L"BpfProgType"
36 #define EBPF_DATA_BPF_ATTACH_TYPE L"BpfAttachType"
37 
40 
42 {
_ebpf_helper_function
_ebpf_helper_function
Definition: ebpf_windows.h:41
EBPF_DELETE_ELEMENT
@ EBPF_DELETE_ELEMENT
Delete a map element.
Definition: ebpf_windows.h:45
EBPF_UPDATE_ELEMENT
@ EBPF_UPDATE_ELEMENT
Update map element.
Definition: ebpf_windows.h:44
GUID
uint8_t GUID[16]
Definition: ebpf_windows.h:8
EBPF_LOOKUP_ELEMENT
@ EBPF_LOOKUP_ELEMENT
Look up a map element.
Definition: ebpf_windows.h:43
ebpf_helper_function_t
enum _ebpf_helper_function ebpf_helper_function_t
ebpf_program_type_t
GUID ebpf_program_type_t
Definition: ebpf_windows.h:38
ebpf_attach_type_t
GUID ebpf_attach_type_t
Definition: ebpf_windows.h:39