https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8a98c85c1f7686a27db2c0...
commit 8a98c85c1f7686a27db2c095061f5224047c816f Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Tue Nov 20 22:12:47 2018 +0100 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Tue Nov 20 22:14:25 2018 +0100
[IPHLPAPI] Fix checking entity when enumerating TCP/UDP connections
This fixes the API not to return the current TCP connections while enumerating them (and thus, netstat not displaying them). It seems we return garbage for now though --- dll/win32/iphlpapi/ipstats_reactos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dll/win32/iphlpapi/ipstats_reactos.c b/dll/win32/iphlpapi/ipstats_reactos.c index 242626ea7e..d8ec38f32b 100644 --- a/dll/win32/iphlpapi/ipstats_reactos.c +++ b/dll/win32/iphlpapi/ipstats_reactos.c @@ -611,7 +611,7 @@ DWORD getNumUdpEntries(void) status = tdiGetEntityIDSet( tcpFile, &entitySet, &numEntities );
for( i = 0; i < numEntities; i++ ) { - if( isInterface( &entitySet[i] ) && + if( entitySet[i].tei_entity == CL_TL_ENTITY && hasArp( tcpFile, &entitySet[i] ) ) {
status = tdiGetSetOfThings( tcpFile, @@ -670,7 +670,7 @@ PMIB_UDPTABLE getUdpTable(void) status = tdiGetEntityIDSet( tcpFile, &entitySet, &numEntities );
for( i = 0; i < numEntities; i++ ) { - if( isInterface( &entitySet[i] ) && + if( entitySet[i].tei_entity == CL_TL_ENTITY && hasArp( tcpFile, &entitySet[i] ) ) {
status = tdiGetSetOfThings( tcpFile, @@ -721,7 +721,7 @@ DWORD getNumTcpEntries(void) status = tdiGetEntityIDSet( tcpFile, &entitySet, &numEntities );
for( i = 0; i < numEntities; i++ ) { - if( isInterface( &entitySet[i] ) && + if( entitySet[i].tei_entity == CO_TL_ENTITY && hasArp( tcpFile, &entitySet[i] ) ) {
status = tdiGetSetOfThings( tcpFile, @@ -780,7 +780,7 @@ PMIB_TCPTABLE getTcpTable(void) status = tdiGetEntityIDSet( tcpFile, &entitySet, &numEntities );
for( i = 0; i < numEntities; i++ ) { - if( isInterface( &entitySet[i] ) && + if( entitySet[i].tei_entity == CO_TL_ENTITY && hasArp( tcpFile, &entitySet[i] ) ) {
status = tdiGetSetOfThings( tcpFile,