/* Generated by ./src/xlat/gen.sh from ./src/xlat/tun_device_types.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(IFF_TUN) || (defined(HAVE_DECL_IFF_TUN) && HAVE_DECL_IFF_TUN)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IFF_TUN) == (1), "IFF_TUN != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IFF_TUN 1
#endif
#if defined(IFF_TAP) || (defined(HAVE_DECL_IFF_TAP) && HAVE_DECL_IFF_TAP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IFF_TAP) == (2), "IFF_TAP != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IFF_TAP 2
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat tun_device_types in mpers mode

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data tun_device_types_xdata[] = {
 [IFF_TUN] = XLAT(IFF_TUN),
 #define XLAT_VAL_0 ((unsigned) (IFF_TUN))
 #define XLAT_STR_0 STRINGIFY(IFF_TUN)
 [IFF_TAP] = XLAT(IFF_TAP),
 #define XLAT_VAL_1 ((unsigned) (IFF_TAP))
 #define XLAT_STR_1 STRINGIFY(IFF_TAP)
};
static
const struct xlat tun_device_types[1] = { {
 .data = tun_device_types_xdata,
 .size = ARRAY_SIZE(tun_device_types_xdata),
 .type = XT_INDEXED,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */