ReactOS 0.4.16-dev-1204-gb627a42
ipstats_reactos.c File Reference
#include "iphlpapi_private.h"
Include dependency graph for ipstats_reactos.c:

Go to the source code of this file.

Classes

struct  _TABLE_CALL
 

Macros

#define TCPS_ESTABLISHED   TCP_ESTABLISHED
 
#define TCPS_SYN_SENT   TCP_SYN_SENT
 
#define TCPS_SYN_RECEIVED   TCP_SYN_RECV
 
#define TCPS_FIN_WAIT_1   TCP_FIN_WAIT1
 
#define TCPS_FIN_WAIT_2   TCP_FIN_WAIT2
 
#define TCPS_TIME_WAIT   TCP_TIME_WAIT
 
#define TCPS_CLOSED   TCP_CLOSE
 
#define TCPS_CLOSE_WAIT   TCP_CLOSE_WAIT
 
#define TCPS_LAST_ACK   TCP_LAST_ACK
 
#define TCPS_LISTEN   TCP_LISTEN
 
#define TCPS_CLOSING   TCP_CLOSING
 
#define Add2Ptr(PTR, INC)   (PVOID)((ULONG_PTR)(PTR) + (INC))
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (iphlpapi)
 
BOOL isIpEntity (HANDLE tcpFile, TDIEntityID *ent)
 
NTSTATUS getNthIpEntity (HANDLE tcpFile, DWORD index, TDIEntityID *ent)
 
static NTSTATUS tdiGetMibForIpEntity (_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_IPSTATS *entry)
 
static NTSTATUS tdiGetMibForTcpEntity (_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_TCPSTATS *entry)
 
static NTSTATUS tdiGetMibForUdpEntity (_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_UDPSTATS *entry)
 
NTSTATUS tdiGetRoutesForIpEntity (HANDLE tcpFile, TDIEntityID *ent, IPRouteEntry **routes, PDWORD numRoutes)
 
NTSTATUS tdiGetIpAddrsForIpEntity (HANDLE tcpFile, TDIEntityID *ent, IPAddrEntry **addrs, PDWORD numAddrs)
 
DWORD getInterfaceStatsByName (const char *name, PMIB_IFROW entry)
 
DWORD getInterfaceStatsByIndex (DWORD index, PMIB_IFROW entry)
 
DWORD getICMPStats (MIB_ICMP *stats)
 
DWORD getIPStats (_In_ HANDLE TcpFile, _Out_ PMIB_IPSTATS pStats)
 
DWORD getTCPStats (_In_ HANDLE TcpFile, _Out_ MIB_TCPSTATS *pStats)
 
DWORD getUDPStats (_In_ HANDLE TcpFile, _Out_ MIB_UDPSTATS *pStats)
 
DWORD getNumRoutes (void)
 
VOID HexDump (PCHAR Data, DWORD Len)
 
RouteTablegetRouteTable (void)
 
DWORD getNumArpEntries (void)
 
PMIB_IPNETTABLE getArpTable (void)
 
DWORD getNumUdpEntries (void)
 
PVOID getUdpTable (CLASS_TABLE Class)
 
DWORD getNumTcpEntries (void)
 
PVOID getTcpTable (CLASS_TABLE Class)
 

Variables

struct _TABLE_CALL UdpTcpTableCall []
 

Macro Definition Documentation

◆ Add2Ptr

#define Add2Ptr (   PTR,
  INC 
)    (PVOID)((ULONG_PTR)(PTR) + (INC))

Definition at line 721 of file ipstats_reactos.c.

◆ TCPS_CLOSE_WAIT

#define TCPS_CLOSE_WAIT   TCP_CLOSE_WAIT

Definition at line 48 of file ipstats_reactos.c.

◆ TCPS_CLOSED

#define TCPS_CLOSED   TCP_CLOSE

Definition at line 45 of file ipstats_reactos.c.

◆ TCPS_CLOSING

#define TCPS_CLOSING   TCP_CLOSING

Definition at line 57 of file ipstats_reactos.c.

◆ TCPS_ESTABLISHED

#define TCPS_ESTABLISHED   TCP_ESTABLISHED

Definition at line 27 of file ipstats_reactos.c.

◆ TCPS_FIN_WAIT_1

#define TCPS_FIN_WAIT_1   TCP_FIN_WAIT1

Definition at line 36 of file ipstats_reactos.c.

◆ TCPS_FIN_WAIT_2

#define TCPS_FIN_WAIT_2   TCP_FIN_WAIT2

Definition at line 39 of file ipstats_reactos.c.

◆ TCPS_LAST_ACK

#define TCPS_LAST_ACK   TCP_LAST_ACK

Definition at line 51 of file ipstats_reactos.c.

◆ TCPS_LISTEN

#define TCPS_LISTEN   TCP_LISTEN

Definition at line 54 of file ipstats_reactos.c.

◆ TCPS_SYN_RECEIVED

#define TCPS_SYN_RECEIVED   TCP_SYN_RECV

Definition at line 33 of file ipstats_reactos.c.

◆ TCPS_SYN_SENT

#define TCPS_SYN_SENT   TCP_SYN_SENT

Definition at line 30 of file ipstats_reactos.c.

◆ TCPS_TIME_WAIT

#define TCPS_TIME_WAIT   TCP_TIME_WAIT

Definition at line 42 of file ipstats_reactos.c.

Function Documentation

◆ getArpTable()

