1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/netlink_states.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #if defined(NETLINK_UNCONNECTED) || (defined(HAVE_DECL_NETLINK_UNCONNECTED) && HAVE_DECL_NETLINK_UNCONNECTED)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((NETLINK_UNCONNECTED) == (0), "NETLINK_UNCONNECTED != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define NETLINK_UNCONNECTED 0
12 #endif
13 #if defined(NETLINK_CONNECTED) || (defined(HAVE_DECL_NETLINK_CONNECTED) && HAVE_DECL_NETLINK_CONNECTED)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((NETLINK_CONNECTED) == (1), "NETLINK_CONNECTED != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define NETLINK_CONNECTED 1
19 #endif
20 #if defined(TCP_CLOSE) || (defined(HAVE_DECL_TCP_CLOSE) && HAVE_DECL_TCP_CLOSE)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((TCP_CLOSE) == (7), "TCP_CLOSE != 7");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define TCP_CLOSE 7
26 #endif
27 #undef XLAT_PREV_VAL
28
29 #ifndef XLAT_MACROS_ONLY
30
31 # ifdef IN_MPERS
32
33 # error static const struct xlat netlink_states in mpers mode
34
35 # else
36
37 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
38 static const struct xlat_data netlink_states_xdata[] = {
39 XLAT(NETLINK_UNCONNECTED),
40 #define XLAT_VAL_0 ((unsigned) (NETLINK_UNCONNECTED))
41 #define XLAT_STR_0 STRINGIFY(NETLINK_UNCONNECTED)
42 XLAT(NETLINK_CONNECTED),
43 #define XLAT_VAL_1 ((unsigned) (NETLINK_CONNECTED))
44 #define XLAT_STR_1 STRINGIFY(NETLINK_CONNECTED)
45
46 XLAT(TCP_CLOSE),
47 #define XLAT_VAL_2 ((unsigned) (TCP_CLOSE))
48 #define XLAT_STR_2 STRINGIFY(TCP_CLOSE)
49 };
50 static
51 const struct xlat netlink_states[1] = { {
52 .data = netlink_states_xdata,
53 .size = ARRAY_SIZE(netlink_states_xdata),
54 .type = XT_NORMAL,
55 .flags_mask = 0
56 # ifdef XLAT_VAL_0
57 | XLAT_VAL_0
58 # endif
59 # ifdef XLAT_VAL_1
60 | XLAT_VAL_1
61 # endif
62 # ifdef XLAT_VAL_2
63 | XLAT_VAL_2
64 # endif
65 ,
66 .flags_strsz = 0
67 # ifdef XLAT_STR_0
68 + sizeof(XLAT_STR_0)
69 # endif
70 # ifdef XLAT_STR_1
71 + sizeof(XLAT_STR_1)
72 # endif
73 # ifdef XLAT_STR_2
74 + sizeof(XLAT_STR_2)
75 # endif
76 ,
77 } };
78 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
79
80 # undef XLAT_STR_0
81 # undef XLAT_VAL_0
82 # undef XLAT_STR_1
83 # undef XLAT_VAL_1
84 # undef XLAT_STR_2
85 # undef XLAT_VAL_2
86 # endif /* !IN_MPERS */
87
88 #endif /* !XLAT_MACROS_ONLY */