1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/bpf_class.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #if defined(BPF_LD) || (defined(HAVE_DECL_BPF_LD) && HAVE_DECL_BPF_LD)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((BPF_LD) == (0x0), "BPF_LD != 0x0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define BPF_LD 0x0
12 #endif
13 #if defined(BPF_LDX) || (defined(HAVE_DECL_BPF_LDX) && HAVE_DECL_BPF_LDX)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((BPF_LDX) == (0x1), "BPF_LDX != 0x1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define BPF_LDX 0x1
19 #endif
20 #if defined(BPF_ST) || (defined(HAVE_DECL_BPF_ST) && HAVE_DECL_BPF_ST)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((BPF_ST) == (0x2), "BPF_ST != 0x2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define BPF_ST 0x2
26 #endif
27 #if defined(BPF_STX) || (defined(HAVE_DECL_BPF_STX) && HAVE_DECL_BPF_STX)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((BPF_STX) == (0x3), "BPF_STX != 0x3");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define BPF_STX 0x3
33 #endif
34 #if defined(BPF_ALU) || (defined(HAVE_DECL_BPF_ALU) && HAVE_DECL_BPF_ALU)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((BPF_ALU) == (0x4), "BPF_ALU != 0x4");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define BPF_ALU 0x4
40 #endif
41 #if defined(BPF_JMP) || (defined(HAVE_DECL_BPF_JMP) && HAVE_DECL_BPF_JMP)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((BPF_JMP) == (0x5), "BPF_JMP != 0x5");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define BPF_JMP 0x5
47 #endif
48 #if defined(BPF_RET) || (defined(HAVE_DECL_BPF_RET) && HAVE_DECL_BPF_RET)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((BPF_RET) == (0x6), "BPF_RET != 0x6");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define BPF_RET 0x6
54 #endif
55 #if defined(BPF_MISC) || (defined(HAVE_DECL_BPF_MISC) && HAVE_DECL_BPF_MISC)
56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
57 static_assert((BPF_MISC) == (0x7), "BPF_MISC != 0x7");
58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
59 #else
60 # define BPF_MISC 0x7
61 #endif
62 #undef XLAT_PREV_VAL
63
64 #ifndef XLAT_MACROS_ONLY
65
66 # ifdef IN_MPERS
67
68 # error static const struct xlat bpf_class in mpers mode
69
70 # else
71
72 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
73 static const struct xlat_data bpf_class_xdata[] = {
74 [BPF_LD] = XLAT(BPF_LD),
75 #define XLAT_VAL_0 ((unsigned) (BPF_LD))
76 #define XLAT_STR_0 STRINGIFY(BPF_LD)
77 [BPF_LDX] = XLAT(BPF_LDX),
78 #define XLAT_VAL_1 ((unsigned) (BPF_LDX))
79 #define XLAT_STR_1 STRINGIFY(BPF_LDX)
80 [BPF_ST] = XLAT(BPF_ST),
81 #define XLAT_VAL_2 ((unsigned) (BPF_ST))
82 #define XLAT_STR_2 STRINGIFY(BPF_ST)
83 [BPF_STX] = XLAT(BPF_STX),
84 #define XLAT_VAL_3 ((unsigned) (BPF_STX))
85 #define XLAT_STR_3 STRINGIFY(BPF_STX)
86 [BPF_ALU] = XLAT(BPF_ALU),
87 #define XLAT_VAL_4 ((unsigned) (BPF_ALU))
88 #define XLAT_STR_4 STRINGIFY(BPF_ALU)
89 [BPF_JMP] = XLAT(BPF_JMP),
90 #define XLAT_VAL_5 ((unsigned) (BPF_JMP))
91 #define XLAT_STR_5 STRINGIFY(BPF_JMP)
92 [BPF_RET] = XLAT(BPF_RET),
93 #define XLAT_VAL_6 ((unsigned) (BPF_RET))
94 #define XLAT_STR_6 STRINGIFY(BPF_RET)
95 [BPF_MISC] = XLAT(BPF_MISC),
96 #define XLAT_VAL_7 ((unsigned) (BPF_MISC))
97 #define XLAT_STR_7 STRINGIFY(BPF_MISC)
98 };
99 static
100 const struct xlat bpf_class[1] = { {
101 .data = bpf_class_xdata,
102 .size = ARRAY_SIZE(bpf_class_xdata),
103 .type = XT_INDEXED,
104 .flags_mask = 0
105 # ifdef XLAT_VAL_0
106 | XLAT_VAL_0
107 # endif
108 # ifdef XLAT_VAL_1
109 | XLAT_VAL_1
110 # endif
111 # ifdef XLAT_VAL_2
112 | XLAT_VAL_2
113 # endif
114 # ifdef XLAT_VAL_3
115 | XLAT_VAL_3
116 # endif
117 # ifdef XLAT_VAL_4
118 | XLAT_VAL_4
119 # endif
120 # ifdef XLAT_VAL_5
121 | XLAT_VAL_5
122 # endif
123 # ifdef XLAT_VAL_6
124 | XLAT_VAL_6
125 # endif
126 # ifdef XLAT_VAL_7
127 | XLAT_VAL_7
128 # endif
129 ,
130 .flags_strsz = 0
131 # ifdef XLAT_STR_0
132 + sizeof(XLAT_STR_0)
133 # endif
134 # ifdef XLAT_STR_1
135 + sizeof(XLAT_STR_1)
136 # endif
137 # ifdef XLAT_STR_2
138 + sizeof(XLAT_STR_2)
139 # endif
140 # ifdef XLAT_STR_3
141 + sizeof(XLAT_STR_3)
142 # endif
143 # ifdef XLAT_STR_4
144 + sizeof(XLAT_STR_4)
145 # endif
146 # ifdef XLAT_STR_5
147 + sizeof(XLAT_STR_5)
148 # endif
149 # ifdef XLAT_STR_6
150 + sizeof(XLAT_STR_6)
151 # endif
152 # ifdef XLAT_STR_7
153 + sizeof(XLAT_STR_7)
154 # endif
155 ,
156 } };
157 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
158
159 # undef XLAT_STR_0
160 # undef XLAT_VAL_0
161 # undef XLAT_STR_1
162 # undef XLAT_VAL_1
163 # undef XLAT_STR_2
164 # undef XLAT_VAL_2
165 # undef XLAT_STR_3
166 # undef XLAT_VAL_3
167 # undef XLAT_STR_4
168 # undef XLAT_VAL_4
169 # undef XLAT_STR_5
170 # undef XLAT_VAL_5
171 # undef XLAT_STR_6
172 # undef XLAT_VAL_6
173 # undef XLAT_STR_7
174 # undef XLAT_VAL_7
175 # endif /* !IN_MPERS */
176
177 #endif /* !XLAT_MACROS_ONLY */