PMIB_IPNETTABLE getArpTable ( void  )

Definition at line 650 of file ipstats_reactos.c.

651{
652 DWORD numEntities, returnSize;
653 TDIEntityID *entitySet;
654 HANDLE tcpFile;
655 int i, totalNumber, TmpIdx, CurrIdx = 0;
657 PMIB_IPNETTABLE IpArpTable = NULL;
658 PMIB_IPNETROW AdapterArpTable = NULL;
659
660 TRACE("called.\n");
661
662 totalNumber = getNumArpEntries();
663
664 status = openTcpFile(&tcpFile, FILE_READ_DATA);
665 if (!NT_SUCCESS(status))
666 {
667 ERR("openTcpFile returned 0x%08lx\n", status);
668 return 0;
669 }
670
671 IpArpTable = HeapAlloc(GetProcessHeap(), 0,
672 sizeof(DWORD) + (sizeof(MIB_IPNETROW) * totalNumber));
673 if (!IpArpTable) {
674 closeTcpFile(tcpFile);
675 return NULL;
676 }
677
678 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
679
680 for (i = 0; i < numEntities; i++) {
681 if (isInterface(&entitySet[i]) && hasArp(tcpFile, &entitySet[i]))
682 {
683 status = tdiGetSetOfThings(tcpFile,
687 AT_ENTITY,
688 entitySet[i].tei_instance,
689 0,
690 sizeof(MIB_IPNETROW),
691 (PVOID *)&AdapterArpTable,
692 &returnSize);
693
694 if (status == STATUS_SUCCESS) {
695 for (TmpIdx = 0; TmpIdx < returnSize; TmpIdx++, CurrIdx++)
696 IpArpTable->table[CurrIdx] = AdapterArpTable[TmpIdx];
697 tdiFreeThingSet(AdapterArpTable);
698 }
699 }
700 }
701
702 closeTcpFile(tcpFile);
703 tdiFreeThingSet(entitySet);
704 IpArpTable->dwNumEntries = CurrIdx;
705 return IpArpTable;
706}
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BOOL hasArp(HANDLE tcpFile, TDIEntityID *arp_maybe)
BOOL isInterface(TDIEntityID *if_maybe)
DWORD getNumArpEntries(void)
#define FILE_READ_DATA
Definition: nt_native.h:628
NTSTATUS tdiGetSetOfThings(HANDLE tcpFile, DWORD toiClass, DWORD toiType, DWORD toiId, DWORD teiEntity, DWORD teiInstance, DWORD fixedPart, DWORD entrySize, PVOID *tdiEntitySet, PDWORD numEntries)
Definition: enum.c:24
VOID tdiFreeThingSet(PVOID things)
Definition: enum.c:118
NTSTATUS tdiGetEntityIDSet(HANDLE tcpFile, TDIEntityID **entitySet, PDWORD numEntities)
Definition: enum.c:122
NTSTATUS openTcpFile(PHANDLE tcpFile, ACCESS_MASK DesiredAccess)
Definition: handle.c:12
VOID closeTcpFile(HANDLE h)
Definition: handle.c:43
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwNumEntries
Definition: ipmib.h:127
MIB_IPNETROW table[1]
Definition: ipmib.h:128
Definition: ps.c:97
#define IP_MIB_ARPTABLE_ENTRY_ID
Definition: tcpioctl.h:54
#define INFO_CLASS_PROTOCOL
Definition: tdiinfo.h:65
#define AT_ENTITY
Definition: tdiinfo.h:41
#define INFO_TYPE_PROVIDER
Definition: tdiinfo.h:69

Referenced by GetIpNetTable().

◆ getICMPStats()

DWORD getICMPStats ( MIB_ICMP stats)

Definition at line 294 of file ipstats_reactos.c.

