1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#ifndef __MIB_H__
30#define __MIB_H__
31
32#include "ttype.h"
33#include "tether.h"
34#include "desc.h"
35
36
37
38
39
40
41
42typedef struct tagSUSBCounter {
43 DWORD dwCrc;
44
45} SUSBCounter, *PSUSBCounter;
46
47
48
49
50
51
52
53
54typedef struct tagSDot11Counters {
55
56 unsigned long long TransmittedFragmentCount;
57 unsigned long long MulticastTransmittedFrameCount;
58 unsigned long long FailedCount;
59 unsigned long long RetryCount;
60 unsigned long long MultipleRetryCount;
61 unsigned long long RTSSuccessCount;
62 unsigned long long RTSFailureCount;
63 unsigned long long ACKFailureCount;
64 unsigned long long FrameDuplicateCount;
65 unsigned long long ReceivedFragmentCount;
66 unsigned long long MulticastReceivedFrameCount;
67 unsigned long long FCSErrorCount;
68 unsigned long long TKIPLocalMICFailures;
69 unsigned long long TKIPRemoteMICFailures;
70 unsigned long long TKIPICVErrors;
71 unsigned long long TKIPReplays;
72 unsigned long long CCMPFormatErrors;
73 unsigned long long CCMPReplays;
74 unsigned long long CCMPDecryptErrors;
75 unsigned long long FourWayHandshakeFailures;
76
77
78
79
80
81
82} SDot11Counters, *PSDot11Counters;
83
84
85
86
87
88typedef struct tagSMib2Counter {
89 signed long ifIndex;
90 char ifDescr[256];
91
92 signed long ifType;
93 signed long ifMtu;
94 DWORD ifSpeed;
95 BYTE ifPhysAddress[ETH_ALEN];
96 signed long ifAdminStatus;
97 signed long ifOperStatus;
98 DWORD ifLastChange;
99 DWORD ifInOctets;
100 DWORD ifInUcastPkts;
101 DWORD ifInNUcastPkts;
102 DWORD ifInDiscards;
103 DWORD ifInErrors;
104 DWORD ifInUnknownProtos;
105 DWORD ifOutOctets;
106 DWORD ifOutUcastPkts;
107 DWORD ifOutNUcastPkts;
108 DWORD ifOutDiscards;
109 DWORD ifOutErrors;
110 DWORD ifOutQLen;
111 DWORD ifSpecific;
112} SMib2Counter, *PSMib2Counter;
113
114
115#define WIRELESSLANIEEE80211b 6
116
117
118#define UP 1
119#define DOWN 2
120#define TESTING 3
121
122
123
124
125
126typedef struct tagSRmonCounter {
127 signed long etherStatsIndex;
128 DWORD etherStatsDataSource;
129 DWORD etherStatsDropEvents;
130 DWORD etherStatsOctets;
131 DWORD etherStatsPkts;
132 DWORD etherStatsBroadcastPkts;
133 DWORD etherStatsMulticastPkts;
134 DWORD etherStatsCRCAlignErrors;
135 DWORD etherStatsUndersizePkts;
136 DWORD etherStatsOversizePkts;
137 DWORD etherStatsFragments;
138 DWORD etherStatsJabbers;
139 DWORD etherStatsCollisions;
140 DWORD etherStatsPkt64Octets;
141 DWORD etherStatsPkt65to127Octets;
142 DWORD etherStatsPkt128to255Octets;
143 DWORD etherStatsPkt256to511Octets;
144 DWORD etherStatsPkt512to1023Octets;
145 DWORD etherStatsPkt1024to1518Octets;
146 DWORD etherStatsOwners;
147 DWORD etherStatsStatus;
148} SRmonCounter, *PSRmonCounter;
149
150
151
152
153typedef struct tagSCustomCounters {
154 unsigned long Length;
155
156 unsigned long long ullTsrAllOK;
157
158 unsigned long long ullRsr11M;
159 unsigned long long ullRsr5M;
160 unsigned long long ullRsr2M;
161 unsigned long long ullRsr1M;
162
163 unsigned long long ullRsr11MCRCOk;
164 unsigned long long ullRsr5MCRCOk;
165 unsigned long long ullRsr2MCRCOk;
166 unsigned long long ullRsr1MCRCOk;
167
168 unsigned long long ullRsr54M;
169 unsigned long long ullRsr48M;
170 unsigned long long ullRsr36M;
171 unsigned long long ullRsr24M;
172 unsigned long long ullRsr18M;
173 unsigned long long ullRsr12M;
174 unsigned long long ullRsr9M;
175 unsigned long long ullRsr6M;
176
177 unsigned long long ullRsr54MCRCOk;
178 unsigned long long ullRsr48MCRCOk;
179 unsigned long long ullRsr36MCRCOk;
180 unsigned long long ullRsr24MCRCOk;
181 unsigned long long ullRsr18MCRCOk;
182 unsigned long long ullRsr12MCRCOk;
183 unsigned long long ullRsr9MCRCOk;
184 unsigned long long ullRsr6MCRCOk;
185
186} SCustomCounters, *PSCustomCounters;
187
188
189
190
191
192typedef struct tagSISRCounters {
193 unsigned long Length;
194
195 DWORD dwIsrTx0OK;
196 DWORD dwIsrAC0TxOK;
197 DWORD dwIsrBeaconTxOK;
198 DWORD dwIsrRx0OK;
199 DWORD dwIsrTBTTInt;
200 DWORD dwIsrSTIMERInt;
201 DWORD dwIsrWatchDog;
202 DWORD dwIsrUnrecoverableError;
203 DWORD dwIsrSoftInterrupt;
204 DWORD dwIsrMIBNearfull;
205 DWORD dwIsrRxNoBuf;
206
207 DWORD dwIsrUnknown;
208
209 DWORD dwIsrRx1OK;
210 DWORD dwIsrATIMTxOK;
211 DWORD dwIsrSYNCTxOK;
212 DWORD dwIsrCFPEnd;
213 DWORD dwIsrATIMEnd;
214 DWORD dwIsrSYNCFlushOK;
215 DWORD dwIsrSTIMER1Int;
216
217} SISRCounters, *PSISRCounters;
218
219
220
221#define VALID 1
222#define CREATE_REQUEST 2
223#define UNDER_CREATION 3
224#define INVALID 4
225
226
227
228
229
230typedef struct tagSTxPktInfo {
231 BYTE byBroadMultiUni;
232 WORD wLength;
233 WORD wFIFOCtl;
234 BYTE abyDestAddr[ETH_ALEN];
235} STxPktInfo, *PSTxPktInfo;
236
237
238#define MAX_RATE 12
239
240
241
242typedef struct tagSStatCounter {
243
244
245
246
247 SISRCounters ISRStat;
248
249
250
251 DWORD dwRsrFrmAlgnErr;
252 DWORD dwRsrErr;
253 DWORD dwRsrCRCErr;
254 DWORD dwRsrCRCOk;
255 DWORD dwRsrBSSIDOk;
256 DWORD dwRsrADDROk;
257 DWORD dwRsrBCNSSIDOk;
258 DWORD dwRsrLENErr;
259 DWORD dwRsrTYPErr;
260
261 DWORD dwNewRsrDECRYPTOK;
262 DWORD dwNewRsrCFP;
263 DWORD dwNewRsrUTSF;
264 DWORD dwNewRsrHITAID;
265 DWORD dwNewRsrHITAID0;
266
267 DWORD dwRsrLong;
268 DWORD dwRsrRunt;
269
270 DWORD dwRsrRxControl;
271 DWORD dwRsrRxData;
272 DWORD dwRsrRxManage;
273
274 DWORD dwRsrRxPacket;
275 DWORD dwRsrRxOctet;
276 DWORD dwRsrBroadcast;
277 DWORD dwRsrMulticast;
278 DWORD dwRsrDirected;
279
280 unsigned long long ullRsrOK;
281
282
283 unsigned long long ullRxBroadcastBytes;
284 unsigned long long ullRxMulticastBytes;
285 unsigned long long ullRxDirectedBytes;
286 unsigned long long ullRxBroadcastFrames;
287 unsigned long long ullRxMulticastFrames;
288 unsigned long long ullRxDirectedFrames;
289
290 DWORD dwRsrRxFragment;
291 DWORD dwRsrRxFrmLen64;
292 DWORD dwRsrRxFrmLen65_127;
293 DWORD dwRsrRxFrmLen128_255;
294 DWORD dwRsrRxFrmLen256_511;
295 DWORD dwRsrRxFrmLen512_1023;
296 DWORD dwRsrRxFrmLen1024_1518;
297
298
299
300 DWORD dwTsrTotalRetry;
301 DWORD dwTsrOnceRetry;
302 DWORD dwTsrMoreThanOnceRetry;
303 DWORD dwTsrRetry;
304
305 DWORD dwTsrACKData;
306 DWORD dwTsrErr;
307 DWORD dwAllTsrOK;
308 DWORD dwTsrRetryTimeout;
309 DWORD dwTsrTransmitTimeout;
310
311 DWORD dwTsrTxPacket;
312 DWORD dwTsrTxOctet;
313 DWORD dwTsrBroadcast;
314 DWORD dwTsrMulticast;
315 DWORD dwTsrDirected;
316
317
318 DWORD dwCntRxFrmLength;
319 DWORD dwCntTxBufLength;
320
321 BYTE abyCntRxPattern[16];
322 BYTE abyCntTxPattern[16];
323
324
325
326
327 DWORD dwCntRxDataErr;
328 DWORD dwCntDecryptErr;
329 DWORD dwCntRxICVErr;
330
331
332
333 unsigned long long ullTsrOK;
334
335
336 unsigned long long ullTxBroadcastFrames;
337 unsigned long long ullTxMulticastFrames;
338 unsigned long long ullTxDirectedFrames;
339 unsigned long long ullTxBroadcastBytes;
340 unsigned long long ullTxMulticastBytes;
341 unsigned long long ullTxDirectedBytes;
342
343
344 DWORD dwTxOk[MAX_RATE+1];
345 DWORD dwTxFail[MAX_RATE+1];
346 DWORD dwTxRetryCount[8];
347
348 STxPktInfo abyTxPktInfo[16];
349
350 SUSBCounter USB_EP0Stat;
351 SUSBCounter USB_BulkInStat;
352 SUSBCounter USB_BulkOutStat;
353 SUSBCounter USB_InterruptStat;
354
355 SCustomCounters CustomStat;
356
357
358 unsigned long TxNoRetryOkCount;
359 unsigned long TxRetryOkCount;
360 unsigned long TxFailCount;
361
362 unsigned long RxOkCnt;
363 unsigned long RxFcsErrCnt;
364
365 unsigned long SignalStren;
366 unsigned long LinkQuality;
367
368} SStatCounter, *PSStatCounter;
369
370
371
372
373
374
375
376void STAvClearAllCounter(PSStatCounter pStatistic);
377
378void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
379 BYTE byIsr0,
380 BYTE byIsr1);
381
382void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
383 BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
384 BYTE byRxRate, PBYTE pbyBuffer,
385 unsigned int cbFrameLength);
386
387void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
388 BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
389 BYTE byRxRate, PBYTE pbyBuffer,
390 unsigned int cbFrameLength);
391
392void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byPktNum,
393 BYTE byRate, BYTE byTSR);
394
395void
396STAvUpdate802_11Counter(
397 PSDot11Counters p802_11Counter,
398 PSStatCounter pStatistic,
399 BYTE byRTSSuccess,
400 BYTE byRTSFail,
401 BYTE byACKFail,
402 BYTE byFCSErr
403 );
404
405void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
406void STAvUpdateUSBCounter(PSUSBCounter pUsbCounter, int ntStatus);
407
408#endif
409