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
35 /*--------------------- Export Definitions -------------------------*/
41 typedef struct tagSUSBCounter {
44 } SUSBCounter, *PSUSBCounter;
53 typedef struct tagSDot11Counters {
54 /* unsigned long Length; // Length of structure */
55 unsigned long long TransmittedFragmentCount;
56 unsigned long long MulticastTransmittedFrameCount;
57 unsigned long long FailedCount;
58 unsigned long long RetryCount;
59 unsigned long long MultipleRetryCount;
60 unsigned long long RTSSuccessCount;
61 unsigned long long RTSFailureCount;
62 unsigned long long ACKFailureCount;
63 unsigned long long FrameDuplicateCount;
64 unsigned long long ReceivedFragmentCount;
65 unsigned long long MulticastReceivedFrameCount;
66 unsigned long long FCSErrorCount;
67 unsigned long long TKIPLocalMICFailures;
68 unsigned long long TKIPRemoteMICFailures;
69 unsigned long long TKIPICVErrors;
70 unsigned long long TKIPReplays;
71 unsigned long long CCMPFormatErrors;
72 unsigned long long CCMPReplays;
73 unsigned long long CCMPDecryptErrors;
74 unsigned long long FourWayHandshakeFailures;
76 * unsigned long long WEPUndecryptableCount;
77 * unsigned long long WEPICVErrorCount;
78 * unsigned long long DecryptSuccessCount;
79 * unsigned long long DecryptFailureCount;
81 } SDot11Counters, *PSDot11Counters;
87 typedef struct tagSMib2Counter {
89 char ifDescr[256]; // max size 255 plus zero ending
94 u8 ifPhysAddress[ETH_ALEN];
95 signed long ifAdminStatus;
96 signed long ifOperStatus;
103 u32 ifInUnknownProtos;
111 } SMib2Counter, *PSMib2Counter;
113 // Value in the ifType entry
114 #define WIRELESSLANIEEE80211b 6 //
116 // Value in the ifAdminStatus/ifOperStatus entry
125 typedef struct tagSRmonCounter {
126 signed long etherStatsIndex;
127 u32 etherStatsDataSource;
128 u32 etherStatsDropEvents;
129 u32 etherStatsOctets;
131 u32 etherStatsBroadcastPkts;
132 u32 etherStatsMulticastPkts;
133 u32 etherStatsCRCAlignErrors;
134 u32 etherStatsUndersizePkts;
135 u32 etherStatsOversizePkts;
136 u32 etherStatsFragments;
137 u32 etherStatsJabbers;
138 u32 etherStatsCollisions;
139 u32 etherStatsPkt64Octets;
140 u32 etherStatsPkt65to127Octets;
141 u32 etherStatsPkt128to255Octets;
142 u32 etherStatsPkt256to511Octets;
143 u32 etherStatsPkt512to1023Octets;
144 u32 etherStatsPkt1024to1518Octets;
145 u32 etherStatsOwners;
146 u32 etherStatsStatus;
147 } SRmonCounter, *PSRmonCounter;
152 typedef struct tagSCustomCounters {
153 unsigned long Length;
155 unsigned long long ullTsrAllOK;
157 unsigned long long ullRsr11M;
158 unsigned long long ullRsr5M;
159 unsigned long long ullRsr2M;
160 unsigned long long ullRsr1M;
162 unsigned long long ullRsr11MCRCOk;
163 unsigned long long ullRsr5MCRCOk;
164 unsigned long long ullRsr2MCRCOk;
165 unsigned long long ullRsr1MCRCOk;
167 unsigned long long ullRsr54M;
168 unsigned long long ullRsr48M;
169 unsigned long long ullRsr36M;
170 unsigned long long ullRsr24M;
171 unsigned long long ullRsr18M;
172 unsigned long long ullRsr12M;
173 unsigned long long ullRsr9M;
174 unsigned long long ullRsr6M;
176 unsigned long long ullRsr54MCRCOk;
177 unsigned long long ullRsr48MCRCOk;
178 unsigned long long ullRsr36MCRCOk;
179 unsigned long long ullRsr24MCRCOk;
180 unsigned long long ullRsr18MCRCOk;
181 unsigned long long ullRsr12MCRCOk;
182 unsigned long long ullRsr9MCRCOk;
183 unsigned long long ullRsr6MCRCOk;
185 } SCustomCounters, *PSCustomCounters;
191 typedef struct tagSISRCounters {
192 unsigned long Length;
201 u32 dwIsrUnrecoverableError;
202 u32 dwIsrSoftInterrupt;
203 u32 dwIsrMIBNearfull;
206 u32 dwIsrUnknown; // unknown interrupt count
213 u32 dwIsrSYNCFlushOK;
215 /////////////////////////////////////
216 } SISRCounters, *PSISRCounters;
219 // Value in the etherStatsStatus entry
221 #define CREATE_REQUEST 2 //
222 #define UNDER_CREATION 3 //
227 // Tx packet information
229 typedef struct tagSTxPktInfo {
233 u8 abyDestAddr[ETH_ALEN];
234 } STxPktInfo, *PSTxPktInfo;
241 typedef struct tagSStatCounter {
246 SISRCounters ISRStat;
260 u32 dwNewRsrDECRYPTOK;
279 unsigned long long ullRsrOK;
281 // for some optional OIDs (64 bits) and DMI support
282 unsigned long long ullRxBroadcastBytes;
283 unsigned long long ullRxMulticastBytes;
284 unsigned long long ullRxDirectedBytes;
285 unsigned long long ullRxBroadcastFrames;
286 unsigned long long ullRxMulticastFrames;
287 unsigned long long ullRxDirectedFrames;
291 u32 dwRsrRxFrmLen65_127;
292 u32 dwRsrRxFrmLen128_255;
293 u32 dwRsrRxFrmLen256_511;
294 u32 dwRsrRxFrmLen512_1023;
295 u32 dwRsrRxFrmLen1024_1518;
299 u32 dwTsrTotalRetry; // total collision retry count
300 u32 dwTsrOnceRetry; // this packet only occur one collision
301 u32 dwTsrMoreThanOnceRetry; // this packet occur more than one collision
302 u32 dwTsrRetry; // this packet has ever occur collision,
303 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
307 u32 dwTsrRetryTimeout;
308 u32 dwTsrTransmitTimeout;
317 u32 dwCntRxFrmLength;
318 u32 dwCntTxBufLength;
320 u8 abyCntRxPattern[16];
321 u8 abyCntTxPattern[16];
325 // Software check....
326 u32 dwCntRxDataErr; // rx buffer data software compare CRC err count
327 u32 dwCntDecryptErr; // rx buffer data software compare CRC err count
328 u32 dwCntRxICVErr; // rx buffer data software compare CRC err count
332 unsigned long long ullTsrOK;
334 // for some optional OIDs (64 bits) and DMI support
335 unsigned long long ullTxBroadcastFrames;
336 unsigned long long ullTxMulticastFrames;
337 unsigned long long ullTxDirectedFrames;
338 unsigned long long ullTxBroadcastBytes;
339 unsigned long long ullTxMulticastBytes;
340 unsigned long long ullTxDirectedBytes;
343 u32 dwTxOk[MAX_RATE+1];
344 u32 dwTxFail[MAX_RATE+1];
345 u32 dwTxRetryCount[8];
347 STxPktInfo abyTxPktInfo[16];
349 SUSBCounter USB_EP0Stat;
350 SUSBCounter USB_BulkInStat;
351 SUSBCounter USB_BulkOutStat;
352 SUSBCounter USB_InterruptStat;
354 SCustomCounters CustomStat;
357 unsigned long TxNoRetryOkCount; /* success tx no retry ! */
358 unsigned long TxRetryOkCount; /* success tx but retry ! */
359 unsigned long TxFailCount; /* fail tx ? */
361 unsigned long RxOkCnt; /* success rx ! */
362 unsigned long RxFcsErrCnt; /* fail rx ? */
364 unsigned long SignalStren;
365 unsigned long LinkQuality;
367 } SStatCounter, *PSStatCounter;
369 /*--------------------- Export Classes ----------------------------*/
371 /*--------------------- Export Variables --------------------------*/
373 /*--------------------- Export Functions --------------------------*/
375 void STAvClearAllCounter(PSStatCounter pStatistic);
377 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
381 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
382 u8 byRSR, u8 byNewRSR, u8 byRxSts,
383 u8 byRxRate, u8 * pbyBuffer,
384 unsigned int cbFrameLength);
386 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
387 u8 byRSR, u8 byNewRSR, u8 byRxSts,
388 u8 byRxRate, u8 * pbyBuffer,
389 unsigned int cbFrameLength);
391 void STAvUpdateTDStatCounter(PSStatCounter pStatistic, u8 byPktNum,
392 u8 byRate, u8 byTSR);
395 STAvUpdate802_11Counter(
396 PSDot11Counters p802_11Counter,
397 PSStatCounter pStatistic,
404 void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
405 void STAvUpdateUSBCounter(PSUSBCounter pUsbCounter, int ntStatus);
407 #endif /* __MIB_H__ */