1 /* Generated by ./xlat/gen.sh from ./xlat/sock_netlink_options.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(NETLINK_ADD_MEMBERSHIP) || (defined(HAVE_DECL_NETLINK_ADD_MEMBERSHIP) && HAVE_DECL_NETLINK_ADD_MEMBERSHIP) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((NETLINK_ADD_MEMBERSHIP) == (1), "NETLINK_ADD_MEMBERSHIP != 1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define NETLINK_ADD_MEMBERSHIP 1 12 #endif 13 #if defined(NETLINK_DROP_MEMBERSHIP) || (defined(HAVE_DECL_NETLINK_DROP_MEMBERSHIP) && HAVE_DECL_NETLINK_DROP_MEMBERSHIP) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((NETLINK_DROP_MEMBERSHIP) == (2), "NETLINK_DROP_MEMBERSHIP != 2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define NETLINK_DROP_MEMBERSHIP 2 19 #endif 20 #if defined(NETLINK_PKTINFO) || (defined(HAVE_DECL_NETLINK_PKTINFO) && HAVE_DECL_NETLINK_PKTINFO) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((NETLINK_PKTINFO) == (3), "NETLINK_PKTINFO != 3"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define NETLINK_PKTINFO 3 26 #endif 27 #if defined(NETLINK_BROADCAST_ERROR) || (defined(HAVE_DECL_NETLINK_BROADCAST_ERROR) && HAVE_DECL_NETLINK_BROADCAST_ERROR) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((NETLINK_BROADCAST_ERROR) == (4), "NETLINK_BROADCAST_ERROR != 4"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define NETLINK_BROADCAST_ERROR 4 33 #endif 34 #if defined(NETLINK_NO_ENOBUFS) || (defined(HAVE_DECL_NETLINK_NO_ENOBUFS) && HAVE_DECL_NETLINK_NO_ENOBUFS) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((NETLINK_NO_ENOBUFS) == (5), "NETLINK_NO_ENOBUFS != 5"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define NETLINK_NO_ENOBUFS 5 40 #endif 41 #if defined(NETLINK_RX_RING) || (defined(HAVE_DECL_NETLINK_RX_RING) && HAVE_DECL_NETLINK_RX_RING) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((NETLINK_RX_RING) == (6), "NETLINK_RX_RING != 6"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define NETLINK_RX_RING 6 47 #endif 48 #if defined(NETLINK_TX_RING) || (defined(HAVE_DECL_NETLINK_TX_RING) && HAVE_DECL_NETLINK_TX_RING) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((NETLINK_TX_RING) == (7), "NETLINK_TX_RING != 7"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define NETLINK_TX_RING 7 54 #endif 55 #if defined(NETLINK_LISTEN_ALL_NSID) || (defined(HAVE_DECL_NETLINK_LISTEN_ALL_NSID) && HAVE_DECL_NETLINK_LISTEN_ALL_NSID) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((NETLINK_LISTEN_ALL_NSID) == (8), "NETLINK_LISTEN_ALL_NSID != 8"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define NETLINK_LISTEN_ALL_NSID 8 61 #endif 62 #if defined(NETLINK_LIST_MEMBERSHIPS) || (defined(HAVE_DECL_NETLINK_LIST_MEMBERSHIPS) && HAVE_DECL_NETLINK_LIST_MEMBERSHIPS) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((NETLINK_LIST_MEMBERSHIPS) == (9), "NETLINK_LIST_MEMBERSHIPS != 9"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define NETLINK_LIST_MEMBERSHIPS 9 68 #endif 69 #if defined(NETLINK_CAP_ACK) || (defined(HAVE_DECL_NETLINK_CAP_ACK) && HAVE_DECL_NETLINK_CAP_ACK) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((NETLINK_CAP_ACK) == (10), "NETLINK_CAP_ACK != 10"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define NETLINK_CAP_ACK 10 75 #endif 76 #if defined(NETLINK_EXT_ACK) || (defined(HAVE_DECL_NETLINK_EXT_ACK) && HAVE_DECL_NETLINK_EXT_ACK) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((NETLINK_EXT_ACK) == (11), "NETLINK_EXT_ACK != 11"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define NETLINK_EXT_ACK 11 82 #endif 83 84 #ifndef XLAT_MACROS_ONLY 85 86 # ifdef IN_MPERS 87 88 # error static const struct xlat sock_netlink_options in mpers mode 89 90 # else 91 92 static 93 const struct xlat sock_netlink_options[] = { 94 XLAT(NETLINK_ADD_MEMBERSHIP), 95 XLAT(NETLINK_DROP_MEMBERSHIP), 96 XLAT(NETLINK_PKTINFO), 97 XLAT(NETLINK_BROADCAST_ERROR), 98 XLAT(NETLINK_NO_ENOBUFS), 99 XLAT(NETLINK_RX_RING), 100 XLAT(NETLINK_TX_RING), 101 XLAT(NETLINK_LISTEN_ALL_NSID), 102 XLAT(NETLINK_LIST_MEMBERSHIPS), 103 XLAT(NETLINK_CAP_ACK), 104 XLAT(NETLINK_EXT_ACK), 105 XLAT_END 106 }; 107 108 # endif /* !IN_MPERS */ 109 110 #endif /* !XLAT_MACROS_ONLY */ 111