295{
296 FILE *fp;
297
298 if (!stats)
300
301 memset(stats, 0, sizeof(MIB_ICMP));
302 /* get most of these stats from /proc/net/snmp, no error if can't */
303 fp = fopen("/proc/net/snmp", "r");
304 if (fp) {
305 const char hdr[] = "Icmp:";
306 char buf[512] = { 0 }, *ptr;
307
308 do {
309 ptr = fgets(buf, sizeof(buf), fp);
310 } while (ptr && _strnicmp(buf, hdr, sizeof(hdr) - 1));
311 if (ptr) {
312 /* last line was a header, get another */
313 ptr = fgets(buf, sizeof(buf), fp);
314 if (ptr && _strnicmp(buf, hdr, sizeof(hdr) - 1) == 0) {
315 char *endPtr;
316
317 ptr += sizeof(hdr);
318 if (ptr && *ptr) {
319 stats->stats.icmpInStats.dwMsgs = strtoul(ptr, &endPtr, 10);
320 ptr = endPtr;
321 }
322 if (ptr && *ptr) {
323 stats->stats.icmpInStats.dwErrors = strtoul(ptr, &endPtr, 10);
324 ptr = endPtr;
325 }
326 if (ptr && *ptr) {
327 stats->stats.icmpInStats.dwDestUnreachs = strtoul(ptr, &endPtr, 10);
328 ptr = endPtr;
329 }
330 if (ptr && *ptr) {
331 stats->stats.icmpInStats.dwTimeExcds = strtoul(ptr, &endPtr, 10);
332 ptr = endPtr;
333 }
334 if (ptr && *ptr) {
335 stats->stats.icmpInStats.dwParmProbs = strtoul(ptr, &endPtr, 10);
336 ptr = endPtr;
337 }
338 if (ptr && *ptr) {
339 stats->stats.icmpInStats.dwSrcQuenchs = strtoul(ptr, &endPtr, 10);
340 ptr = endPtr;
341 }
342 if (ptr && *ptr) {
343 stats->stats.icmpInStats.dwRedirects = strtoul(ptr, &endPtr, 10);
344 ptr = endPtr;
345 }
346 if (ptr && *ptr) {
347 stats->stats.icmpInStats.dwEchoReps = strtoul(ptr, &endPtr, 10);
348 ptr = endPtr;
349 }
350 if (ptr && *ptr) {
351 stats->stats.icmpInStats.dwTimestamps = strtoul(ptr, &endPtr, 10);
352 ptr = endPtr;
353 }
354 if (ptr && *ptr) {
355 stats->stats.icmpInStats.dwTimestampReps = strtoul(ptr, &endPtr, 10);
356 ptr = endPtr;
357 }
358 if (ptr && *ptr) {
359 stats->stats.icmpInStats.dwAddrMasks = strtoul(ptr, &endPtr, 10);
360 ptr = endPtr;
361 }
362 if (ptr && *ptr) {
363 stats->stats.icmpInStats.dwAddrMaskReps = strtoul(ptr, &endPtr, 10);
364 ptr = endPtr;
365 }
366 if (ptr && *ptr) {
367 stats->stats.icmpOutStats.dwMsgs = strtoul(ptr, &endPtr, 10);
368 ptr = endPtr;
369 }
370 if (ptr && *ptr) {
371 stats->stats.icmpOutStats.dwErrors = strtoul(ptr, &endPtr, 10);
372 ptr = endPtr;
373 }
374 if (ptr && *ptr) {
375 stats->stats.icmpOutStats.dwDestUnreachs = strtoul(ptr, &endPtr, 10);
376 ptr = endPtr;
377 }
378 if (ptr && *ptr) {
379 stats->stats.icmpOutStats.dwTimeExcds = strtoul(ptr, &endPtr, 10);
380 ptr = endPtr;
381 }
382 if (ptr && *ptr) {
383 stats->stats.icmpOutStats.dwParmProbs = strtoul(ptr, &endPtr, 10);
384 ptr = endPtr;
385 }
386 if (ptr && *ptr) {
387 stats->stats.icmpOutStats.dwSrcQuenchs = strtoul(ptr, &endPtr, 10);
388 ptr = endPtr;
389 }
390 if (ptr && *ptr) {
391 stats->stats.icmpOutStats.dwRedirects = strtoul(ptr, &endPtr, 10);
392 ptr = endPtr;
393 }
394 if (ptr && *ptr) {
395 stats->stats.icmpOutStats.dwEchoReps = strtoul(ptr, &endPtr, 10);
396 ptr = endPtr;
397 }
398 if (ptr && *ptr) {
399 stats->stats.icmpOutStats.dwTimestamps = strtoul(ptr, &endPtr, 10);
400 ptr = endPtr;
401 }
402 if (ptr && *ptr) {
403 stats->stats.icmpOutStats.dwTimestampReps = strtoul(ptr, &endPtr, 10);
404 ptr = endPtr;
405 }
406 if (ptr && *ptr) {
407 stats->stats.icmpOutStats.dwAddrMasks = strtoul(ptr, &endPtr, 10);
408 ptr = endPtr;
409 }
410 if (ptr && *ptr) {
411 stats->stats.icmpOutStats.dwAddrMaskReps = strtoul(ptr, &endPtr, 10);
412 ptr = endPtr;
413 }
414 }
415 }
416 fclose(fp);
417 }
418 return NO_ERROR;
419}
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
Definition: utclib.c:696
#define NO_ERROR
Definition: dderror.h:5
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
char hdr[14]
Definition: iptest.cpp:33
static PVOID ptr
Definition: dispmode.c:27
#define memset(x, y, z)
Definition: compat.h:39
MIBICMPSTATS icmpOutStats
Definition: ipmib.h:194
MIBICMPSTATS icmpInStats
Definition: ipmib.h:193
DWORD dwTimeExcds
Definition: ipmib.h:179
DWORD dwAddrMasks
Definition: ipmib.h:187
DWORD dwEchoReps
Definition: ipmib.h:184
DWORD dwParmProbs
Definition: ipmib.h:180
DWORD dwAddrMaskReps
Definition: ipmib.h:188
DWORD dwSrcQuenchs
Definition: ipmib.h:181
DWORD dwTimestamps
Definition: ipmib.h:185
DWORD dwRedirects
Definition: ipmib.h:182
DWORD dwMsgs
Definition: ipmib.h:176
DWORD dwErrors
Definition: ipmib.h:177
DWORD dwTimestampReps
Definition: ipmib.h:186
DWORD dwDestUnreachs
Definition: ipmib.h:178
MIBICMPINFO stats
Definition: ipmib.h:199

Referenced by GetIcmpStatistics().

◆ getInterfaceStatsByIndex()

DWORD getInterfaceStatsByIndex ( DWORD  index,
PMIB_IFROW  entry 
)

Definition at line 289 of file ipstats_reactos.c.

290{
292}

◆ getInterfaceStatsByName()

DWORD getInterfaceStatsByName ( const char name,
PMIB_IFROW  entry 
)

Definition at line 279 of file ipstats_reactos.c.

