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
41typedef struct tagSDot11Counters {
42 unsigned long Length;
43 unsigned long long TransmittedFragmentCount;
44 unsigned long long MulticastTransmittedFrameCount;
45 unsigned long long FailedCount;
46 unsigned long long RetryCount;
47 unsigned long long MultipleRetryCount;
48 unsigned long long RTSSuccessCount;
49 unsigned long long RTSFailureCount;
50 unsigned long long ACKFailureCount;
51 unsigned long long FrameDuplicateCount;
52 unsigned long long ReceivedFragmentCount;
53 unsigned long long MulticastReceivedFrameCount;
54 unsigned long long FCSErrorCount;
55 unsigned long long TKIPLocalMICFailures;
56 unsigned long long TKIPRemoteMICFailures;
57 unsigned long long TKIPICVErrors;
58 unsigned long long TKIPCounterMeasuresInvoked;
59 unsigned long long TKIPReplays;
60 unsigned long long CCMPFormatErrors;
61 unsigned long long CCMPReplays;
62 unsigned long long CCMPDecryptErrors;
63 unsigned long long FourWayHandshakeFailures;
64
65
66
67
68} SDot11Counters, *PSDot11Counters;
69
70
71
72
73typedef struct tagSMib2Counter {
74 long ifIndex;
75 char ifDescr[256];
76
77 long ifType;
78 long ifMtu;
79 unsigned long ifSpeed;
80 unsigned char ifPhysAddress[ETH_ALEN];
81 long ifAdminStatus;
82 long ifOperStatus;
83 unsigned long ifLastChange;
84 unsigned long ifInOctets;
85 unsigned long ifInUcastPkts;
86 unsigned long ifInNUcastPkts;
87 unsigned long ifInDiscards;
88 unsigned long ifInErrors;
89 unsigned long ifInUnknownProtos;
90 unsigned long ifOutOctets;
91 unsigned long ifOutUcastPkts;
92 unsigned long ifOutNUcastPkts;
93 unsigned long ifOutDiscards;
94 unsigned long ifOutErrors;
95 unsigned long ifOutQLen;
96 unsigned long ifSpecific;
97} SMib2Counter, *PSMib2Counter;
98
99
100#define WIRELESSLANIEEE80211b 6
101
102
103#define UP 1
104#define DOWN 2
105#define TESTING 3
106
107
108
109
110typedef struct tagSRmonCounter {
111 long etherStatsIndex;
112 unsigned long etherStatsDataSource;
113 unsigned long etherStatsDropEvents;
114 unsigned long etherStatsOctets;
115 unsigned long etherStatsPkts;
116 unsigned long etherStatsBroadcastPkts;
117 unsigned long etherStatsMulticastPkts;
118 unsigned long etherStatsCRCAlignErrors;
119 unsigned long etherStatsUndersizePkts;
120 unsigned long etherStatsOversizePkts;
121 unsigned long etherStatsFragments;
122 unsigned long etherStatsJabbers;
123 unsigned long etherStatsCollisions;
124 unsigned long etherStatsPkt64Octets;
125 unsigned long etherStatsPkt65to127Octets;
126 unsigned long etherStatsPkt128to255Octets;
127 unsigned long etherStatsPkt256to511Octets;
128 unsigned long etherStatsPkt512to1023Octets;
129 unsigned long etherStatsPkt1024to1518Octets;
130 unsigned long etherStatsOwners;
131 unsigned long etherStatsStatus;
132} SRmonCounter, *PSRmonCounter;
133
134
135
136
137typedef struct tagSCustomCounters {
138 unsigned long Length;
139
140 unsigned long long ullTsrAllOK;
141
142 unsigned long long ullRsr11M;
143 unsigned long long ullRsr5M;
144 unsigned long long ullRsr2M;
145 unsigned long long ullRsr1M;
146
147 unsigned long long ullRsr11MCRCOk;
148 unsigned long long ullRsr5MCRCOk;
149 unsigned long long ullRsr2MCRCOk;
150 unsigned long long ullRsr1MCRCOk;
151
152 unsigned long long ullRsr54M;
153 unsigned long long ullRsr48M;
154 unsigned long long ullRsr36M;
155 unsigned long long ullRsr24M;
156 unsigned long long ullRsr18M;
157 unsigned long long ullRsr12M;
158 unsigned long long ullRsr9M;
159 unsigned long long ullRsr6M;
160
161 unsigned long long ullRsr54MCRCOk;
162 unsigned long long ullRsr48MCRCOk;
163 unsigned long long ullRsr36MCRCOk;
164 unsigned long long ullRsr24MCRCOk;
165 unsigned long long ullRsr18MCRCOk;
166 unsigned long long ullRsr12MCRCOk;
167 unsigned long long ullRsr9MCRCOk;
168 unsigned long long ullRsr6MCRCOk;
169} SCustomCounters, *PSCustomCounters;
170
171
172
173
174typedef struct tagSISRCounters {
175 unsigned long Length;
176
177 unsigned long dwIsrTx0OK;
178 unsigned long dwIsrAC0TxOK;
179 unsigned long dwIsrBeaconTxOK;
180 unsigned long dwIsrRx0OK;
181 unsigned long dwIsrTBTTInt;
182 unsigned long dwIsrSTIMERInt;
183 unsigned long dwIsrWatchDog;
184 unsigned long dwIsrUnrecoverableError;
185 unsigned long dwIsrSoftInterrupt;
186 unsigned long dwIsrMIBNearfull;
187 unsigned long dwIsrRxNoBuf;
188
189 unsigned long dwIsrUnknown;
190
191 unsigned long dwIsrRx1OK;
192 unsigned long dwIsrATIMTxOK;
193 unsigned long dwIsrSYNCTxOK;
194 unsigned long dwIsrCFPEnd;
195 unsigned long dwIsrATIMEnd;
196 unsigned long dwIsrSYNCFlushOK;
197 unsigned long dwIsrSTIMER1Int;
198
199} SISRCounters, *PSISRCounters;
200
201
202#define VALID 1
203#define CREATE_REQUEST 2
204#define UNDER_CREATION 3
205#define INVALID 4
206
207
208
209
210typedef struct tagSStatCounter {
211
212
213
214
215
216
217 unsigned long dwRsrFrmAlgnErr;
218 unsigned long dwRsrErr;
219 unsigned long dwRsrCRCErr;
220 unsigned long dwRsrCRCOk;
221 unsigned long dwRsrBSSIDOk;
222 unsigned long dwRsrADDROk;
223 unsigned long dwRsrBCNSSIDOk;
224 unsigned long dwRsrLENErr;
225 unsigned long dwRsrTYPErr;
226
227 unsigned long dwNewRsrDECRYPTOK;
228 unsigned long dwNewRsrCFP;
229 unsigned long dwNewRsrUTSF;
230 unsigned long dwNewRsrHITAID;
231 unsigned long dwNewRsrHITAID0;
232
233 unsigned long dwRsrLong;
234 unsigned long dwRsrRunt;
235
236 unsigned long dwRsrRxControl;
237 unsigned long dwRsrRxData;
238 unsigned long dwRsrRxManage;
239
240 unsigned long dwRsrRxPacket;
241 unsigned long dwRsrRxOctet;
242 unsigned long dwRsrBroadcast;
243 unsigned long dwRsrMulticast;
244 unsigned long dwRsrDirected;
245
246 unsigned long long ullRsrOK;
247
248
249 unsigned long long ullRxBroadcastBytes;
250 unsigned long long ullRxMulticastBytes;
251 unsigned long long ullRxDirectedBytes;
252 unsigned long long ullRxBroadcastFrames;
253 unsigned long long ullRxMulticastFrames;
254 unsigned long long ullRxDirectedFrames;
255
256 unsigned long dwRsrRxFragment;
257 unsigned long dwRsrRxFrmLen64;
258 unsigned long dwRsrRxFrmLen65_127;
259 unsigned long dwRsrRxFrmLen128_255;
260 unsigned long dwRsrRxFrmLen256_511;
261 unsigned long dwRsrRxFrmLen512_1023;
262 unsigned long dwRsrRxFrmLen1024_1518;
263
264
265
266 unsigned long dwTsrTotalRetry[TYPE_MAXTD];
267 unsigned long dwTsrOnceRetry[TYPE_MAXTD];
268 unsigned long dwTsrMoreThanOnceRetry[TYPE_MAXTD];
269 unsigned long dwTsrRetry[TYPE_MAXTD];
270
271 unsigned long dwTsrACKData[TYPE_MAXTD];
272 unsigned long dwTsrErr[TYPE_MAXTD];
273 unsigned long dwAllTsrOK[TYPE_MAXTD];
274 unsigned long dwTsrRetryTimeout[TYPE_MAXTD];
275 unsigned long dwTsrTransmitTimeout[TYPE_MAXTD];
276
277 unsigned long dwTsrTxPacket[TYPE_MAXTD];
278 unsigned long dwTsrTxOctet[TYPE_MAXTD];
279 unsigned long dwTsrBroadcast[TYPE_MAXTD];
280 unsigned long dwTsrMulticast[TYPE_MAXTD];
281 unsigned long dwTsrDirected[TYPE_MAXTD];
282
283
284 unsigned long dwCntRxFrmLength;
285 unsigned long dwCntTxBufLength;
286
287 unsigned char abyCntRxPattern[16];
288 unsigned char abyCntTxPattern[16];
289
290
291 unsigned long dwCntRxDataErr;
292 unsigned long dwCntDecryptErr;
293 unsigned long dwCntRxICVErr;
294 unsigned int idxRxErrorDesc[TYPE_MAXRD];
295
296
297 unsigned long long ullTsrOK[TYPE_MAXTD];
298
299
300 unsigned long long ullTxBroadcastFrames[TYPE_MAXTD];
301 unsigned long long ullTxMulticastFrames[TYPE_MAXTD];
302 unsigned long long ullTxDirectedFrames[TYPE_MAXTD];
303 unsigned long long ullTxBroadcastBytes[TYPE_MAXTD];
304 unsigned long long ullTxMulticastBytes[TYPE_MAXTD];
305 unsigned long long ullTxDirectedBytes[TYPE_MAXTD];
306
307
308
309
310
311 SISRCounters ISRStat;
312
313 SCustomCounters CustomStat;
314
315#ifdef Calcu_LinkQual
316
317 unsigned long TxNoRetryOkCount;
318 unsigned long TxRetryOkCount;
319 unsigned long TxFailCount;
320
321 unsigned long RxOkCnt;
322 unsigned long RxFcsErrCnt;
323
324 unsigned long SignalStren;
325 unsigned long LinkQuality;
326#endif
327} SStatCounter, *PSStatCounter;
328
329
330
331
332
333
334
335void STAvClearAllCounter(PSStatCounter pStatistic);
336
337void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr);
338
339void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
340 unsigned char byRSR, unsigned char byNewRSR, unsigned char byRxRate,
341 unsigned char *pbyBuffer, unsigned int cbFrameLength);
342
343void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
344 unsigned char byRSR, unsigned char byNewRsr, unsigned char byRxRate,
345 unsigned char *pbyBuffer, unsigned int cbFrameLength);
346
347void STAvUpdateTDStatCounter(PSStatCounter pStatistic, unsigned char byTSR0, unsigned char byTSR1,
348 unsigned char *pbyBuffer, unsigned int cbFrameLength, unsigned int uIdx);
349
350void STAvUpdateTDStatCounterEx(
351 PSStatCounter pStatistic,
352 unsigned char *pbyBuffer,
353 unsigned long cbFrameLength
354);
355
356void STAvUpdate802_11Counter(
357 PSDot11Counters p802_11Counter,
358 PSStatCounter pStatistic,
359 unsigned long dwCounter
360);
361
362void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
363
364#endif
365