ReactOS 0.4.15-dev-7918-g2a2556c
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 */
47DWORD 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 */
52DWORD 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 */
57DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family);
58
59/* Route table functions */
60
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 */
66typedef struct _RouteEntry {
73
74typedef struct _RouteTable {
78
79typedef enum _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. */
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_ */
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint index
Definition: glext.h:6031
DWORD getInterfaceStatsByIndex(DWORD index, PMIB_IFROW entry)
DWORD getTCPStats(MIB_TCPSTATS *stats, DWORD family)
PVOID getTcpTable(CLASS_TABLE Class)
DWORD getNumUdpEntries(void)
DWORD getICMPStats(MIB_ICMP *stats)
struct _RouteTable RouteTable
DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family)
DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry)
DWORD getNumArpEntries(void)
RouteTable * getRouteTable(void)
PMIB_IPNETTABLE getArpTable(void)
_CLASS_TABLE
Definition: ipstats.h:79
@ ClassModulePid
Definition: ipstats.h:81
@ ClassBasic
Definition: ipstats.h:80
@ ClassModule
Definition: ipstats.h:82
PVOID getUdpTable(CLASS_TABLE Class)
DWORD getNumRoutes(void)
DWORD getNumTcpEntries(void)
DWORD getIPStats(PMIB_IPSTATS stats, DWORD family)
enum _CLASS_TABLE CLASS_TABLE
struct _RouteEntry RouteEntry
uint32_t entry
Definition: isohybrid.c:63
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
Definition: name.c:39