280{
281 if (!name)
283 if (!entry)
285
286 return NO_ERROR;
287}
uint32_t entry
Definition: isohybrid.c:63
Definition: name.c:39

Referenced by GetIfEntry().

◆ getIPStats()

DWORD getIPStats ( _In_ HANDLE  TcpFile,
_Out_ PMIB_IPSTATS  pStats 
)

Definition at line 421 of file ipstats_reactos.c.

424{
425 TDIEntityID ent;
427
429 ent.tei_instance = 0;
430
431 Status = tdiGetMibForIpEntity(TcpFile, &ent, pStats);
432
433 if (!NT_SUCCESS(Status))
435
436 return NO_ERROR;
437}
Status
Definition: gdiplustypes.h:25
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
static NTSTATUS tdiGetMibForIpEntity(_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_IPSTATS *entry)
ULONG tei_entity
Definition: tdiinfo.h:31
ULONG tei_instance
Definition: tdiinfo.h:32
#define CL_NL_ENTITY
Definition: tdiinfo.h:42

◆ getNthIpEntity()

NTSTATUS getNthIpEntity ( HANDLE  tcpFile,
DWORD  index,
TDIEntityID ent 
)

Prototypes

Definition at line 65 of file ipstats_reactos.c.

65 {
66 DWORD numEntities = 0;
67 DWORD numRoutes = 0;
68 TDIEntityID *entitySet = 0;
69 NTSTATUS status = tdiGetEntityIDSet( tcpFile, &entitySet, &numEntities );
70 int i;
71
72 if( !NT_SUCCESS(status) )
73 return status;
74
75 for( i = 0; i < numEntities; i++ ) {
76 if( isIpEntity( tcpFile, &entitySet[i] ) ) {
77 TRACE("Entity %d is an IP Entity\n", i);
78 if( numRoutes == index ) break;
79 else numRoutes++;
80 }
81 }
82
83 if( numRoutes == index && i < numEntities ) {
84 TRACE("Index %lu is entity #%d - %04x:%08x\n", index, i,
85 entitySet[i].tei_entity, entitySet[i].tei_instance);
86 memcpy( ent, &entitySet[i], sizeof(*ent) );
87 tdiFreeThingSet( entitySet );
88 return STATUS_SUCCESS;
89 } else {
90 tdiFreeThingSet( entitySet );
92 }
93}
GLuint index
Definition: glext.h:6031
BOOL isIpEntity(HANDLE tcpFile, TDIEntityID *ent)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132

Referenced by createIpForwardEntry(), deleteIpForwardEntry(), getInterfaceInfoSet(), getRouteTable(), and SetIpNetEntry().

◆ getNumArpEntries()

DWORD getNumArpEntries ( void  )

Definition at line 602 of file ipstats_reactos.c.

603{
604 DWORD numEntities;
605 TDIEntityID *entitySet = NULL;
606 HANDLE tcpFile;
607 int i, totalNumber = 0;
609 PMIB_IPNETROW IpArpTable = NULL;
610 DWORD returnSize;
611
612 TRACE("called.\n");
613
614 status = openTcpFile(&tcpFile, FILE_READ_DATA);
615 if (!NT_SUCCESS(status))
616 {
617 ERR("openTcpFile returned 0x%08lx\n", status);
618 return 0;
619 }
620
621 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
622
623 for (i = 0; i < numEntities; i++) {
624 if (isInterface(&entitySet[i]) && hasArp(tcpFile, &entitySet[i]))
625 {
626 status = tdiGetSetOfThings(tcpFile,
630 AT_ENTITY,
631 entitySet[i].tei_instance,
632 0,
633 sizeof(MIB_IPNETROW),
634 (PVOID *)&IpArpTable,
635 &returnSize);
636
637 if (status == STATUS_SUCCESS) totalNumber += returnSize;
638 if (IpArpTable) {
639 tdiFreeThingSet(IpArpTable);
640 IpArpTable = NULL;
641 }
642 }
643 }
644
645 closeTcpFile(tcpFile);
646 if (entitySet) tdiFreeThingSet(entitySet);
647 return totalNumber;
648}

Referenced by getArpTable(), and GetIpNetTable().

◆ getNumRoutes()

DWORD getNumRoutes ( void  )

Definition at line 475 of file ipstats_reactos.c.

476{
477 DWORD numEntities, numRoutes = 0;
478 TDIEntityID *entitySet;
479 HANDLE tcpFile;
480 int i;
482
483 TRACE("called.\n");
484
485 status = openTcpFile(&tcpFile, FILE_READ_DATA);
486 if (!NT_SUCCESS(status))
487 {
488 ERR("openTcpFile returned 0x%08lx\n", status);
489 return 0;
490 }
491
492 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
493 if (!NT_SUCCESS(status)) {
494 ERR("tdiGetEntityIDSet returned 0x%08lx\n", status);
495 closeTcpFile( tcpFile );
496 return 0;
497 }
498
499 for (i = 0; i < numEntities; i++) {
500 if (isIpEntity(tcpFile, &entitySet[i])) {
501 MIB_IPSTATS ipstats;
502 memset(&ipstats, 0, sizeof(ipstats));
503 status = tdiGetMibForIpEntity(tcpFile, &entitySet[i], &ipstats);
504 if (!NT_SUCCESS(status)) {
505 ERR("tdiGetMibForIpEntity returned 0x%08lx, for i = %d\n", status, i);
506 numRoutes = 0;
507 break;
508 }
509 numRoutes += ipstats.dwNumRoutes;
510 }
511 }
512
513 TRACE("numRoutes = %lu\n", numRoutes);
514
515 tdiFreeThingSet(entitySet);
516 closeTcpFile(tcpFile);
517
518 return numRoutes;
519}
DWORD dwNumRoutes
Definition: ipmib.h:168

