• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/af_packet_versions.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(TPACKET_V1) || (defined(HAVE_DECL_TPACKET_V1) && HAVE_DECL_TPACKET_V1)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((TPACKET_V1) == (0), "TPACKET_V1 != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define TPACKET_V1 0
12 #endif
13 #if defined(TPACKET_V2) || (defined(HAVE_DECL_TPACKET_V2) && HAVE_DECL_TPACKET_V2)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((TPACKET_V2) == (1), "TPACKET_V2 != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define TPACKET_V2 1
19 #endif
20 #if defined(TPACKET_V3) || (defined(HAVE_DECL_TPACKET_V3) && HAVE_DECL_TPACKET_V3)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((TPACKET_V3) == (2), "TPACKET_V3 != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define TPACKET_V3 2
26 #endif
27 
28 #ifndef XLAT_MACROS_ONLY
29 
30 # ifdef IN_MPERS
31 
32 #  error static const struct xlat af_packet_versions in mpers mode
33 
34 # else
35 
36 static
37 const struct xlat af_packet_versions[] = {
38  XLAT(TPACKET_V1),
39  XLAT(TPACKET_V2),
40  XLAT(TPACKET_V3),
41  XLAT_END
42 };
43 
44 # endif /* !IN_MPERS */
45 
46 #endif /* !XLAT_MACROS_ONLY */
47