Added patch to implement AllocateAndGetTcpExTableFromStack.

This commit is contained in:
Erich E. Hoover 2014-07-26 12:42:06 -06:00
parent 7efae8dc63
commit 13cf73babe
5 changed files with 111 additions and 0 deletions

View File

@ -19,6 +19,7 @@ These patches fix the following Wine bugs:
* Support for stored file ACLs ([Wine Bug #31858](http://bugs.winehq.org/show_bug.cgi?id=31858 "Netflix on Firefox fails with Internet Connection Problem when loading bar is at 99%"))
* Implement an Arial replacement font ([Wine Bug #32323](http://bugs.winehq.org/show_bug.cgi?id=32323 "Netflix (Silverlight 4.x) and several .NET Framework 3.x/4.0 WPF apps require either Arial or Verdana to be installed"))
* Support for interface change notifications ([Wine Bug #32328](http://bugs.winehq.org/show_bug.cgi?id=32328 "Many .NET and Silverlight applications require SIO_ADDRESS_LIST_CHANGE for interface change notifications"))
* Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](http://bugs.winehq.org/show_bug.cgi?id=34372 "Add missing function AllocateAndGetTcpExTableFromStack() to iphlpapi.dll"))
* Support for inherited file ACLs ([Wine Bug #34406](http://bugs.winehq.org/show_bug.cgi?id=34406 "Finale Notepad 2012 doesn't copy/create user files on program start"))
* Add Dynamic DST exceptions for Israel Standard Time ([Wine Bug #36374](http://bugs.winehq.org/show_bug.cgi?id=36374 "Israel timezone handled incorrectly"))

4
debian/changelog vendored
View File

@ -1,3 +1,7 @@
wine-compholio (1.7.23) UNRELEASED; urgency=low
* Added patch to implement AllocateAndGetTcpExTableFromStack.
-- Erich E. Hoover <erich.e.hoover@gmail.com> Sat, 26 Jul 2014 12:41:50 -0600
wine-compholio (1.7.23) unstable; urgency=low
* Rewrite of patch system to simplify maintaining large patchsets.
* Fix failing Junction Point test.

View File

@ -8,6 +8,7 @@ PATCH := $(CURDIR)/../debian/tools/gitapply.sh -d $(DESTDIR)
PATCHLIST := Miscellaneous.ok \
Pipelight.ok \
fonts-Missing_Fonts.ok \
iphlpapi-TCP_Table.ok \
kernel32-GetVolumePathName.ok \
kernel32-Named_Pipe.ok \
loader-Cmdline_Diagnostics.ok \
@ -113,6 +114,23 @@ fonts-Missing_Fonts.ok:
echo '+ { "fonts-Missing_Fonts", "Torsten Kurbad / Erich E. Hoover", "Implement missing fonts expected by Silverlight. [rev 2]" },'; \
) > fonts-Missing_Fonts.ok
# Patchset iphlpapi-TCP_Table
# |
# | Included patches:
# | * Implement AllocateAndGetTcpExTableFromStack. [by Erich E. Hoover]
# |
# | This patchset fixes the following Wine bugs:
# | * [#34372] Add missing function AllocateAndGetTcpExTableFromStack() to iphlpapi.dll
# |
# | Modified files:
# | * dlls/iphlpapi/iphlpapi.spec, dlls/iphlpapi/ipstats.c, dlls/iphlpapi/ipstats.h
# |
iphlpapi-TCP_Table.ok:
$(PATCH) < iphlpapi-TCP_Table/0001-iphlpapi-Implement-AllocateAndGetTcpExTableFromStack.patch
( \
echo '+ { "iphlpapi-TCP_Table", "Erich E. Hoover", "Implement AllocateAndGetTcpExTableFromStack." },'; \
) > iphlpapi-TCP_Table.ok
# Patchset kernel32-GetVolumePathName
# |
# | Included patches:

View File

@ -0,0 +1,84 @@
From 1b79f1bc06ec42137a91e30e6543835b6b081250 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sat, 26 Jul 2014 12:31:50 -0600
Subject: iphlpapi: Implement AllocateAndGetTcpExTableFromStack.
Based on a patch by Ralf Habacker.
---
dlls/iphlpapi/iphlpapi.spec | 1 +
dlls/iphlpapi/ipstats.c | 34 ++++++++++++++++++++++++++++++++++
dlls/iphlpapi/ipstats.h | 1 +
3 files changed, 36 insertions(+)
diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index 36ba13f..4f56e23 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -5,6 +5,7 @@
@ stdcall AllocateAndGetIpAddrTableFromStack( ptr long long long )
@ stdcall AllocateAndGetIpForwardTableFromStack( ptr long long long )
@ stdcall AllocateAndGetIpNetTableFromStack( ptr long long long )
+@ stdcall AllocateAndGetTcpExTableFromStack( ptr long long long long )
@ stdcall AllocateAndGetTcpTableFromStack( ptr long long long )
@ stdcall AllocateAndGetUdpTableFromStack( ptr long long long )
@ stdcall CancelIPChangeNotify( ptr )
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 3ff30f3..cf42ee9 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2327,6 +2327,40 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
return build_tcp_table( TCP_TABLE_BASIC_ALL, (void **)ppTcpTable, bOrder, heap, flags, NULL );
}
+/******************************************************************
+ * AllocateAndGetTcpExTableFromStack (IPHLPAPI.@)
+ *
+ * Get the TCP connection table.
+ * Like GetTcpTable(), but allocate the returned table from heap.
+ *
+ * PARAMS
+ * ppTcpTable [Out] pointer into which the MIB_TCPTABLE_EX is
+ * allocated and returned.
+ * bOrder [In] whether to sort the table
+ * heap [In] heap from which the table is allocated
+ * flags [In] flags to HeapAlloc
+ * family [In]
+ *
+ * RETURNS
+ * ERROR_INVALID_PARAMETER if ppTcpTable is NULL, whatever GetTcpTable()
+ * returns otherwise.
+ */
+DWORD WINAPI AllocateAndGetTcpExTableFromStack( VOID **ppTcpTable, BOOL bOrder,
+ HANDLE heap, DWORD flags, DWORD family )
+{
+ TRACE("table %p, bOrder %d, heap %p, flags 0x%08x\n", ppTcpTable, bOrder, heap, flags);
+
+ if (!ppTcpTable) return ERROR_INVALID_PARAMETER;
+
+ if (family != AF_INET)
+ {
+ FIXME( "family = %u not supported\n", family );
+ return ERROR_NOT_SUPPORTED;
+ }
+
+ return build_tcp_table( TCP_TABLE_OWNER_PID_ALL, ppTcpTable, bOrder, heap, flags, NULL );
+}
+
static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD *row_size )
{
DWORD table_size;
diff --git a/dlls/iphlpapi/ipstats.h b/dlls/iphlpapi/ipstats.h
index bf5bb92..d8835aa 100644
--- a/dlls/iphlpapi/ipstats.h
+++ b/dlls/iphlpapi/ipstats.h
@@ -34,6 +34,7 @@ DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry) DECLSPEC_HIDDE
DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOrder, HANDLE heap, DWORD flags) DECLSPEC_HIDDEN;
DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags) DECLSPEC_HIDDEN;
+DWORD WINAPI AllocateAndGetTcpExTableFromStack(VOID **ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags, DWORD family) DECLSPEC_HIDDEN;
DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BOOL bOrder, HANDLE heap, DWORD flags) DECLSPEC_HIDDEN;
DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForwardTable, BOOL bOrder, HANDLE heap, DWORD flags) DECLSPEC_HIDDEN;
--
1.7.9.5

View File

@ -0,0 +1,4 @@
Author: Erich E. Hoover
Subject: Implement AllocateAndGetTcpExTableFromStack.
Revision: 1
Fixes: [34372] Support for AllocateAndGetTcpExTableFromStack