From ed57cdcfde35779efe494d91ea9a926cc619bf65 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 3 Mar 2010 00:05:17 +0000 Subject: [PATCH] - Stub GetExtendedTcpTable - Fixes bug 5201 - Patch by Olaf Siejka svn path=/trunk/; revision=45771 --- reactos/dll/win32/iphlpapi/iphlpapi.spec | 2 +- reactos/dll/win32/iphlpapi/iphlpapi_main.c | 26 ++++++++++++++++++++++ reactos/include/psdk/iphlpapi.h | 1 + reactos/include/psdk/iprtrmib.h | 13 +++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.spec b/reactos/dll/win32/iphlpapi/iphlpapi.spec index 788666a6948..b07c464fb76 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi.spec +++ b/reactos/dll/win32/iphlpapi/iphlpapi.spec @@ -32,7 +32,7 @@ @ stub GetBestInterfaceFromStack @ stdcall GetBestRoute( long long long ) @ stub GetBestRouteFromStack -@ stub GetExtendedTcpTable +@ stdcall GetExtendedTcpTable( ptr ptr long long long long ) @ stub GetExtendedUdpTable @ stdcall GetFriendlyIfIndex( long ) @ stdcall GetIcmpStatistics( ptr ) diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_main.c b/reactos/dll/win32/iphlpapi/iphlpapi_main.c index 6d27ce66e80..47146e6cd14 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi_main.c +++ b/reactos/dll/win32/iphlpapi/iphlpapi_main.c @@ -789,6 +789,32 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO return ret; } +/****************************************************************** + * GetExtendedTcpTable (IPHLPAPI.@) + * + * Get the table of TCP endpoints available to the application. + * + * PARAMS + * pTcpTable [Out] table struct with the filtered TCP endpoints available to application + * pdwSize [In/Out] estimated size of the structure returned in pTcpTable, in bytes + * bOrder [In] whether to order the table + * ulAf [in] version of IP used by the TCP endpoints + * TableClass [in] type of the TCP table structure from TCP_TABLE_CLASS + * Reserved [in] reserved - this value must be zero + * + * RETURNS + * Success: NO_ERROR + * Failure: either ERROR_INSUFFICIENT_BUFFER or ERROR_INVALID_PARAMETER + * + * NOTES + */ +DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder, ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved) +{ + DWORD ret = NO_ERROR; + UNIMPLEMENTED; + return ret; +} + /****************************************************************** * GetFriendlyIfIndex (IPHLPAPI.@) diff --git a/reactos/include/psdk/iphlpapi.h b/reactos/include/psdk/iphlpapi.h index 1a844d38a49..9637194b5d2 100644 --- a/reactos/include/psdk/iphlpapi.h +++ b/reactos/include/psdk/iphlpapi.h @@ -22,6 +22,7 @@ DWORD WINAPI GetAdapterIndex(LPWSTR,PULONG); DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO,PULONG); DWORD WINAPI GetBestInterface(IPAddr,PDWORD); DWORD WINAPI GetBestRoute(DWORD,DWORD,PMIB_IPFORWARDROW); +DWORD WINAPI GetExtendedTcpTable(PVOID,PDWORD,BOOL,ULONG,TCP_TABLE_CLASS,ULONG); DWORD WINAPI GetFriendlyIfIndex(DWORD); DWORD WINAPI GetIcmpStatistics(PMIB_ICMP); DWORD WINAPI GetIfEntry(PMIB_IFROW); diff --git a/reactos/include/psdk/iprtrmib.h b/reactos/include/psdk/iprtrmib.h index a59796f0237..6f182944fce 100644 --- a/reactos/include/psdk/iprtrmib.h +++ b/reactos/include/psdk/iprtrmib.h @@ -286,4 +286,17 @@ typedef struct _MIB_IPNETTABLE MIB_IPNETROW table[1]; } MIB_IPNETTABLE, *PMIB_IPNETTABLE; + +typedef enum { + 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__ */