| /* Generated by ./xlat/gen.sh from ./xlat/ip_cmsg_types.in; do not edit. */ |
| |
| #include "gcc_compat.h" |
| #include "static_assert.h" |
| |
| #if defined(IP_TOS) || (defined(HAVE_DECL_IP_TOS) && HAVE_DECL_IP_TOS) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_TOS) == (1), "IP_TOS != 1"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_TOS 1 |
| #endif |
| #if defined(IP_TTL) || (defined(HAVE_DECL_IP_TTL) && HAVE_DECL_IP_TTL) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_TTL) == (2), "IP_TTL != 2"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_TTL 2 |
| #endif |
| #if defined(IP_RECVOPTS) || (defined(HAVE_DECL_IP_RECVOPTS) && HAVE_DECL_IP_RECVOPTS) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_RECVOPTS) == (6), "IP_RECVOPTS != 6"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_RECVOPTS 6 |
| #endif |
| #if defined(IP_RETOPTS) || (defined(HAVE_DECL_IP_RETOPTS) && HAVE_DECL_IP_RETOPTS) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_RETOPTS) == (7), "IP_RETOPTS != 7"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_RETOPTS 7 |
| #endif |
| #if defined(IP_PKTINFO) || (defined(HAVE_DECL_IP_PKTINFO) && HAVE_DECL_IP_PKTINFO) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_PKTINFO) == (8), "IP_PKTINFO != 8"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_PKTINFO 8 |
| #endif |
| #if defined(IP_RECVERR) || (defined(HAVE_DECL_IP_RECVERR) && HAVE_DECL_IP_RECVERR) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_RECVERR) == (11), "IP_RECVERR != 11"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_RECVERR 11 |
| #endif |
| #if defined(IP_ORIGDSTADDR) || (defined(HAVE_DECL_IP_ORIGDSTADDR) && HAVE_DECL_IP_ORIGDSTADDR) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_ORIGDSTADDR) == (20), "IP_ORIGDSTADDR != 20"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_ORIGDSTADDR 20 |
| #endif |
| #if defined(IP_CHECKSUM) || (defined(HAVE_DECL_IP_CHECKSUM) && HAVE_DECL_IP_CHECKSUM) |
| DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE |
| static_assert((IP_CHECKSUM) == (23), "IP_CHECKSUM != 23"); |
| DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE |
| #else |
| # define IP_CHECKSUM 23 |
| #endif |
| |
| #ifndef XLAT_MACROS_ONLY |
| |
| # ifdef IN_MPERS |
| |
| # error static const struct xlat ip_cmsg_types in mpers mode |
| |
| # else |
| |
| static |
| const struct xlat ip_cmsg_types[] = { |
| XLAT(IP_TOS), |
| XLAT(IP_TTL), |
| XLAT(IP_RECVOPTS), |
| XLAT(IP_RETOPTS), |
| XLAT(IP_PKTINFO), |
| XLAT(IP_RECVERR), |
| XLAT(IP_ORIGDSTADDR), |
| XLAT(IP_CHECKSUM), |
| #if defined(SCM_SECURITY) || (defined(HAVE_DECL_SCM_SECURITY) && HAVE_DECL_SCM_SECURITY) |
| XLAT(SCM_SECURITY), |
| #endif |
| XLAT_END |
| }; |
| |
| # endif /* !IN_MPERS */ |
| |
| #endif /* !XLAT_MACROS_ONLY */ |