comdlg32: Fix memory leak in colour dialog.
[wine.git] / dlls / iphlpapi / ipstats.h
blobec8dcb0ad8e4af8294b0d1b825b3e69a32f74ce7
1 /* ipstats.h
2 * Copyright (C) 2003,2006 Juan Lang
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.
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.
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
18 * This module implements functions that get network-related statistics.
19 * It's meant to hide some platform-specificisms.
21 #ifndef WINE_IPSTATS_H_
22 #define WINE_IPSTATS_H_
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "iprtrmib.h"
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.
33 DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry);
35 /* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
36 * NULL, NO_ERROR otherwise.
38 DWORD getICMPStats(MIB_ICMP *stats);
40 /* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
41 * NULL, NO_ERROR otherwise.
43 DWORD getIPStats(PMIB_IPSTATS stats);
45 /* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
46 * NULL, NO_ERROR otherwise.
48 DWORD getTCPStats(MIB_TCPSTATS *stats);
50 /* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
51 * NULL, NO_ERROR otherwise.
53 DWORD getUDPStats(MIB_UDPSTATS *stats);
55 /* Returns the number of entries in the route table. */
56 DWORD getNumRoutes(void);
58 /* Allocates the route table from heap and returns it to you in
59 * *ppIpForwardTable. Returns NO_ERROR on success, something else on failure.
61 DWORD getRouteTable(PMIB_IPFORWARDTABLE *ppIpForwardTable, HANDLE heap,
62 DWORD flags);
64 /* Returns the number of entries in the arp table. */
65 DWORD getNumArpEntries(void);
67 /* Allocates the arp table from heap and returns it to you in *ppIpNetTable.
68 * Returns NO_ERROR on success, something else on failure.
70 DWORD getArpTable(PMIB_IPNETTABLE *ppIpNetTable, HANDLE heap, DWORD flags);
72 /* Returns the number of entries in the UDP state table. */
73 DWORD getNumUdpEntries(void);
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.
78 DWORD getUdpTable(PMIB_UDPTABLE *ppUdpTable, HANDLE heap, DWORD flags);
80 /* Returns the number of entries in the TCP state table. */
81 DWORD getNumTcpEntries(void);
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.
86 DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
87 DWORD flags);
89 #endif /* ndef WINE_IPSTATS_H_ */