Referenced by getInterfaceGatewayByIndex(), GetIpForwardTable(), and getRouteTable().

◆ getNumTcpEntries()

DWORD getNumTcpEntries ( void  )

Definition at line 831 of file ipstats_reactos.c.

832{
833 DWORD numEntities;
834 TDIEntityID *entitySet = NULL;
835 HANDLE tcpFile;
836 int i, totalNumber = 0;
838 PMIB_TCPROW IpTcpTable = NULL;
839 DWORD returnSize;
840
841 TRACE("called.\n");
842
843 status = openTcpFile(&tcpFile, FILE_READ_DATA);
844 if (!NT_SUCCESS(status))
845 {
846 ERR("openTcpFile returned 0x%08lx\n", status);
847 return 0;
848 }
849
850 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
851
852 for (i = 0; i < numEntities; i++) {
853 if (entitySet[i].tei_entity == CO_TL_ENTITY && hasArp(tcpFile, &entitySet[i]))
854 {
855 status = tdiGetSetOfThings(tcpFile,
860 entitySet[i].tei_instance,
861 0,
862 sizeof(MIB_TCPROW),
863 (PVOID *)&IpTcpTable,
864 &returnSize);
865
866 if (status == STATUS_SUCCESS) totalNumber += returnSize;
867 if (IpTcpTable) {
868 tdiFreeThingSet(IpTcpTable);
869 IpTcpTable = NULL;
870 }
871 }
872 }
873
874 closeTcpFile(tcpFile);
875 if (entitySet) tdiFreeThingSet(entitySet);
876 return totalNumber;
877}
#define CO_TL_ENTITY
Definition: tdiinfo.h:45

Referenced by getTcpTable().

◆ getNumUdpEntries()

DWORD getNumUdpEntries ( void  )

Definition at line 723 of file ipstats_reactos.c.

724{
725 DWORD numEntities;
726 TDIEntityID *entitySet = NULL;
727 HANDLE tcpFile;
728 int i, totalNumber = 0;
730 PMIB_UDPROW IpUdpTable = NULL;
731 DWORD returnSize;
732
733 TRACE("called.\n");
734
735 status = openTcpFile(&tcpFile, FILE_READ_DATA);
736 if (!NT_SUCCESS(status))
737 {
738 ERR("openTcpFile returned 0x%08lx\n", status);
739 return 0;
740 }
741
742 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
743
744 for (i = 0; i < numEntities; i++) {
745 if (entitySet[i].tei_entity == CL_TL_ENTITY && hasArp(tcpFile, &entitySet[i]))
746 {
747 status = tdiGetSetOfThings(tcpFile,
752 entitySet[i].tei_instance,
753 0,
754 sizeof(MIB_UDPROW),
755 (PVOID *)&IpUdpTable,
756 &returnSize);
757
758 if (status == STATUS_SUCCESS) totalNumber += returnSize;
759 if (IpUdpTable) {
760 tdiFreeThingSet(IpUdpTable);
761 IpUdpTable = NULL;
762 }
763 }
764 }
765
766 closeTcpFile(tcpFile);
767 if (entitySet) tdiFreeThingSet(entitySet);
768 return totalNumber;
769}
#define CL_TL_ENTITY
Definition: tdiinfo.h:43

Referenced by getUdpTable().

◆ getRouteTable()

RouteTable * getRouteTable ( void  )

Definition at line 534 of file ipstats_reactos.c.

535{
536 RouteTable *out_route_table;
537 DWORD numRoutes = getNumRoutes(), routesAdded = 0;
538 TDIEntityID ent;
539 HANDLE tcpFile;
541 int i;
542
543 if (!NT_SUCCESS(status))
544 return 0;
545
546 TRACE("GETTING ROUTE TABLE\n");
547
548 out_route_table = HeapAlloc(GetProcessHeap(), 0,
549 sizeof(RouteTable) +
550 (sizeof(RouteEntry) * (numRoutes - 1)));
551 if (!out_route_table) {
552 closeTcpFile(tcpFile);
553 return NULL;
554 }
555
556 out_route_table->numRoutes = numRoutes;
557
558 for (i = 0; routesAdded < out_route_table->numRoutes; i++) {
559 int j;
560 IPRouteEntry *route_set;
561
562 getNthIpEntity(tcpFile, i, &ent);
563
564 tdiGetRoutesForIpEntity(tcpFile, &ent, &route_set, &numRoutes);
565 if (!route_set) {
566 closeTcpFile(tcpFile);
567 HeapFree(GetProcessHeap(), 0, out_route_table);
568 return 0;
569 }
570
571 TRACE("%lu routes in instance %d\n", numRoutes, i);
572#if 0
573 HexDump(route_set,
574 sizeof(IPRouteEntry) *
575 snmpInfo.ipsi_numroutes);
576#endif
577
578 for (j = 0; j < numRoutes; j++) {
579 int routeNum = j + routesAdded;
580 out_route_table->routes[routeNum].dest =
581 route_set[j].ire_dest;
582 out_route_table->routes[routeNum].mask =
583 route_set[j].ire_mask;
584 out_route_table->routes[routeNum].gateway =
585 route_set[j].ire_gw;
586 out_route_table->routes[routeNum].ifIndex =
587 route_set[j].ire_index;
588 out_route_table->routes[routeNum].metric =
589 route_set[j].ire_metric1;
590 }
591
592 if (route_set) tdiFreeThingSet(route_set);
593
594 routesAdded += numRoutes;
595 }
596
597 closeTcpFile(tcpFile);
598 TRACE("status = 0x%08lx, out_route_table = 0x%p\n", status, out_route_table);
599 return out_route_table;
600}
#define HeapFree(x, y, z)
Definition: compat.h:735
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
VOID HexDump(PCHAR Data, DWORD Len)
DWORD getNumRoutes(void)
NTSTATUS getNthIpEntity(HANDLE tcpFile, DWORD index, TDIEntityID *ent)
NTSTATUS tdiGetRoutesForIpEntity(HANDLE tcpFile, TDIEntityID *ent, IPRouteEntry **routes, PDWORD numRoutes)
unsigned long ire_metric1
Definition: tcp_info.c:26
unsigned long ire_dest
Definition: tcp_info.c:24
unsigned long ire_index
Definition: tcp_info.c:25
unsigned long ire_mask
Definition: tcp_info.c:34
DWORD ifIndex
Definition: ipstats.h:70
DWORD metric
Definition: ipstats.h:71
DWORD mask
Definition: ipstats.h:68
DWORD gateway
Definition: ipstats.h:69
DWORD dest
Definition: ipstats.h:67
RouteEntry routes[1]
Definition: ipstats.h:76
DWORD numRoutes
Definition: ipstats.h:75

