Hans Leidekker : iphlpapi: Add a stub implementation of GetExtendedTcpTable .

Alexandre Julliard julliard at winehq.org
Mon Dec 19 13:39:23 CST 2011


Module: wine
Branch: master
Commit: 895e7a5f5be6d0cbdab14039aa755f82ddefceb6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=895e7a5f5be6d0cbdab14039aa755f82ddefceb6

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Dec 19 15:41:48 2011 +0100

iphlpapi: Add a stub implementation of GetExtendedTcpTable.

---

 dlls/iphlpapi/iphlpapi.spec   |    1 +
 dlls/iphlpapi/iphlpapi_main.c |   16 ++++++++++++++++
 include/iphlpapi.h            |    3 +++
 include/iprtrmib.h            |   13 +++++++++++++
 4 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index 1c33625..cb00df4 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -26,6 +26,7 @@
 @ stub GetBestInterfaceFromStack
 @ stdcall GetBestRoute( long long long )
 @ stub GetBestRouteFromStack
+@ stdcall GetExtendedTcpTable( ptr ptr long long long long )
 @ stdcall GetFriendlyIfIndex( long )
 @ stdcall GetIcmpStatistics( ptr )
 @ stub GetIcmpStatsFromStack
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index be37bb0..d43f644 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -1877,6 +1877,22 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
     return ret;
 }
 
+/******************************************************************
+ *    GetExtendedTcpTable (IPHLPAPI.@)
+ */
+DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder,
+                                 ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved)
+{
+    TRACE("pTcpTable %p, pdwSize %p, bOrder %d, ulAf %u, TableClass %u, Reserved %u\n",
+           pTcpTable, pdwSize, bOrder, ulAf, TableClass, Reserved);
+
+    if (ulAf == AF_INET6 || TableClass != TCP_TABLE_BASIC_ALL)
+    {
+        FIXME("ulAf = %u, TableClass = %u not supportted\n", ulAf, TableClass);
+        return ERROR_NOT_SUPPORTED;
+    }
+    return GetTcpTable(pTcpTable, pdwSize, bOrder);
+}
 
 /******************************************************************
  *    GetUdpTable (IPHLPAPI.@)
diff --git a/include/iphlpapi.h b/include/iphlpapi.h
index 0a8def5..4390903 100644
--- a/include/iphlpapi.h
+++ b/include/iphlpapi.h
@@ -26,6 +26,9 @@ extern "C" {
 #include <ipexport.h>
 #include <iptypes.h>
 
+DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder,
+ ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved);
+
 DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf);
 
 DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow);
diff --git a/include/iprtrmib.h b/include/iprtrmib.h
index 477f1dd..3d4e65e 100644
--- a/include/iprtrmib.h
+++ b/include/iprtrmib.h
@@ -25,4 +25,17 @@
 #include <tcpmib.h>
 #include <udpmib.h>
 
+typedef enum _TCP_TABLE_CLASS
+{
+    TCP_TABLE_BASIC_LISTENER,
+    TCP_TABLE_BASIC_CONNECTIONS,
+    TCP_TABLE_BASIC_ALL,
+    TCP_TABLE_OWNER_PID_LISTENER,
+    TCP_TABLE_OWNER_PID_CONNECTIONS,
+    TCP_TABLE_OWNER_PID_ALL,
+    TCP_TABLE_OWNER_MODULE_LISTENER,
+    TCP_TABLE_OWNER_MODULE_CONNECTIONS,
+    TCP_TABLE_OWNER_MODULE_ALL
+} TCP_TABLE_CLASS, *PTCP_TABLE_CLASS;
+
 #endif /* WINE_IPRTRMIB_H__ */




More information about the wine-cvs mailing list