Home | History | Annotate | Download | only in xlat
      1 /* Generated by ./xlat/gen.sh from ./xlat/tun_device_types.in; do not edit. */
      2 
      3 #include "gcc_compat.h"
      4 #include "static_assert.h"
      5 
      6 #if defined(IFF_TUN) || (defined(HAVE_DECL_IFF_TUN) && HAVE_DECL_IFF_TUN)
      7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      8 static_assert((IFF_TUN) == (1), "IFF_TUN != 1");
      9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     10 #else
     11 # define IFF_TUN 1
     12 #endif
     13 #if defined(IFF_TAP) || (defined(HAVE_DECL_IFF_TAP) && HAVE_DECL_IFF_TAP)
     14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     15 static_assert((IFF_TAP) == (2), "IFF_TAP != 2");
     16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     17 #else
     18 # define IFF_TAP 2
     19 #endif
     20 
     21 #ifndef XLAT_MACROS_ONLY
     22 
     23 # ifdef IN_MPERS
     24 
     25 #  error static const struct xlat tun_device_types in mpers mode
     26 
     27 # else
     28 
     29 static
     30 const struct xlat tun_device_types[] = {
     31  [IFF_TUN] = XLAT(IFF_TUN),
     32  [IFF_TAP] = XLAT(IFF_TAP),
     33  XLAT_END
     34 };
     35 
     36 # endif /* !IN_MPERS */
     37 
     38 #endif /* !XLAT_MACROS_ONLY */
     39