This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / include / iprtrmib.h
1 /* WINE iprtrmib.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18 #ifndef WINE_IPRTRMIB_H__
19 #define WINE_IPRTRMIB_H__
20
21 #define MAX_INTERFACE_NAME_LEN 256
22
23 #include <ipifcons.h>
24
25 #define MAXLEN_IFDESCR 256
26 #define MAXLEN_PHYSADDR 8
27
28 typedef struct _MIB_IFROW
29 {
30     WCHAR wszName[MAX_INTERFACE_NAME_LEN];
31     DWORD dwIndex;
32     DWORD dwType;
33     DWORD dwMtu;
34     DWORD dwSpeed;
35     DWORD dwPhysAddrLen;
36     BYTE  bPhysAddr[MAXLEN_PHYSADDR];
37     DWORD dwAdminStatus;
38     DWORD dwOperStatus;
39     DWORD dwLastChange;
40     DWORD dwInOctets;
41     DWORD dwInUcastPkts;
42     DWORD dwInNUcastPkts;
43     DWORD dwInDiscards;
44     DWORD dwInErrors;
45     DWORD dwInUnknownProtos;
46     DWORD dwOutOctets;
47     DWORD dwOutUcastPkts;
48     DWORD dwOutNUcastPkts;
49     DWORD dwOutDiscards;
50     DWORD dwOutErrors;
51     DWORD dwOutQLen;
52     DWORD dwDescrLen;
53     BYTE  bDescr[MAXLEN_IFDESCR];
54 } MIB_IFROW,*PMIB_IFROW;
55
56 typedef struct _MIB_IFTABLE
57 {
58     DWORD     dwNumEntries;
59     MIB_IFROW table[1];
60 } MIB_IFTABLE, *PMIB_IFTABLE;
61
62 typedef struct _MIBICMPSTATS
63 {
64     DWORD dwMsgs;
65     DWORD dwErrors;
66     DWORD dwDestUnreachs;
67     DWORD dwTimeExcds;
68     DWORD dwParmProbs;
69     DWORD dwSrcQuenchs;
70     DWORD dwRedirects;
71     DWORD dwEchos;
72     DWORD dwEchoReps;
73     DWORD dwTimestamps;
74     DWORD dwTimestampReps;
75     DWORD dwAddrMasks;
76     DWORD dwAddrMaskReps;
77 } MIBICMPSTATS;
78
79 typedef    struct _MIBICMPINFO
80 {
81     MIBICMPSTATS icmpInStats;
82     MIBICMPSTATS icmpOutStats;
83 } MIBICMPINFO;
84
85 typedef struct _MIB_ICMP
86 {
87     MIBICMPINFO stats;
88 } MIB_ICMP,*PMIB_ICMP;
89
90 typedef struct _MIB_UDPSTATS
91 {
92     DWORD dwInDatagrams;
93     DWORD dwNoPorts;
94     DWORD dwInErrors;
95     DWORD dwOutDatagrams;
96     DWORD dwNumAddrs;
97 } MIB_UDPSTATS,*PMIB_UDPSTATS;
98
99 typedef struct _MIB_UDPROW
100 {
101     DWORD dwLocalAddr;
102     DWORD dwLocalPort;
103 } MIB_UDPROW, *PMIB_UDPROW;
104
105 typedef struct _MIB_UDPTABLE
106 {
107     DWORD      dwNumEntries;
108     MIB_UDPROW table[1];
109 } MIB_UDPTABLE, *PMIB_UDPTABLE;
110
111 typedef struct _MIB_TCPSTATS
112 {
113     DWORD dwRtoAlgorithm;
114     DWORD dwRtoMin;
115     DWORD dwRtoMax;
116     DWORD dwMaxConn;
117     DWORD dwActiveOpens;
118     DWORD dwPassiveOpens;
119     DWORD dwAttemptFails;
120     DWORD dwEstabResets;
121     DWORD dwCurrEstab;
122     DWORD dwInSegs;
123     DWORD dwOutSegs;
124     DWORD dwRetransSegs;
125     DWORD dwInErrs;
126     DWORD dwOutRsts;
127     DWORD dwNumConns;
128 } MIB_TCPSTATS, *PMIB_TCPSTATS;
129
130 typedef struct _MIBICMPSTATS_EX
131 {
132     DWORD       dwMsgs;
133     DWORD       dwErrors;
134     DWORD       rgdwTypeCount[256];
135 } MIBICMPSTATS_EX, *PMIBICMPSTATS_EX;
136
137 typedef struct _MIB_ICMP_EX
138 {
139     MIBICMPSTATS_EX icmpInStats;
140     MIBICMPSTATS_EX icmpOutStats;
141 } MIB_ICMP_EX,*PMIB_ICMP_EX;
142
143 typedef struct _MIB_TCPROW
144 {
145     DWORD dwState;
146     DWORD dwLocalAddr;
147     DWORD dwLocalPort;
148     DWORD dwRemoteAddr;
149     DWORD dwRemotePort;
150 } MIB_TCPROW, *PMIB_TCPROW;
151
152 #define MIB_TCP_STATE_CLOSED            1
153 #define MIB_TCP_STATE_LISTEN            2
154 #define MIB_TCP_STATE_SYN_SENT          3
155 #define MIB_TCP_STATE_SYN_RCVD          4
156 #define MIB_TCP_STATE_ESTAB             5
157 #define MIB_TCP_STATE_FIN_WAIT1         6
158 #define MIB_TCP_STATE_FIN_WAIT2         7
159 #define MIB_TCP_STATE_CLOSE_WAIT        8
160 #define MIB_TCP_STATE_CLOSING           9
161 #define MIB_TCP_STATE_LAST_ACK         10
162 #define MIB_TCP_STATE_TIME_WAIT        11
163 #define MIB_TCP_STATE_DELETE_TCB       12
164
165 typedef struct _MIB_TCPTABLE
166 {
167     DWORD      dwNumEntries;
168     MIB_TCPROW table[1];
169 } MIB_TCPTABLE, *PMIB_TCPTABLE;
170
171 typedef struct _MIB_IPSTATS
172 {
173     DWORD dwForwarding;
174     DWORD dwDefaultTTL;
175     DWORD dwInReceives;
176     DWORD dwInHdrErrors;
177     DWORD dwInAddrErrors;
178     DWORD dwForwDatagrams;
179     DWORD dwInUnknownProtos;
180     DWORD dwInDiscards;
181     DWORD dwInDelivers;
182     DWORD dwOutRequests;
183     DWORD dwRoutingDiscards;
184     DWORD dwOutDiscards;
185     DWORD dwOutNoRoutes;
186     DWORD dwReasmTimeout;
187     DWORD dwReasmReqds;
188     DWORD dwReasmOks;
189     DWORD dwReasmFails;
190     DWORD dwFragOks;
191     DWORD dwFragFails;
192     DWORD dwFragCreates;
193     DWORD dwNumIf;
194     DWORD dwNumAddr;
195     DWORD dwNumRoutes;
196 } MIB_IPSTATS, *PMIB_IPSTATS;
197
198 typedef struct _MIB_IPADDRROW
199 {
200     DWORD        dwAddr;
201     DWORD        dwIndex;
202     DWORD        dwMask;
203     DWORD        dwBCastAddr;
204     DWORD        dwReasmSize;
205     unsigned short    unused1;
206     unsigned short    wType;
207 } MIB_IPADDRROW, *PMIB_IPADDRROW;
208
209 typedef struct _MIB_IPADDRTABLE
210 {
211     DWORD         dwNumEntries;
212     MIB_IPADDRROW table[1];
213 } MIB_IPADDRTABLE, *PMIB_IPADDRTABLE;
214
215
216 typedef struct _MIB_IPFORWARDNUMBER
217 {
218     DWORD      dwValue;
219 }MIB_IPFORWARDNUMBER,*PMIB_IPFORWARDNUMBER;
220
221 typedef struct _MIB_IPFORWARDROW
222 {
223     DWORD dwForwardDest;
224     DWORD dwForwardMask;
225     DWORD dwForwardPolicy;
226     DWORD dwForwardNextHop;
227     DWORD dwForwardIfIndex;
228     DWORD dwForwardType;
229     DWORD dwForwardProto;
230     DWORD dwForwardAge;
231     DWORD dwForwardNextHopAS;
232     DWORD dwForwardMetric1;
233     DWORD dwForwardMetric2;
234     DWORD dwForwardMetric3;
235     DWORD dwForwardMetric4;
236     DWORD dwForwardMetric5;
237 }MIB_IPFORWARDROW, *PMIB_IPFORWARDROW;
238
239 #define MIB_IPROUTE_TYPE_OTHER      1
240 #define MIB_IPROUTE_TYPE_INVALID    2
241 #define MIB_IPROUTE_TYPE_DIRECT     3
242 #define MIB_IPROUTE_TYPE_INDIRECT   4
243
244 #define MIB_IPPROTO_OTHER             1
245 #define MIB_IPPROTO_LOCAL             2
246 #define MIB_IPPROTO_NETMGMT           3
247 #define MIB_IPPROTO_ICMP              4
248 #define MIB_IPPROTO_EGP               5
249 #define MIB_IPPROTO_GGP               6
250 #define MIB_IPPROTO_HELLO             7
251 #define MIB_IPPROTO_RIP               8
252 #define MIB_IPPROTO_IS_IS             9
253 #define MIB_IPPROTO_ES_IS             10
254 #define MIB_IPPROTO_CISCO             11
255 #define MIB_IPPROTO_BBN               12
256 #define MIB_IPPROTO_OSPF              13
257 #define MIB_IPPROTO_BGP               14
258
259 #define MIB_IPPROTO_NT_AUTOSTATIC     10002
260 #define MIB_IPPROTO_NT_STATIC         10006
261 #define MIB_IPPROTO_NT_STATIC_NON_DOD 10007
262
263 typedef struct _MIB_IPFORWARDTABLE
264 {
265     DWORD            dwNumEntries;
266     MIB_IPFORWARDROW table[1];
267 } MIB_IPFORWARDTABLE, *PMIB_IPFORWARDTABLE;
268
269 typedef struct _MIB_IPNETROW
270 {
271     DWORD dwIndex;
272     DWORD dwPhysAddrLen;
273     BYTE  bPhysAddr[MAXLEN_PHYSADDR];
274     DWORD dwAddr;
275     DWORD dwType;
276 } MIB_IPNETROW, *PMIB_IPNETROW;
277
278 #define    MIB_IPNET_TYPE_OTHER        1
279 #define    MIB_IPNET_TYPE_INVALID        2
280 #define    MIB_IPNET_TYPE_DYNAMIC        3
281 #define    MIB_IPNET_TYPE_STATIC        4
282
283 typedef struct _MIB_IPNETTABLE
284 {
285     DWORD        dwNumEntries;
286     MIB_IPNETROW table[1];
287 } MIB_IPNETTABLE, *PMIB_IPNETTABLE;
288
289 #endif /* WINE_IPRTRMIB_H__ */