1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/setsock_ipv6_options.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #if defined(IP6T_SO_SET_REPLACE) || (defined(HAVE_DECL_IP6T_SO_SET_REPLACE) && HAVE_DECL_IP6T_SO_SET_REPLACE)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((IP6T_SO_SET_REPLACE) == (64), "IP6T_SO_SET_REPLACE != 64");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define IP6T_SO_SET_REPLACE 64
12 #endif
13 #if defined(IP6T_SO_SET_ADD_COUNTERS) || (defined(HAVE_DECL_IP6T_SO_SET_ADD_COUNTERS) && HAVE_DECL_IP6T_SO_SET_ADD_COUNTERS)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((IP6T_SO_SET_ADD_COUNTERS) == (65), "IP6T_SO_SET_ADD_COUNTERS != 65");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define IP6T_SO_SET_ADD_COUNTERS 65
19 #endif
20 #undef XLAT_PREV_VAL
21
22 #ifndef XLAT_MACROS_ONLY
23
24 # ifdef IN_MPERS
25
26 # error static const struct xlat setsock_ipv6_options in mpers mode
27
28 # else
29
30 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
31 static const struct xlat_data setsock_ipv6_options_xdata[] = {
32 /*
33 * Options specific to setsockopt(SOL_IPV6).
34 * Common {g,s}etsockopt(SOL_IPV6) options
35 * should be in sock_ipv6_options.in instead.
36 */
37
38 XLAT(IP6T_SO_SET_REPLACE),
39 #define XLAT_VAL_0 ((unsigned) (IP6T_SO_SET_REPLACE))
40 #define XLAT_STR_0 STRINGIFY(IP6T_SO_SET_REPLACE)
41 XLAT(IP6T_SO_SET_ADD_COUNTERS),
42 #define XLAT_VAL_1 ((unsigned) (IP6T_SO_SET_ADD_COUNTERS))
43 #define XLAT_STR_1 STRINGIFY(IP6T_SO_SET_ADD_COUNTERS)
44 };
45 static
46 const struct xlat setsock_ipv6_options[1] = { {
47 .data = setsock_ipv6_options_xdata,
48 .size = ARRAY_SIZE(setsock_ipv6_options_xdata),
49 .type = XT_NORMAL,
50 .flags_mask = 0
51 # ifdef XLAT_VAL_0
52 | XLAT_VAL_0
53 # endif
54 # ifdef XLAT_VAL_1
55 | XLAT_VAL_1
56 # endif
57 ,
58 .flags_strsz = 0
59 # ifdef XLAT_STR_0
60 + sizeof(XLAT_STR_0)
61 # endif
62 # ifdef XLAT_STR_1
63 + sizeof(XLAT_STR_1)
64 # endif
65 ,
66 } };
67 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
68
69 # undef XLAT_STR_0
70 # undef XLAT_VAL_0
71 # undef XLAT_STR_1
72 # undef XLAT_VAL_1
73 # endif /* !IN_MPERS */
74
75 #endif /* !XLAT_MACROS_ONLY */