2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 * Purpose: Implement MIB Data Structure
36 /*--------------------- Export Definitions -------------------------*/
42 typedef struct tagSUSBCounter {
45 } SUSBCounter, *PSUSBCounter;
54 typedef struct tagSDot11Counters {
55 /* unsigned long Length; // Length of structure */
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 TKIPCounterMeasuresInvoked;
72 unsigned long long TKIPReplays;
73 unsigned long long CCMPFormatErrors;
74 unsigned long long CCMPReplays;
75 unsigned long long CCMPDecryptErrors;
76 unsigned long long FourWayHandshakeFailures;
78 * unsigned long long WEPUndecryptableCount;
79 * unsigned long long WEPICVErrorCount;
80 * unsigned long long DecryptSuccessCount;
81 * unsigned long long DecryptFailureCount;
83 } SDot11Counters, *PSDot11Counters;
89 typedef struct tagSMib2Counter {
91 char ifDescr[256]; // max size 255 plus zero ending
96 BYTE ifPhysAddress[ETH_ALEN];
97 signed long ifAdminStatus;
98 signed long ifOperStatus;
102 DWORD ifInNUcastPkts;
105 DWORD ifInUnknownProtos;
107 DWORD ifOutUcastPkts;
108 DWORD ifOutNUcastPkts;
113 } SMib2Counter, *PSMib2Counter;
115 // Value in the ifType entry
116 #define WIRELESSLANIEEE80211b 6 //
118 // Value in the ifAdminStatus/ifOperStatus entry
127 typedef struct tagSRmonCounter {
128 signed long etherStatsIndex;
129 DWORD etherStatsDataSource;
130 DWORD etherStatsDropEvents;
131 DWORD etherStatsOctets;
132 DWORD etherStatsPkts;
133 DWORD etherStatsBroadcastPkts;
134 DWORD etherStatsMulticastPkts;
135 DWORD etherStatsCRCAlignErrors;
136 DWORD etherStatsUndersizePkts;
137 DWORD etherStatsOversizePkts;
138 DWORD etherStatsFragments;
139 DWORD etherStatsJabbers;
140 DWORD etherStatsCollisions;
141 DWORD etherStatsPkt64Octets;
142 DWORD etherStatsPkt65to127Octets;
143 DWORD etherStatsPkt128to255Octets;
144 DWORD etherStatsPkt256to511Octets;
145 DWORD etherStatsPkt512to1023Octets;
146 DWORD etherStatsPkt1024to1518Octets;
147 DWORD etherStatsOwners;
148 DWORD etherStatsStatus;
149 } SRmonCounter, *PSRmonCounter;
154 typedef struct tagSCustomCounters {
155 unsigned long Length;
157 unsigned long long ullTsrAllOK;
159 unsigned long long ullRsr11M;
160 unsigned long long ullRsr5M;
161 unsigned long long ullRsr2M;
162 unsigned long long ullRsr1M;
164 unsigned long long ullRsr11MCRCOk;
165 unsigned long long ullRsr5MCRCOk;
166 unsigned long long ullRsr2MCRCOk;
167 unsigned long long ullRsr1MCRCOk;
169 unsigned long long ullRsr54M;
170 unsigned long long ullRsr48M;
171 unsigned long long ullRsr36M;
172 unsigned long long ullRsr24M;
173 unsigned long long ullRsr18M;
174 unsigned long long ullRsr12M;
175 unsigned long long ullRsr9M;
176 unsigned long long ullRsr6M;
178 unsigned long long ullRsr54MCRCOk;
179 unsigned long long ullRsr48MCRCOk;
180 unsigned long long ullRsr36MCRCOk;
181 unsigned long long ullRsr24MCRCOk;
182 unsigned long long ullRsr18MCRCOk;
183 unsigned long long ullRsr12MCRCOk;
184 unsigned long long ullRsr9MCRCOk;
185 unsigned long long ullRsr6MCRCOk;
187 } SCustomCounters, *PSCustomCounters;
193 typedef struct tagSISRCounters {
194 unsigned long Length;
198 DWORD dwIsrBeaconTxOK;
201 DWORD dwIsrSTIMERInt;
203 DWORD dwIsrUnrecoverableError;
204 DWORD dwIsrSoftInterrupt;
205 DWORD dwIsrMIBNearfull;
208 DWORD dwIsrUnknown; // unknown interrupt count
215 DWORD dwIsrSYNCFlushOK;
216 DWORD dwIsrSTIMER1Int;
217 /////////////////////////////////////
218 } SISRCounters, *PSISRCounters;
221 // Value in the etherStatsStatus entry
223 #define CREATE_REQUEST 2 //
224 #define UNDER_CREATION 3 //
229 // Tx packet information
231 typedef struct tagSTxPktInfo {
232 BYTE byBroadMultiUni;
235 BYTE abyDestAddr[ETH_ALEN];
236 } STxPktInfo, *PSTxPktInfo;
243 typedef struct tagSStatCounter {
248 SISRCounters ISRStat;
252 DWORD dwRsrFrmAlgnErr;
258 DWORD dwRsrBCNSSIDOk;
262 DWORD dwNewRsrDECRYPTOK;
265 DWORD dwNewRsrHITAID;
266 DWORD dwNewRsrHITAID0;
271 DWORD dwRsrRxControl;
277 DWORD dwRsrBroadcast;
278 DWORD dwRsrMulticast;
281 unsigned long long ullRsrOK;
283 // for some optional OIDs (64 bits) and DMI support
284 unsigned long long ullRxBroadcastBytes;
285 unsigned long long ullRxMulticastBytes;
286 unsigned long long ullRxDirectedBytes;
287 unsigned long long ullRxBroadcastFrames;
288 unsigned long long ullRxMulticastFrames;
289 unsigned long long ullRxDirectedFrames;
291 DWORD dwRsrRxFragment;
292 DWORD dwRsrRxFrmLen64;
293 DWORD dwRsrRxFrmLen65_127;
294 DWORD dwRsrRxFrmLen128_255;
295 DWORD dwRsrRxFrmLen256_511;
296 DWORD dwRsrRxFrmLen512_1023;
297 DWORD dwRsrRxFrmLen1024_1518;
301 DWORD dwTsrTotalRetry; // total collision retry count
302 DWORD dwTsrOnceRetry; // this packet only occur one collision
303 DWORD dwTsrMoreThanOnceRetry; // this packet occur more than one collision
304 DWORD dwTsrRetry; // this packet has ever occur collision,
305 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
309 DWORD dwTsrRetryTimeout;
310 DWORD dwTsrTransmitTimeout;
314 DWORD dwTsrBroadcast;
315 DWORD dwTsrMulticast;
319 DWORD dwCntRxFrmLength;
320 DWORD dwCntTxBufLength;
322 BYTE abyCntRxPattern[16];
323 BYTE abyCntTxPattern[16];
327 // Software check....
328 DWORD dwCntRxDataErr; // rx buffer data software compare CRC err count
329 DWORD dwCntDecryptErr; // rx buffer data software compare CRC err count
330 DWORD dwCntRxICVErr; // rx buffer data software compare CRC err count
334 unsigned long long ullTsrOK;
336 // for some optional OIDs (64 bits) and DMI support
337 unsigned long long ullTxBroadcastFrames;
338 unsigned long long ullTxMulticastFrames;
339 unsigned long long ullTxDirectedFrames;
340 unsigned long long ullTxBroadcastBytes;
341 unsigned long long ullTxMulticastBytes;
342 unsigned long long ullTxDirectedBytes;
345 DWORD dwTxOk[MAX_RATE+1];
346 DWORD dwTxFail[MAX_RATE+1];
347 DWORD dwTxRetryCount[8];
349 STxPktInfo abyTxPktInfo[16];
351 SUSBCounter USB_EP0Stat;
352 SUSBCounter USB_BulkInStat;
353 SUSBCounter USB_BulkOutStat;
354 SUSBCounter USB_InterruptStat;
356 SCustomCounters CustomStat;
359 unsigned long TxNoRetryOkCount; /* success tx no retry ! */
360 unsigned long TxRetryOkCount; /* success tx but retry ! */
361 unsigned long TxFailCount; /* fail tx ? */
363 unsigned long RxOkCnt; /* success rx ! */
364 unsigned long RxFcsErrCnt; /* fail rx ? */
366 unsigned long SignalStren;
367 unsigned long LinkQuality;
369 } SStatCounter, *PSStatCounter;
371 /*--------------------- Export Classes ----------------------------*/
373 /*--------------------- Export Variables --------------------------*/
375 /*--------------------- Export Functions --------------------------*/
377 void STAvClearAllCounter(PSStatCounter pStatistic);
379 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
383 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
384 BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
385 BYTE byRxRate, PBYTE pbyBuffer,
386 unsigned int cbFrameLength);
388 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
389 BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
390 BYTE byRxRate, PBYTE pbyBuffer,
391 unsigned int cbFrameLength);
393 void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byPktNum,
394 BYTE byRate, BYTE byTSR);
397 STAvUpdate802_11Counter(
398 PSDot11Counters p802_11Counter,
399 PSStatCounter pStatistic,
406 void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
407 void STAvUpdateUSBCounter(PSUSBCounter pUsbCounter, int ntStatus);
409 #endif /* __MIB_H__ */