huangcm
2025-08-25 f350412dc55c15118d0a7925d1071877498e5e24
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
/* Generated by ./xlat/gen.sh from ./xlat/bpf_class.in; do not edit. */
 
#include "gcc_compat.h"
#include "static_assert.h"
 
#if defined(BPF_LD) || (defined(HAVE_DECL_BPF_LD) && HAVE_DECL_BPF_LD)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_LD) == (0x0), "BPF_LD != 0x0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_LD 0x0
#endif
#if defined(BPF_LDX) || (defined(HAVE_DECL_BPF_LDX) && HAVE_DECL_BPF_LDX)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_LDX) == (0x1), "BPF_LDX != 0x1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_LDX 0x1
#endif
#if defined(BPF_ST) || (defined(HAVE_DECL_BPF_ST) && HAVE_DECL_BPF_ST)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_ST) == (0x2), "BPF_ST != 0x2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_ST 0x2
#endif
#if defined(BPF_STX) || (defined(HAVE_DECL_BPF_STX) && HAVE_DECL_BPF_STX)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_STX) == (0x3), "BPF_STX != 0x3");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_STX 0x3
#endif
#if defined(BPF_ALU) || (defined(HAVE_DECL_BPF_ALU) && HAVE_DECL_BPF_ALU)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_ALU) == (0x4), "BPF_ALU != 0x4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_ALU 0x4
#endif
#if defined(BPF_JMP) || (defined(HAVE_DECL_BPF_JMP) && HAVE_DECL_BPF_JMP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_JMP) == (0x5), "BPF_JMP != 0x5");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_JMP 0x5
#endif
#if defined(BPF_RET) || (defined(HAVE_DECL_BPF_RET) && HAVE_DECL_BPF_RET)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_RET) == (0x6), "BPF_RET != 0x6");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_RET 0x6
#endif
#if defined(BPF_MISC) || (defined(HAVE_DECL_BPF_MISC) && HAVE_DECL_BPF_MISC)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((BPF_MISC) == (0x7), "BPF_MISC != 0x7");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define BPF_MISC 0x7
#endif
 
#ifndef XLAT_MACROS_ONLY
 
# ifdef IN_MPERS
 
#  error static const struct xlat bpf_class in mpers mode
 
# else
 
static
const struct xlat bpf_class[] = {
 [BPF_LD] = XLAT(BPF_LD),
 [BPF_LDX] = XLAT(BPF_LDX),
 [BPF_ST] = XLAT(BPF_ST),
 [BPF_STX] = XLAT(BPF_STX),
 [BPF_ALU] = XLAT(BPF_ALU),
 [BPF_JMP] = XLAT(BPF_JMP),
 [BPF_RET] = XLAT(BPF_RET),
 [BPF_MISC] = XLAT(BPF_MISC),
 XLAT_END
};
 
# endif /* !IN_MPERS */
 
#endif /* !XLAT_MACROS_ONLY */