Referenced by getInterfaceGatewayByIndex(), and GetIpForwardTable().

◆ getTCPStats()

DWORD getTCPStats ( _In_ HANDLE  TcpFile,
_Out_ MIB_TCPSTATS pStats 
)

Definition at line 439 of file ipstats_reactos.c.

442{
443 TDIEntityID ent;
445
447 ent.tei_instance = 0;
448
449 Status = tdiGetMibForTcpEntity(TcpFile, &ent, pStats);
450
451 if (!NT_SUCCESS(Status))
453
454 return NO_ERROR;
455}
static NTSTATUS tdiGetMibForTcpEntity(_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_TCPSTATS *entry)

◆ getTcpTable()

PVOID getTcpTable ( CLASS_TABLE  Class)

Definition at line 879 of file ipstats_reactos.c.

880{
881 DWORD numEntities, returnSize;
882 TDIEntityID *entitySet;
883 HANDLE tcpFile;
884 int i, totalNumber, TmpIdx, CurrIdx = 0;
886 PMIB_TCPTABLE IpTcpTable = NULL;
887 PVOID AdapterTcpTable = NULL;
888
889 TRACE("called.\n");
890
891 totalNumber = getNumTcpEntries();
892
893 status = openTcpFile(&tcpFile, FILE_READ_DATA);
894 if (!NT_SUCCESS(status))
895 {
896 ERR("openTcpFile returned 0x%08lx\n", status);
897 return 0;
898 }
899
900 IpTcpTable = HeapAlloc(GetProcessHeap(), 0,
901 UdpTcpTableCall[Class].TcpOffset + (UdpTcpTableCall[Class].TcpSize * totalNumber));
902 if (!IpTcpTable) {
903 closeTcpFile(tcpFile);
904 return NULL;
905 }
906
907 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
908
909 for (i = 0; i < numEntities; i++) {
910 if (entitySet[i].tei_entity == CO_TL_ENTITY && hasArp(tcpFile, &entitySet[i]))
911 {
912 status = tdiGetSetOfThings(tcpFile,
915 UdpTcpTableCall[Class].TOIID,
917 entitySet[i].tei_instance,
918 0,
919 UdpTcpTableCall[Class].TcpSize,
920 &AdapterTcpTable,
921 &returnSize);
922
923 if (status == STATUS_SUCCESS) {
924 for (TmpIdx = 0; TmpIdx < returnSize; TmpIdx++, CurrIdx++)
925 CopyMemory(Add2Ptr(IpTcpTable, UdpTcpTableCall[Class].TcpOffset + UdpTcpTableCall[Class].TcpSize * CurrIdx),
926 Add2Ptr(AdapterTcpTable, UdpTcpTableCall[Class].TcpSize * TmpIdx),
927 UdpTcpTableCall[Class].TcpSize);
928 tdiFreeThingSet(AdapterTcpTable);
929 }
930 }
931 }
932
933 closeTcpFile(tcpFile);
934 tdiFreeThingSet(entitySet);
935 IpTcpTable->dwNumEntries = CurrIdx;
936 return IpTcpTable;
937}
#define Add2Ptr(PTR, INC)
DWORD getNumTcpEntries(void)
struct _TABLE_CALL UdpTcpTableCall[]
DWORD dwNumEntries
Definition: tcpmib.h:66
#define CopyMemory
Definition: winbase.h:1751

Referenced by GetExtendedTcpTable().

◆ getUDPStats()

DWORD getUDPStats ( _In_ HANDLE  TcpFile,
_Out_ MIB_UDPSTATS pStats 
)

Definition at line 457 of file ipstats_reactos.c.

