Commit 05fca48e authored by Erich E. Hoover's avatar Erich E. Hoover Committed by Alexandre Julliard

iphlpapi: Implement AllocateAndGetTcpExTableFromStack.

Based on a patch by Ralf Habacker. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34372Signed-off-by: 's avatarVijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent dd318b13
......@@ -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 )
......
......@@ -2320,6 +2320,42 @@ 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] address family [AF_INET|AF_INET6]
*
* 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, family %u\n",
ppTcpTable, bOrder, heap, flags, family);
if (!ppTcpTable || !family)
return ERROR_INVALID_PARAMETER;
if (family != WS_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;
......
......@@ -158,6 +158,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOrder, HANDLE heap, DWORD flags);
DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags);
DWORD WINAPI AllocateAndGetTcpExTableFromStack(VOID **ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags, DWORD family);
DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BOOL bOrder, HANDLE heap, DWORD flags);
DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForwardTable, BOOL bOrder, HANDLE heap, DWORD flags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment