Dump HeapWalk entries.
[wine/multimedia.git] / dlls / iphlpapi / ipstats.h
blob69ee87bb11dcaee02a4f55e725509c8aba0eb0b8
1 /* ipstats.h
2 * Copyright (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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.
22 #ifndef WINE_IPSTATS_H_
23 #define WINE_IPSTATS_H_
25 #include <stdarg.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "iprtrmib.h"
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.
34 DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry);
36 /* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
37 * NULL, NO_ERROR otherwise.
39 DWORD getICMPStats(MIB_ICMP *stats);
41 /* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
42 * NULL, NO_ERROR otherwise.
44 DWORD getIPStats(PMIB_IPSTATS stats);
46 /* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
47 * NULL, NO_ERROR otherwise.
49 DWORD getTCPStats(MIB_TCPSTATS *stats);
51 /* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
52 * NULL, NO_ERROR otherwise.
54 DWORD getUDPStats(MIB_UDPSTATS *stats);
56 /* Route table functions */
58 DWORD getNumRoutes(void);
60 /* Minimalist route entry, only has the fields I can actually fill in. How
61 * these map to the different windows route data structures is up to you.
63 typedef struct _RouteEntry {
64 DWORD dest;
65 DWORD mask;
66 DWORD gateway;
67 DWORD ifIndex;
68 DWORD metric;
69 } RouteEntry;
71 typedef struct _RouteTable {
72 DWORD numRoutes;
73 RouteEntry routes[1];
74 } RouteTable;
76 /* Allocates and returns to you the route table, or NULL if it can't allocate
77 * enough memory. HeapFree() the returned table.
79 RouteTable *getRouteTable(void);
81 /* Returns the number of entries in the arp table. */
82 DWORD getNumArpEntries(void);
84 /* Allocates and returns to you the arp table, or NULL if it can't allocate
85 * enough memory. HeapFree() the returned table.
87 PMIB_IPNETTABLE getArpTable(void);
89 /* Returns the number of entries in the UDP state table. */
90 DWORD getNumUdpEntries(void);
92 /* Allocates and returns to you the UDP state table, or NULL if it can't
93 * allocate enough memory. HeapFree() the returned table.
95 PMIB_UDPTABLE getUdpTable(void);
97 /* Returns the number of entries in the TCP state table. */
98 DWORD getNumTcpEntries(void);
100 /* Allocates and returns to you the TCP state table, or NULL if it can't
101 * allocate enough memory. HeapFree() the returned table.
103 PMIB_TCPTABLE getTcpTable(void);
105 #endif /* ndef WINE_IPSTATS_H_ */