Add needed defines for Vista network api
authorSylvain Petreolle <spetreolle@yahoo.fr>
Sun, 14 Jun 2009 14:09:01 +0000 (14:09 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Sun, 14 Jun 2009 14:09:01 +0000 (14:09 +0000)
svn path=/trunk/; revision=41408

reactos/include/psdk/ifdef.h
reactos/include/psdk/iphlpapi.h
reactos/include/psdk/netioapi.h
reactos/include/psdk/ntddndis.h
reactos/include/psdk/ws2tcpip.h

index 40b611d..f4fab4e 100644 (file)
@@ -19,5 +19,55 @@ typedef NET_LUID_LH NET_LUID;
 typedef NET_LUID* PNET_LUID;
 
 typedef ULONG NET_IFINDEX, *PNET_IFINDEX;
+typedef ULONG IFTYPE;
+typedef GUID NET_IF_NETWORK_GUID, *PNET_IF_NETWORK_GUID;
 
-#endif
+typedef enum {
+    TUNNEL_TYPE_NONE = 0,
+    TUNNEL_TYPE_OTHER = 1,
+    TUNNEL_TYPE_DIRECT = 2,
+    TUNNEL_TYPE_6TO4 = 11,
+    TUNNEL_TYPE_ISATAP = 13,
+    TUNNEL_TYPE_TEREDO = 14,
+} TUNNEL_TYPE, *PTUNNEL_TYPE;
+
+typedef enum _NET_IF_ACCESS_TYPE
+{
+    NET_IF_ACCESS_LOOPBACK = 1,
+    NET_IF_ACCESS_BROADCAST = 2,
+    NET_IF_ACCESS_POINT_TO_POINT = 3,
+    NET_IF_ACCESS_POINT_TO_MULTI_POINT = 4,
+    NET_IF_ACCESS_MAXIMUM = 5
+} NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
+
+typedef enum _NET_IF_DIRECTION_TYPE
+{
+    NET_IF_DIRECTION_SENDRECEIVE,
+    NET_IF_DIRECTION_SENDONLY,
+    NET_IF_DIRECTION_RECEIVEONLY,
+    NET_IF_DIRECTION_MAXIMUM
+} NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
+
+typedef enum _NET_IF_ADMIN_STATUS
+{
+    NET_IF_ADMIN_STATUS_UP = 1,
+    NET_IF_ADMIN_STATUS_DOWN = 2,
+    NET_IF_ADMIN_STATUS_TESTING = 3
+} NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
+
+typedef enum _NET_IF_MEDIA_CONNECT_STATE
+{
+    MediaConnectStateUnknown,
+    MediaConnectStateConnected,
+    MediaConnectStateDisconnected
+} NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
+
+typedef enum _NET_IF_CONNECTION_TYPE
+{
+   NET_IF_CONNECTION_DEDICATED = 1,
+   NET_IF_CONNECTION_PASSIVE = 2,
+   NET_IF_CONNECTION_DEMAND = 3,
+   NET_IF_CONNECTION_MAXIMUM = 4
+} NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
+
+#endif /* _IFDEF_ */
index cb69957..1a844d3 100644 (file)
@@ -4,6 +4,7 @@
 #include <iprtrmib.h>
 #include <ipexport.h>
 #include <iptypes.h>
+#include <netioapi.h>
 #ifdef __cplusplus
 extern "C" {
 #endif
index 3088423..68c1f52 100644 (file)
@@ -17,6 +17,7 @@ extern "C" {
 
 #ifdef _WS2IPDEF_
 #include <ntddndis.h>
+#include <ifdef.h>
 
 typedef struct _MIB_IF_ROW2 {
     NET_LUID InterfaceLuid;
@@ -71,8 +72,14 @@ typedef struct _MIB_IF_ROW2 {
     ULONG64 OutQLen;
 } MIB_IF_ROW2, *PMIB_IF_ROW2;
 
+typedef struct _MIB_IF_TABLE2
+{
+    ULONG NumEntries;
+    MIB_IF_ROW2 Table[1];
+} MIB_IF_TABLE2, *PMIB_IF_TABLE2;
 
 NETIOAPI_API GetIfEntry2(IN OUT PMIB_IF_ROW2 Row);
+NETIOAPI_API GetIfTable2(OUT PMIB_IF_TABLE2 *Table);
 
 #endif
 
index 4edca55..0e5c13e 100644 (file)
@@ -82,4 +82,48 @@ typedef struct _NDIS_802_11_BSSID_LIST
     NDIS_WLAN_BSSID Bssid[1];
 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
 
+/* NDIS driver medium (OID_GEN_MEDIA_SUPPORTED / OID_GEN_MEDIA_IN_USE) */
+typedef enum _NDIS_MEDIUM {
+  NdisMedium802_3,
+  NdisMedium802_5,
+  NdisMediumFddi,
+  NdisMediumWan,
+  NdisMediumLocalTalk,
+  NdisMediumDix,
+  NdisMediumArcnetRaw,
+  NdisMediumArcnet878_2,
+  NdisMediumAtm,
+  NdisMediumWirelessWan,
+  NdisMediumIrda,
+  NdisMediumBpc,
+  NdisMediumCoWan,
+  NdisMedium1394,
+  NdisMediumMax
+} NDIS_MEDIUM, *PNDIS_MEDIUM;
+
+typedef enum _NDIS_PHYSICAL_MEDIUM
+{
+    NdisPhysicalMediumUnspecified,
+    NdisPhysicalMediumWirelessLan,
+    NdisPhysicalMediumCableModem,
+    NdisPhysicalMediumPhoneLine,
+    NdisPhysicalMediumPowerLine,
+    NdisPhysicalMediumDSL,
+    NdisPhysicalMediumFibreChannel,
+    NdisPhysicalMedium1394,
+    NdisPhysicalMediumWirelessWan,
+    NdisPhysicalMediumNative802_11,
+    NdisPhysicalMediumBluetooth,
+    NdisPhysicalMediumInfiniband,
+    NdisPhysicalMediumWiMax,
+    NdisPhysicalMediumUWB,
+    NdisPhysicalMedium802_3,
+    NdisPhysicalMedium802_5,
+    NdisPhysicalMediumIrda,
+    NdisPhysicalMediumWiredWAN,
+    NdisPhysicalMediumWiredCoWan,
+    NdisPhysicalMediumOther,
+    NdisPhysicalMediumMax
+} NDIS_PHYSICAL_MEDIUM, *PNDIS_PHYSICAL_MEDIUM;
+
 #endif
index 8bcdfd1..1677b51 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include <winsock2.h>
+#include <ws2ipdef.h>
 #ifdef  __cplusplus
 extern "C" {
 #endif