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 #if !defined(NO_CRT)
9 #include <stdint.h>
10 #else
11 typedef unsigned char uint8_t;
12 #endif
13 typedef uint8_t GUID[16];
14 #endif
15 
16 // This file contains eBPF definitions needed by eBPF programs as well as
17 // the verifier and execution context.
18 
19 #define EBPF_ROOT_REGISTRY_PATH L"\\Registry\\Machine\\Software\\eBPF"
20 #define EBPF_ROOT_RELATIVE_PATH L"Software\\eBPF"
21 #define EBPF_STORE_REGISTRY_PATH L"Software\\eBPF\\Providers"
22 
23 #define EBPF_PROVIDERS_REGISTRY_PATH L"Providers"
24 #define EBPF_SECTIONS_REGISTRY_PATH L"SectionData"
25 #define EBPF_PROGRAM_DATA_REGISTRY_PATH L"ProgramData"
26 #define EBPF_PROGRAM_DATA_HELPERS_REGISTRY_PATH L"Helpers"
27 #define EBPF_GLOBAL_HELPERS_REGISTRY_PATH L"GlobalHelpers"
28 
29 #define EBPF_SECTION_DATA_PROGRAM_TYPE L"ProgramType"
30 #define EBPF_SECTION_DATA_ATTACH_TYPE L"AttachType"
31 
32 #define EBPF_PROGRAM_DATA_NAME L"Name"
33 #define EBPF_PROGRAM_DATA_CONTEXT_DESCRIPTOR L"ContextDescriptor"
34 #define EBPF_PROGRAM_DATA_PLATFORM_SPECIFIC_DATA L"PlatformSpecificData"
35 #define EBPF_PROGRAM_DATA_PRIVILEGED L"IsPrivileged"
36 #define EBPF_PROGRAM_DATA_HELPER_COUNT L"HelperCount"
37 
38 #define EBPF_HELPER_DATA_PROTOTYPE L"Prototype"
39 
40 #define EBPF_DATA_BPF_PROG_TYPE L"BpfProgType"
41 #define EBPF_DATA_BPF_ATTACH_TYPE L"BpfAttachType"
42 
45 
47 {
GUID ebpf_attach_type_t
Definition: ebpf_windows.h:44
_ebpf_helper_function
Definition: ebpf_windows.h:47
@ EBPF_LOOKUP_ELEMENT
Look up a map element.
Definition: ebpf_windows.h:48
@ EBPF_DELETE_ELEMENT
Delete a map element.
Definition: ebpf_windows.h:50
@ EBPF_UPDATE_ELEMENT
Update map element.
Definition: ebpf_windows.h:49
GUID ebpf_program_type_t
Definition: ebpf_windows.h:43
uint8_t GUID[16]
Definition: ebpf_windows.h:13
enum _ebpf_helper_function ebpf_helper_function_t