-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy pathebpf_result.h
More file actions
127 lines (87 loc) · 3.12 KB
/
ebpf_result.h
File metadata and controls
127 lines (87 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
* Copyright (c) eBPF for Windows contributors
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <sal.h>
#ifdef __cplusplus
extern "C"
{
#endif
#pragma warning(disable : 26812) // Prefer enum class
typedef _Return_type_success_(return == EBPF_SUCCESS) enum ebpf_result {
/// The operation was successful.
EBPF_SUCCESS, // = 0
/// Program verification failed.
EBPF_VERIFICATION_FAILED,
/// JIT compilation failed.
EBPF_JIT_COMPILATION_FAILED,
/// Program load failed.
EBPF_PROGRAM_LOAD_FAILED,
/// Invalid FD provided.
EBPF_INVALID_FD,
/// Invalid object provided (ebpf_object, ebpf_map, ebpf_program).
EBPF_INVALID_OBJECT, // = 5
/// An invalid argument was supplied.
EBPF_INVALID_ARGUMENT,
/// No pinned map or program exists for the path provided.
EBPF_OBJECT_NOT_FOUND,
/// A program or map is already pinned with the same path.
EBPF_OBJECT_ALREADY_EXISTS,
/// Invalid ELF file path.
EBPF_FILE_NOT_FOUND,
/// The program or map already pinned to a different path.
EBPF_ALREADY_PINNED, // = 10
/// The program or map is not pinned.
EBPF_NOT_PINNED,
/// Low memory.
EBPF_NO_MEMORY,
/// The program is too large.
EBPF_PROGRAM_TOO_LARGE,
/// An RPC exception occurred.
EBPF_RPC_EXCEPTION,
/// The handle was already initialized.
EBPF_ALREADY_INITIALIZED, // = 15
/// A failure occurred in parsing the ELF file.
EBPF_ELF_PARSING_FAILED,
/// Generic failure code for all other errors.
EBPF_FAILED,
/// Operation is not supported.
EBPF_OPERATION_NOT_SUPPORTED,
/// The requested key was not found.
EBPF_KEY_NOT_FOUND,
/// Access was denied for the requested operation.
EBPF_ACCESS_DENIED, // = 20
/// The operation was blocked for all requesters by policy.
EBPF_BLOCKED_BY_POLICY,
/// Arithmetic overflow occurred.
EBPF_ARITHMETIC_OVERFLOW,
/// The eBPF extension failed to load.
EBPF_EXTENSION_FAILED_TO_LOAD,
/// A buffer of insufficient size was supplied.
EBPF_INSUFFICIENT_BUFFER,
/// The enumeration found no more keys.
EBPF_NO_MORE_KEYS, // = 25
/// The requested key is already present.
EBPF_KEY_ALREADY_EXISTS,
/// Caller has reached tail call limit.
EBPF_NO_MORE_TAIL_CALLS,
/// Requested action is still pending.
EBPF_PENDING,
/// The container can not hold additional elements.
EBPF_OUT_OF_SPACE,
/// Operation was canceled.
EBPF_CANCELED, // = 30
/// Invalid pointer.
EBPF_INVALID_POINTER,
/// Operation timed out.
EBPF_TIMEOUT,
/// ID is valid, but the object has been deleted.
EBPF_STALE_ID,
/// The system is in an invalid state for this operation.
EBPF_INVALID_STATE,
} ebpf_result_t;
#define EBPF_RESULT_COUNT (EBPF_INVALID_STATE + 1)
#ifdef __cplusplus
}
#endif