Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_IFDEF
      7 #define _INC_IFDEF
      8 
      9 #include <ipifcons.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #define IF_MAX_STRING_SIZE 256
     16 #define IF_MAX_PHYS_ADDRESS_LENGTH 32
     17 
     18 typedef UINT32 NET_IF_COMPARTMENT_ID, *PNET_IF_COMPARTMENT_ID;
     19 
     20 typedef ULONG NET_IFINDEX, *PNET_IFINDEX;
     21 typedef UINT16 NET_IFTYPE, *PNET_IFTYPE;
     22 typedef NET_IFINDEX IF_INDEX, *PIF_INDEX;
     23 
     24 typedef GUID NET_IF_NETWORK_GUID;
     25 
     26 typedef enum _IF_OPER_STATUS {
     27   IfOperStatusUp               = 1,
     28   IfOperStatusDown,
     29   IfOperStatusTesting,
     30   IfOperStatusUnknown,
     31   IfOperStatusDormant,
     32   IfOperStatusNotPresent,
     33   IfOperStatusLowerLayerDown
     34 } IF_OPER_STATUS;
     35 
     36 typedef enum _NET_IF_ADMIN_STATUS {
     37   NET_IF_ADMIN_STATUS_UP        = 1,
     38   NET_IF_ADMIN_STATUS_DOWN,
     39   NET_IF_ADMIN_STATUS_TESTING
     40 } NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
     41 
     42 typedef enum _NET_IF_MEDIA_CONNECT_STATE {
     43   MediaConnectStateUnknown,
     44   MediaConnectStateConnected,
     45   MediaConnectStateDisconnected
     46 } NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
     47 
     48 typedef enum _NET_IF_ACCESS_TYPE {
     49   NET_IF_ACCESS_LOOPBACK               = 1,
     50   NET_IF_ACCESS_BROADCAST,
     51   NET_IF_ACCESS_POINT_TO_POINT,
     52   NET_IF_ACCESS_POINT_TO_MULTI_POINT,
     53   NET_IF_ACCESS_MAXIMUM
     54 } NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
     55 
     56 typedef enum _NET_IF_CONNECTION_TYPE {
     57   NET_IF_CONNECTION_DEDICATED   = 1,
     58   NET_IF_CONNECTION_PASSIVE,
     59   NET_IF_CONNECTION_DEMAND,
     60   NET_IF_CONNECTION_MAXIMUM
     61 } NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
     62 
     63 typedef enum _NET_IF_DIRECTION_TYPE {
     64   NET_IF_DIRECTION_SENDRECEIVE,
     65   NET_IF_DIRECTION_SENDONLY,
     66   NET_IF_DIRECTION_RECEIVEONLY,
     67   NET_IF_DIRECTION_MAXIMUM
     68 } NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
     69 
     70 typedef enum _NET_IF_MEDIA_DUPLEX_STATE {
     71   MediaDuplexStateUnknown,
     72   MediaDuplexStateHalf,
     73   MediaDuplexStateFull
     74 } NET_IF_MEDIA_DUPLEX_STATE, *PNET_IF_MEDIA_DUPLEX_STATE;
     75 
     76 typedef enum _TUNNEL_TYPE {
     77   TUNNEL_TYPE_NONE      = 0,
     78   TUNNEL_TYPE_OTHER     = 1,
     79   TUNNEL_TYPE_DIRECT    = 2,
     80   TUNNEL_TYPE_6TO4      = 11,
     81   TUNNEL_TYPE_ISATAP    = 13,
     82   TUNNEL_TYPE_TEREDO    = 14,
     83   TUNNEL_TYPE_IPHTTPS   = 15
     84 } TUNNEL_TYPE, *PTUNNEL_TYPE;
     85 
     86 #include <pshpack1.h>
     87 typedef union _NET_LUID {
     88   ULONG64 Value;
     89   __C89_NAMELESS struct { /* bitfield with 64 bit types. */
     90     ULONG64 Reserved  :24;
     91     ULONG64 NetLuidIndex  :24;
     92     ULONG64 IfType  :16;
     93   } Info;
     94 } NET_LUID, *PNET_LUID;
     95 #include <poppack.h>
     96 
     97 typedef NET_LUID IF_LUID, *PIF_LUID;
     98 
     99 #ifdef __cplusplus
    100 }
    101 #endif
    102 
    103 #endif /* _INC_IFDEF */
    104 
    105