460{
461 TDIEntityID ent;
463
465 ent.tei_instance = 0;
466
467 Status = tdiGetMibForUdpEntity(TcpFile, &ent, pStats);
468
469 if (!NT_SUCCESS(Status))
471
472 return NO_ERROR;
473}
static NTSTATUS tdiGetMibForUdpEntity(_In_ HANDLE tcpFile, _In_ TDIEntityID *ent, _Out_ MIB_UDPSTATS *entry)

◆ getUdpTable()

PVOID getUdpTable ( CLASS_TABLE  Class)

Definition at line 771 of file ipstats_reactos.c.

772{
773 DWORD numEntities, returnSize;
774 TDIEntityID *entitySet;
775 HANDLE tcpFile;
776 int i, totalNumber, TmpIdx, CurrIdx = 0;
778 PMIB_UDPTABLE IpUdpTable = NULL;
779 PVOID AdapterUdpTable = NULL;
780
781 TRACE("called.\n");
782
783 totalNumber = getNumUdpEntries();
784
785 status = openTcpFile(&tcpFile, FILE_READ_DATA);
786 if (!NT_SUCCESS(status))
787 {
788 ERR("openTcpFile returned 0x%08lx\n", status);
789 return 0;
790 }
791
792 IpUdpTable = HeapAlloc(GetProcessHeap(), 0,
793 UdpTcpTableCall[Class].UdpOffset + (UdpTcpTableCall[Class].UdpSize * totalNumber));
794 if (!IpUdpTable) {
795 closeTcpFile(tcpFile);
796 return NULL;
797 }
798
799 status = tdiGetEntityIDSet(tcpFile, &entitySet, &numEntities);
800
801 for (i = 0; i < numEntities; i++) {
802 if (entitySet[i].tei_entity == CL_TL_ENTITY && hasArp(tcpFile, &entitySet[i]))
803 {
804 status = tdiGetSetOfThings(tcpFile,
807 UdpTcpTableCall[Class].TOIID,
809 entitySet[i].tei_instance,
810 0,
811 UdpTcpTableCall[Class].UdpSize,
812 &AdapterUdpTable,
813 &returnSize);
814
815 if (status == STATUS_SUCCESS) {
816 for (TmpIdx = 0; TmpIdx < returnSize; TmpIdx++, CurrIdx++)
817 CopyMemory(Add2Ptr(IpUdpTable, UdpTcpTableCall[Class].UdpOffset + UdpTcpTableCall[Class].UdpSize * CurrIdx),
818 Add2Ptr(AdapterUdpTable, UdpTcpTableCall[Class].UdpSize * TmpIdx),
819 UdpTcpTableCall[Class].UdpSize);
820 tdiFreeThingSet(AdapterUdpTable);
821 }
822 }
823 }
824
825 closeTcpFile(tcpFile);
826 tdiFreeThingSet(entitySet);
827 IpUdpTable->dwNumEntries = CurrIdx;
828 return IpUdpTable;
829}
DWORD getNumUdpEntries(void)
DWORD dwNumEntries
Definition: udpmib.h:34

Referenced by GetExtendedUdpTable().

◆ HexDump()

VOID HexDump ( PCHAR  Data,
DWORD  Len 
)

Definition at line 521 of file ipstats_reactos.c.

521 {
522 int i;
523
524 for( i = 0; i < Len; i++ ) {
525 if( !(i & 0xf) ) {
526 if( i ) fprintf(stderr,"\n");
527 fprintf(stderr,"%08x:", i);
528 }
529 fprintf( stderr, " %02x", Data[i] & 0xff );
530 }
531 fprintf(stderr,"\n");
532}
#define Len
Definition: deflate.h:82
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)

Referenced by getRouteTable().

◆ isIpEntity()

BOOL isIpEntity ( HANDLE  tcpFile,
TDIEntityID ent 
)

Definition at line 60 of file ipstats_reactos.c.

60 {
61 return (ent->tei_entity == CL_NL_ENTITY ||
62 ent->tei_entity == CO_NL_ENTITY);
63}
#define CO_NL_ENTITY
Definition: tdiinfo.h:44

Referenced by getNthIpEntity(), and getNumRoutes().

◆ tdiGetIpAddrsForIpEntity()

NTSTATUS tdiGetIpAddrsForIpEntity ( HANDLE  tcpFile,
TDIEntityID ent,
IPAddrEntry **  addrs,
PDWORD  numAddrs 
)

Definition at line 258 of file ipstats_reactos.c.

259 {
261
262 TRACE("TdiGetIpAddrsForIpEntity(tcpFile 0x%p, entityId 0x%x)\n",
263 tcpFile, ent->tei_instance);
264
265 status = tdiGetSetOfThings(tcpFile,
270 ent->tei_instance,
271 0,
272 sizeof(IPAddrEntry),
273 (PVOID *)addrs,
274 numAddrs);
275
276 return status;
277}
#define IP_MIB_ADDRTABLE_ENTRY_ID
Definition: afd.h:36

Referenced by getInterfaceInfoSet().

◆ tdiGetMibForIpEntity()

static NTSTATUS tdiGetMibForIpEntity ( _In_ HANDLE  tcpFile,
_In_ TDIEntityID ent,
_Out_ MIB_IPSTATS entry 
)
static

Definition at line 96 of file ipstats_reactos.c.

