ReactOS  0.4.15-dev-489-g75a0787
ipstats.h
Go to the documentation of this file.
1 /* ipstats.h
2  * Copyright (C) 2003 Juan Lang
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * This module implements functions shared by DLLs that need to get network-
19  * related statistics. It's meant to hide some platform-specificisms, and
20  * share code that was previously duplicated.
21  */
22 #ifndef WINE_IPSTATS_H_
23 #define WINE_IPSTATS_H_
24 
25 //#include <stdarg.h>
26 
27 //#include "windef.h"
28 //#include "winbase.h"
29 //#include "iprtrmib.h"
30 
31 /* Fills in entry's interface stats, using name to find them.
32  * Returns ERROR_INVALID_PARAMETER if name or entry is NULL, NO_ERROR otherwise.
33  */
35 
36 /* Ditto above by index. */
38 
39 /* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
40  * NULL, NO_ERROR otherwise.
41  */
43 
44 /* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
45  * NULL, NO_ERROR otherwise.
46  */
47 DWORD getIPStats(PMIB_IPSTATS stats, DWORD family);
48 
49 /* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
50  * NULL, NO_ERROR otherwise.
51  */
52 DWORD getTCPStats(MIB_TCPSTATS *stats, DWORD family);
53 
54 /* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
55  * NULL, NO_ERROR otherwise.
56  */
57 DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family);
58 
59 /* Route table functions */
60 
61 DWORD getNumRoutes(void);
62 
63 /* Minimalist route entry, only has the fields I can actually fill in. How
64  * these map to the different windows route data structures is up to you.
65  */
66 typedef struct _RouteEntry {
72 } RouteEntry;
73 
74 typedef struct _RouteTable {
77 } RouteTable;
78 
79 typedef enum _CLASS_TABLE {
83 } CLASS_TABLE;
84 
85 /* Allocates and returns to you the route table, or NULL if it can't allocate
86  * enough memory. HeapFree() the returned table.
87  */
89 
90 /* Returns the number of entries in the arp table. */
92 
93 /* Allocates and returns to you the arp table, or NULL if it can't allocate
94  * enough memory. HeapFree() the returned table.
95  */
97 
98 /* Returns the number of entries in the UDP state table. */
100 
101 /* Allocates and returns to you the UDP state table, or NULL if it can't
102  * allocate enough memory. HeapFree() the returned table.
103  */
105 
106 /* Returns the number of entries in the TCP state table. */
107 DWORD getNumTcpEntries(void);
108 
109 /* Allocates and returns to you the TCP state table, or NULL if it can't
110  * allocate enough memory. HeapFree() the returned table.
111  */
113 
114 #endif /* ndef WINE_IPSTATS_H_ */
PVOID getTcpTable(CLASS_TABLE Class)
RouteTable * getRouteTable(void)
DWORD getNumArpEntries(void)
RouteEntry routes[1]
Definition: ipstats.h:76
DWORD getInterfaceStatsByIndex(DWORD index, PMIB_IFROW entry)
DWORD ifIndex
Definition: ipstats.h:70
DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family)
DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry)
enum _CLASS_TABLE CLASS_TABLE
DWORD getNumRoutes(void)
GLuint index
Definition: glext.h:6031
DWORD getNumUdpEntries(void)
unsigned long DWORD
Definition: ntddk_ex.h:95
PMIB_IPNETTABLE getArpTable(void)
DWORD getTCPStats(MIB_TCPSTATS *stats, DWORD family)
DWORD getIPStats(PMIB_IPSTATS stats, DWORD family)
struct _RouteTable RouteTable
uint32_t entry
Definition: isohybrid.c:63
DWORD metric
Definition: ipstats.h:71
DWORD getICMPStats(MIB_ICMP *stats)
struct _RouteEntry RouteEntry
DWORD getNumTcpEntries(void)
Definition: name.c:38
DWORD dest
Definition: ipstats.h:67
_CLASS_TABLE
Definition: ipstats.h:79
DWORD gateway
Definition: ipstats.h:69
PVOID getUdpTable(CLASS_TABLE Class)
DWORD mask
Definition: ipstats.h:68
DWORD numRoutes
Definition: ipstats.h:75