1 /* ipstats.h
2 * Copyright (C) 2003,2006 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 St, Fifth Floor, Boston, MA 02110-1301, USA
17 *
18 * This module implements functions that get network-related statistics.
19 * It's meant to hide some platform-specificisms.
20 */
21 #ifndef WINE_IPSTATS_H_
22 #define WINE_IPSTATS_H_
23
24 #include <stdarg.h>
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "iprtrmib.h"
29
30 /* Fills in entry's interface stats, using name to find them.
31 * Returns ERROR_INVALID_PARAMETER if name or entry is NULL, NO_ERROR otherwise.
32 */
33 DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry);
34
35 /* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
36 * NULL, NO_ERROR otherwise.
37 */
38 DWORD getICMPStats(MIB_ICMP *stats);
39
40 /* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
41 * NULL, NO_ERROR otherwise.
42 */
43 DWORD getIPStats(PMIB_IPSTATS stats);
44
45 /* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
46 * NULL, NO_ERROR otherwise.
47 */
48 DWORD getTCPStats(MIB_TCPSTATS *stats);
49
50 /* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
51 * NULL, NO_ERROR otherwise.
52 */
53 DWORD getUDPStats(MIB_UDPSTATS *stats);
54
55 /* Returns the number of entries in the route table. */
56 DWORD getNumRoutes(void);
57
58 /* Allocates the route table from heap and returns it to you in
59 * *ppIpForwardTable. Returns NO_ERROR on success, something else on failure.
60 */
61 DWORD getRouteTable(PMIB_IPFORWARDTABLE *ppIpForwardTable, HANDLE heap,
62 DWORD flags);
63
64 /* Returns the number of entries in the arp table. */
65 DWORD getNumArpEntries(void);
66
67 /* Allocates the arp table from heap and returns it to you in *ppIpNetTable.
68 * Returns NO_ERROR on success, something else on failure.
69 */
70 DWORD getArpTable(PMIB_IPNETTABLE *ppIpNetTable, HANDLE heap, DWORD flags);
71
72 /* Returns the number of entries in the UDP state table. */
73 DWORD getNumUdpEntries(void);
74
75 /* Allocates the UDP state table from heap and returns it to you in *ppUdpTable.
76 * Returns NO_ERROR on success, something else on failure.
77 */
78 DWORD getUdpTable(PMIB_UDPTABLE *ppUdpTable, HANDLE heap, DWORD flags);
79
80 /* Returns the number of entries in the TCP state table. */
81 DWORD getNumTcpEntries(void);
82
83 /* Allocates the TCP state table from heap and returns it to you in *ppTcpTable.
84 * Returns NO_ERROR on success, something else on failure.
85 */
86 DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
87 DWORD flags);
88
89 #endif /* ndef WINE_IPSTATS_H_ */
90
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.