• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./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 
63 #ifndef XLAT_MACROS_ONLY
64 
65 # ifdef IN_MPERS
66 
67 #  error static const struct xlat bpf_class in mpers mode
68 
69 # else
70 
71 static
72 const struct xlat bpf_class[] = {
73  [BPF_LD] = XLAT(BPF_LD),
74  [BPF_LDX] = XLAT(BPF_LDX),
75  [BPF_ST] = XLAT(BPF_ST),
76  [BPF_STX] = XLAT(BPF_STX),
77  [BPF_ALU] = XLAT(BPF_ALU),
78  [BPF_JMP] = XLAT(BPF_JMP),
79  [BPF_RET] = XLAT(BPF_RET),
80  [BPF_MISC] = XLAT(BPF_MISC),
81  XLAT_END
82 };
83 
84 # endif /* !IN_MPERS */
85 
86 #endif /* !XLAT_MACROS_ONLY */
87