iphlpapi: add GetTcp6Table/GetTcp6Table2 stubs

Austin English austinenglish at gmail.com
Wed Jan 25 16:31:06 CST 2012


Follow up to http://source.winehq.org/git/wine.git/commitdiff/a52f88096ff1b526f91a45ccae9128a32a36c464.
After this, app from http://bugs.winehq.org/show_bug.cgi?id=29682
starts up.

-- 
-Austin
-------------- next part --------------
From aeb1e2c162d8fd80b699059ebd72d1c66f74e0a9 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish at gmail.com>
Date: Wed, 25 Jan 2012 14:29:48 -0800
Subject: iphlpapi: add GetTcp6Table/GetTcp6Table2 stubs

---
 dlls/iphlpapi/iphlpapi.spec   |    4 ++--
 dlls/iphlpapi/iphlpapi_main.c |   18 ++++++++++++++++++
 include/tcpmib.h              |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index a6662c3..f168492 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -132,8 +132,8 @@
 #@ stub GetPerTcpConnectionStats
 @ stdcall GetRTTAndHopCount( long ptr long ptr )
 #@ stub GetSessionCompartmentId
-#@ stub GetTcp6Table
-#@ stub GetTcp6Table2
+@ stdcall GetTcp6Table( ptr ptr long )
+@ stdcall GetTcp6Table2( ptr ptr long )
 #@ stub GetTcpStatisticsEx
 @ stdcall GetTcpStatistics( ptr )
 @ stub GetTcpStatsFromStack
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index ea759ae..2a3285f 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -2285,3 +2285,21 @@ ULONG WINAPI GetTcpTable2(PMIB_TCPTABLE2 table, PULONG size, BOOL order)
     FIXME("pTcpTable2 %p, pdwSize %p, bOrder %d: stub\n", table, size, order);
     return ERROR_NOT_SUPPORTED;
 }
+
+/******************************************************************
+ *    GetTcp6Table (IPHLPAPI.@)
+ */
+ULONG WINAPI GetTcp6Table(PMIB_TCP6TABLE table, PULONG size, BOOL order)
+{
+    FIXME("pTcp6Table %p, size %p, order %d: stub\n", table, size, order);
+    return ERROR_NOT_SUPPORTED;
+}
+
+/******************************************************************
+ *    GetTcp6Table2 (IPHLPAPI.@)
+ */
+ULONG WINAPI GetTcp6Table2(PMIB_TCP6TABLE2 table, PULONG size, BOOL order)
+{
+    FIXME("pTcp6Table2 %p, size %p, order %d: stub\n", table, size, order);
+    return ERROR_NOT_SUPPORTED;
+}
diff --git a/include/tcpmib.h b/include/tcpmib.h
index 58be385..8c3efa1 100644
--- a/include/tcpmib.h
+++ b/include/tcpmib.h
@@ -67,6 +67,38 @@ typedef struct _MIB_TCPTABLE
     MIB_TCPROW table[1];
 } MIB_TCPTABLE, *PMIB_TCPTABLE;
 
+typedef struct _MIB_TCP6ROW {
+    MIB_TCP_STATE State;
+    IN6_ADDR LocalAddr;
+    DWORD dwLocalScopeId;
+    DWORD dwLocalPort;
+    IN6_ADDR RemoteAddr;
+    DWORD dwRemoteScopeId;
+    DWORD dwRemotePort;
+} MIB_TCP6ROW, *PMIB_TCP6ROW;
+
+typedef struct _MIB_TCP6TABLE {
+    DWORD dwNumEntries;
+    MIB_TCP6ROW table[1];
+} MIB_TCP6TABLE, *PMIB_TCP6TABLE;
+
+typedef struct _MIB_TCP6ROW2 {
+    IN6_ADDR LocalAddr;
+    DWORD dwLocalScopeId;
+    DWORD dwLocalPort;
+    IN6_ADDR RemoteAddr;
+    DWORD dwRemoteScopeId;
+    DWORD dwRemotePort;
+    MIB_TCP_STATE State;
+    DWORD dwOwningPid;
+    TCP_CONNECTION_OFFLOAD_STATE dwOffloadState;
+} MIB_TCP6ROW2, *PMIB_TCP6ROW2;
+
+typedef struct _MIB_TCP6TABLE2 {
+    DWORD dwNumEntries;
+    MIB_TCP6ROW2 table[1];
+} MIB_TCP6TABLE2, *PMIB_TCP6TABLE2;
+
 typedef struct _MIB_TCPROW_OWNER_PID
 {
     DWORD dwState;
-- 
1.7.3.4


More information about the wine-patches mailing list