100{
103 DWORD returnSize;
104
105 ZeroMemory(entry, sizeof(*entry));
106
107 TRACE("TdiGetMibForIpEntity(tcpFile 0x%p, entityId 0x%x)\n",
108 tcpFile, ent->tei_instance);
109
113 req.ID.toi_entity = *ent;
114
115 Status = DeviceIoControl(tcpFile,
117 &req,
118 sizeof(req),
119 entry,
120 sizeof(*entry),
121 &returnSize,
122 NULL);
123
124 TRACE("TdiGetMibForIpEntity() => status = 0x%08lx, entry = {\n"
125 " ipsi_forwarding ............ %lu\n"
126 " ipsi_defaultttl ............ %lu\n"
127 " ipsi_inreceives ............ %lu\n"
128 " ipsi_indelivers ............ %lu\n"
129 " ipsi_outrequests ........... %lu\n"
130 " ipsi_routingdiscards ....... %lu\n"
131 " ipsi_outdiscards ........... %lu\n"
132 " ipsi_outnoroutes ........... %lu\n"
133 " ipsi_numif ................. %lu\n"
134 " ipsi_numaddr ............... %lu\n"
135 " ipsi_numroutes ............. %lu\n"
136 "}\n",
137 Status,
138 entry->dwForwarding,
139 entry->dwDefaultTTL,
140 entry->dwInReceives,
141 entry->dwInDelivers,
142 entry->dwOutRequests,
143 entry->dwRoutingDiscards,
144 entry->dwOutDiscards,
145 entry->dwOutNoRoutes,
146 entry->dwNumIf,
147 entry->dwNumAddr,
148 entry->dwNumRoutes);
149
150 return Status;
151}
#define IP_MIB_STATS_ID
Definition: afd.h:35
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define TCP_REQUEST_QUERY_INFORMATION_INIT
ULONG toi_id
Definition: tdiinfo.h:77
ULONG toi_type
Definition: tdiinfo.h:76
ULONG toi_class
Definition: tdiinfo.h:75
TDIEntityID toi_entity
Definition: tdiinfo.h:74
#define IOCTL_TCP_QUERY_INFORMATION_EX
Definition: tditest.h:110
#define ZeroMemory
Definition: winbase.h:1753

Referenced by getIPStats(), and getNumRoutes().

◆ tdiGetMibForTcpEntity()

static NTSTATUS tdiGetMibForTcpEntity ( _In_ HANDLE  tcpFile,
_In_ TDIEntityID ent,
_Out_ MIB_TCPSTATS entry 
)
static

Definition at line 154 of file ipstats_reactos.c.

158{
161 DWORD returnSize;
162
163 ZeroMemory(entry, sizeof(*entry));
164
165 TRACE("TdiGetMibForTcpEntity(tcpFile 0x%p, entityId 0x%x)\n",
166 tcpFile, ent->tei_instance);
167
171 req.ID.toi_entity = *ent;
172
173 Status = DeviceIoControl(tcpFile,
175 &req,
176 sizeof(req),
177 entry,
178 sizeof(*entry),
179 &returnSize,
180 NULL);
181
182 TRACE("TdiGetMibForTcpEntity() => status = 0x%08lx, entry = {\n"
183 " dwInSegs ............. %lu\n"
184 " dwOutSegs ............ %lu\n"
185 " dwNumConns ........... %lu\n"
186 "}\n",
187 Status,
188 entry->dwInSegs,
189 entry->dwOutSegs,
190 entry->dwNumConns);
191
192 return Status;
193}
#define TCP_MIB_STAT_ID
Definition: info.h:63

Referenced by getTCPStats().

◆ tdiGetMibForUdpEntity()

static NTSTATUS tdiGetMibForUdpEntity ( _In_ HANDLE  tcpFile,
_In_ TDIEntityID ent,
_Out_ MIB_UDPSTATS entry 
)
static

Definition at line 196 of file ipstats_reactos.c.

200{
203 DWORD returnSize;
204
205 ZeroMemory(entry, sizeof(*entry));
206
207 TRACE("TdiGetMibForUdpEntity(tcpFile 0x%p, entityId 0x%x)\n",
208 tcpFile, ent->tei_instance);
209
213 req.ID.toi_entity = *ent;
214
215 Status = DeviceIoControl(tcpFile,
217 &req,
218 sizeof(req),
219 entry,
220 sizeof(*entry),
221 &returnSize,
222 NULL);
223
224 TRACE("TdiGetMibForUdpEntity() => status = 0x%08lx, entry = {\n"
225 " dwInDatagrams ....... %lu\n"
226 " dwOutDatagrams ...... %lu\n"
227 " dwNumAddrs .......... %lu\n"
228 "}\n",
229 Status,
230 entry->dwInDatagrams,
231 entry->dwOutDatagrams,
232 entry->dwNumAddrs);
233
234 return Status;
235}
#define UDP_MIB_STAT_ID
Definition: info.h:64

Referenced by getUDPStats().

◆ tdiGetRoutesForIpEntity()

NTSTATUS tdiGetRoutesForIpEntity ( HANDLE  tcpFile,
TDIEntityID ent,
IPRouteEntry **  routes,
PDWORD  numRoutes 
)

Definition at line 237 of file ipstats_reactos.c.

238 {
240
241 TRACE("TdiGetRoutesForIpEntity(tcpFile 0x%p, entityId 0x%x)\n",
242 tcpFile, ent->tei_instance);
243
244 status = tdiGetSetOfThings(tcpFile,
249 ent->tei_instance,
250 0,
251 sizeof(IPRouteEntry),
252 (PVOID *)routes,
253 numRoutes);
254
255 return status;
256}

Referenced by getRouteTable().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( iphlpapi  )

Variable Documentation

◆ UdpTcpTableCall