eBPF for Windows
ebpf_result.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Microsoft Corporation
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #pragma once
7 
8 #include <sal.h>
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
15 #pragma warning(disable : 26812) // Prefer enum class
16  typedef _Return_type_success_(return == EBPF_SUCCESS) enum ebpf_result {
18  EBPF_SUCCESS, // = 0
19 
22 
25 
28 
31 
34 
37 
40 
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
94 
97 
100 
103 
106 
108  EBPF_CANCELED, // = 30
109  } ebpf_result_t;
110 
111 #define EBPF_RESULT_COUNT (EBPF_CANCELED + 1)
112 
113 #ifdef __cplusplus
114 }
115 #endif
EBPF_JIT_COMPILATION_FAILED
@ EBPF_JIT_COMPILATION_FAILED
JIT compilation failed.
Definition: ebpf_result.h:24
EBPF_NO_MORE_TAIL_CALLS
@ EBPF_NO_MORE_TAIL_CALLS
Caller has reached tail call limit.
Definition: ebpf_result.h:99
EBPF_BLOCKED_BY_POLICY
@ EBPF_BLOCKED_BY_POLICY
The operation was blocked for all requesters by policy.
Definition: ebpf_result.h:81
EBPF_INVALID_ARGUMENT
@ EBPF_INVALID_ARGUMENT
An invalid argument was supplied.
Definition: ebpf_result.h:36
EBPF_INVALID_FD
@ EBPF_INVALID_FD
Invalid FD provided.
Definition: ebpf_result.h:30
EBPF_SUCCESS
@ EBPF_SUCCESS
The operation was successful.
Definition: ebpf_result.h:18
EBPF_ACCESS_DENIED
@ EBPF_ACCESS_DENIED
Access was denied for the requested operation.
Definition: ebpf_result.h:78
EBPF_PROGRAM_TOO_LARGE
@ EBPF_PROGRAM_TOO_LARGE
The program is too large.
Definition: ebpf_result.h:57
EBPF_OBJECT_NOT_FOUND
@ EBPF_OBJECT_NOT_FOUND
No pinned map or program exists for the path provided.
Definition: ebpf_result.h:39
EBPF_ARITHMETIC_OVERFLOW
@ EBPF_ARITHMETIC_OVERFLOW
Arithmetic overflow occurred.
Definition: ebpf_result.h:84
EBPF_INSUFFICIENT_BUFFER
@ EBPF_INSUFFICIENT_BUFFER
A buffer of insufficient size was supplied.
Definition: ebpf_result.h:90
EBPF_OPERATION_NOT_SUPPORTED
@ EBPF_OPERATION_NOT_SUPPORTED
Operation is not supported.
Definition: ebpf_result.h:72
EBPF_OUT_OF_SPACE
@ EBPF_OUT_OF_SPACE
The container can not hold additional elements.
Definition: ebpf_result.h:105
EBPF_ALREADY_INITIALIZED
@ EBPF_ALREADY_INITIALIZED
The handle was already initialized.
Definition: ebpf_result.h:63
EBPF_NOT_PINNED
@ EBPF_NOT_PINNED
The program or map is not pinned.
Definition: ebpf_result.h:51
EBPF_NO_MEMORY
@ EBPF_NO_MEMORY
Low memory.
Definition: ebpf_result.h:54
EBPF_PENDING
@ EBPF_PENDING
Requested action is still pending.
Definition: ebpf_result.h:102
EBPF_CANCELED
@ EBPF_CANCELED
Operation was canceled.
Definition: ebpf_result.h:108
EBPF_ELF_PARSING_FAILED
@ EBPF_ELF_PARSING_FAILED
A failure occurred in parsing the ELF file.
Definition: ebpf_result.h:66
EBPF_VERIFICATION_FAILED
@ EBPF_VERIFICATION_FAILED
Program verification failed.
Definition: ebpf_result.h:21
EBPF_NO_MORE_KEYS
@ EBPF_NO_MORE_KEYS
The enumeration found no more keys.
Definition: ebpf_result.h:93
EBPF_PROGRAM_LOAD_FAILED
@ EBPF_PROGRAM_LOAD_FAILED
Program load failed.
Definition: ebpf_result.h:27
EBPF_EXTENSION_FAILED_TO_LOAD
@ EBPF_EXTENSION_FAILED_TO_LOAD
The eBPF extension failed to load.
Definition: ebpf_result.h:87
EBPF_RPC_EXCEPTION
@ EBPF_RPC_EXCEPTION
An RPC exception occurred.
Definition: ebpf_result.h:60
EBPF_OBJECT_ALREADY_EXISTS
@ EBPF_OBJECT_ALREADY_EXISTS
A program or map is already pinned with the same path.
Definition: ebpf_result.h:42
ebpf_result
ebpf_result
Definition: ebpf_result.h:16
EBPF_KEY_ALREADY_EXISTS
@ EBPF_KEY_ALREADY_EXISTS
The requested key is already present.
Definition: ebpf_result.h:96
ebpf_result_t
enum ebpf_result ebpf_result_t
EBPF_ALREADY_PINNED
@ EBPF_ALREADY_PINNED
The program or map already pinned to a different path.
Definition: ebpf_result.h:48
EBPF_FAILED
@ EBPF_FAILED
Generic failure code for all other errors.
Definition: ebpf_result.h:69
EBPF_KEY_NOT_FOUND
@ EBPF_KEY_NOT_FOUND
The requested key was not found.
Definition: ebpf_result.h:75
EBPF_FILE_NOT_FOUND
@ EBPF_FILE_NOT_FOUND
Invalid ELF file path.
Definition: ebpf_result.h:45
EBPF_INVALID_OBJECT
@ EBPF_INVALID_OBJECT
Invalid object provided (ebpf_object, ebpf_map, ebpf_program).
Definition: ebpf_result.h:33