Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenipstats.h
Go to the documentation of this file.
00001 /* ipstats.h 00002 * Copyright (C) 2003 Juan Lang 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 * 00018 * This module implements functions shared by DLLs that need to get network- 00019 * related statistics. It's meant to hide some platform-specificisms, and 00020 * share code that was previously duplicated. 00021 */ 00022 #ifndef WINE_IPSTATS_H_ 00023 #define WINE_IPSTATS_H_ 00024 00025 #include <stdarg.h> 00026 00027 #include "windef.h" 00028 #include "winbase.h" 00029 #include "iprtrmib.h" 00030 00031 /* Fills in entry's interface stats, using name to find them. 00032 * Returns ERROR_INVALID_PARAMETER if name or entry is NULL, NO_ERROR otherwise. 00033 */ 00034 DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry); 00035 00036 /* Ditto above by index. */ 00037 DWORD getInterfaceStatsByIndex(DWORD index, PMIB_IFROW entry); 00038 00039 /* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is 00040 * NULL, NO_ERROR otherwise. 00041 */ 00042 DWORD getICMPStats(MIB_ICMP *stats); 00043 00044 /* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is 00045 * NULL, NO_ERROR otherwise. 00046 */ 00047 DWORD getIPStats(PMIB_IPSTATS stats, DWORD family); 00048 00049 /* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is 00050 * NULL, NO_ERROR otherwise. 00051 */ 00052 DWORD getTCPStats(MIB_TCPSTATS *stats, DWORD family); 00053 00054 /* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is 00055 * NULL, NO_ERROR otherwise. 00056 */ 00057 DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family); 00058 00059 /* Route table functions */ 00060 00061 DWORD getNumRoutes(void); 00062 00063 /* Minimalist route entry, only has the fields I can actually fill in. How 00064 * these map to the different windows route data structures is up to you. 00065 */ 00066 typedef struct _RouteEntry { 00067 DWORD dest; 00068 DWORD mask; 00069 DWORD gateway; 00070 DWORD ifIndex; 00071 DWORD metric; 00072 } RouteEntry; 00073 00074 typedef struct _RouteTable { 00075 DWORD numRoutes; 00076 RouteEntry routes[1]; 00077 } RouteTable; 00078 00079 /* Allocates and returns to you the route table, or NULL if it can't allocate 00080 * enough memory. free() the returned table. 00081 */ 00082 RouteTable *getRouteTable(void); 00083 00084 /* Returns the number of entries in the arp table. */ 00085 DWORD getNumArpEntries(void); 00086 00087 /* Allocates and returns to you the arp table, or NULL if it can't allocate 00088 * enough memory. free() the returned table. 00089 */ 00090 PMIB_IPNETTABLE getArpTable(void); 00091 00092 /* Returns the number of entries in the UDP state table. */ 00093 DWORD getNumUdpEntries(void); 00094 00095 /* Allocates and returns to you the UDP state table, or NULL if it can't 00096 * allocate enough memory. free() the returned table. 00097 */ 00098 PMIB_UDPTABLE getUdpTable(void); 00099 00100 /* Returns the number of entries in the TCP state table. */ 00101 DWORD getNumTcpEntries(void); 00102 00103 /* Allocates and returns to you the TCP state table, or NULL if it can't 00104 * allocate enough memory. free() the returned table. 00105 */ 00106 PMIB_TCPTABLE getTcpTable(void); 00107 00108 #endif /* ndef WINE_IPSTATS_H_ */ Generated on Sun May 27 2012 04:24:11 for ReactOS by
1.7.6.1
|