Author: cgutman
Date: Sat Mar 6 19:30:55 2010
New Revision: 45960
URL:
http://svn.reactos.org/svn/reactos?rev=45960&view=rev
Log:
- Add a stub for GetOwnerModuleFromTcpEntry
- Patch by Olaf Siejka
Modified:
trunk/reactos/dll/win32/iphlpapi/iphlpapi.spec
trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c
trunk/reactos/include/psdk/iphlpapi.h
trunk/reactos/include/psdk/iprtrmib.h
Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
==============================================================================
--- trunk/reactos/dll/win32/iphlpapi/iphlpapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iphlpapi/iphlpapi.spec [iso-8859-1] Sat Mar 6 19:30:55 2010
@@ -61,7 +61,7 @@
@ stdcall GetNetworkParams( ptr ptr )
@ stdcall GetNumberOfInterfaces( ptr )
@ stub GetOwnerModuleFromTcp6Entry
-@ stub GetOwnerModuleFromTcpEntry
+@ stdcall GetOwnerModuleFromTcpEntry ( ptr long ptr ptr )
@ stub GetOwnerModuleFromUdp6Entry
@ stub GetOwnerModuleFromUdpEntry
@ stdcall GetPerAdapterInfo( long ptr ptr )
Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
==============================================================================
--- trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Sat Mar 6 19:30:55
2010
@@ -1506,6 +1506,33 @@
/******************************************************************
+ * GetOwnerModuleFromTcpEntry (IPHLPAPI.@)
+ *
+ * Get data about the module that issued the context bind for a specific IPv4 TCP
endpoint in a MIB table row
+ *
+ * PARAMS
+ * pTcpEntry [in] pointer to a MIB_TCPROW_OWNER_MODULE structure
+ * Class [in] TCPIP_OWNER_MODULE_INFO_CLASS enumeration value
+ * Buffer [out] pointer a buffer containing a TCPIP_OWNER_MODULE_BASIC_INFO
structure with the owner module data.
+ * pdwSize [in, out] estimated size of the structure returned in Buffer, in bytes
+ *
+ * RETURNS
+ * Success: NO_ERROR
+ * Failure: ERROR_INSUFFICIENT_BUFFER, ERROR_INVALID_PARAMETER, ERROR_NOT_ENOUGH_MEMORY
+ * ERROR_NOT_FOUND or ERROR_PARTIAL_COPY
+ *
+ * NOTES
+ * The type of data returned in Buffer is indicated by the value of the Class parameter.
+ */
+DWORD WINAPI GetOwnerModuleFromTcpEntry( PMIB_TCPROW_OWNER_MODULE pTcpEntry,
TCPIP_OWNER_MODULE_INFO_CLASS Class, PVOID Buffer, PDWORD pdwSize)
+{
+ DWORD ret = NO_ERROR;
+ UNIMPLEMENTED;
+ return ret;
+}
+
+
+/******************************************************************
* GetPerAdapterInfo (IPHLPAPI.@)
*
*
Modified: trunk/reactos/include/psdk/iphlpapi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/iphlpapi.h?re…
==============================================================================
--- trunk/reactos/include/psdk/iphlpapi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/iphlpapi.h [iso-8859-1] Sat Mar 6 19:30:55 2010
@@ -35,6 +35,7 @@
DWORD WINAPI GetIpStatisticsEx(PMIB_IPSTATS,DWORD);
DWORD WINAPI GetNetworkParams(PFIXED_INFO,PULONG);
DWORD WINAPI GetNumberOfInterfaces(PDWORD);
+DWORD WINAPI
GetOwnerModuleFromTcpEntry(PMIB_TCPROW_OWNER_MODULE,TCPIP_OWNER_MODULE_INFO_CLASS,PVOID,PDWORD);
DWORD WINAPI GetPerAdapterInfo(ULONG,PIP_PER_ADAPTER_INFO, PULONG);
BOOL WINAPI GetRTTAndHopCount(IPAddr,PULONG,ULONG,PULONG);
DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS);
Modified: trunk/reactos/include/psdk/iprtrmib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/iprtrmib.h?re…
==============================================================================
--- trunk/reactos/include/psdk/iprtrmib.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/iprtrmib.h [iso-8859-1] Sat Mar 6 19:30:55 2010
@@ -24,6 +24,9 @@
#define MAXLEN_IFDESCR 256
#define MAXLEN_PHYSADDR 8
+
+//It should be 16 according to Lei Shen blog
(
http://www.mychinaworks.com/blog/lshen/2008/04/16/220/
+#define TCPIP_OWNING_MODULE_SIZE 16
typedef struct _MIB_IFROW
{
@@ -286,6 +289,20 @@
MIB_IPNETROW table[1];
} MIB_IPNETTABLE, *PMIB_IPNETTABLE;
+typedef struct _MIB_TCPROW_OWNER_MODULE {
+ DWORD dwState;
+ DWORD dwLocalAddr;
+ DWORD dwLocalPort;
+ DWORD dwRemoteAddr;
+ DWORD dwRemotePort;
+ DWORD dwOwningPid;
+ LARGE_INTEGER liCreateTimestamp;
+ ULONGLONG OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE];
+} MIB_TCPROW_OWNER_MODULE, *PMIB_TCPROW_OWNER_MODULE;
+
+typedef enum {
+ TCPIP_OWNER_MODULE_INFO_BASIC
+} TCPIP_OWNER_MODULE_INFO_CLASS, *PTCPIP_OWNER_MODULE_INFO_CLASS;
typedef enum {
TCP_TABLE_BASIC_LISTENER,