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
38 typedef struct tagSUSBCounter {
41 } SUSBCounter, *PSUSBCounter;
47 typedef struct tagSDot11Counters {
48 /* unsigned long Length; // Length of structure */
49 unsigned long long TransmittedFragmentCount;
50 unsigned long long MulticastTransmittedFrameCount;
51 unsigned long long FailedCount;
52 unsigned long long RetryCount;
53 unsigned long long MultipleRetryCount;
54 unsigned long long RTSSuccessCount;
55 unsigned long long RTSFailureCount;
56 unsigned long long ACKFailureCount;
57 unsigned long long FrameDuplicateCount;
58 unsigned long long ReceivedFragmentCount;
59 unsigned long long MulticastReceivedFrameCount;
60 unsigned long long FCSErrorCount;
61 unsigned long long TKIPLocalMICFailures;
62 unsigned long long TKIPRemoteMICFailures;
63 unsigned long long TKIPICVErrors;
64 unsigned long long TKIPReplays;
65 unsigned long long CCMPFormatErrors;
66 unsigned long long CCMPReplays;
67 unsigned long long CCMPDecryptErrors;
68 unsigned long long FourWayHandshakeFailures;
70 * unsigned long long WEPUndecryptableCount;
71 * unsigned long long WEPICVErrorCount;
72 * unsigned long long DecryptSuccessCount;
73 * unsigned long long DecryptFailureCount;
75 } SDot11Counters, *PSDot11Counters;
80 typedef struct tagSMib2Counter {
82 char ifDescr[256]; // max size 255 plus zero ending
87 u8 ifPhysAddress[ETH_ALEN];
88 signed long ifAdminStatus;
89 signed long ifOperStatus;
96 u32 ifInUnknownProtos;
104 } SMib2Counter, *PSMib2Counter;
106 // Value in the ifType entry
107 #define WIRELESSLANIEEE80211b 6 //
109 // Value in the ifAdminStatus/ifOperStatus entry
117 typedef struct tagSRmonCounter {
118 signed long etherStatsIndex;
119 u32 etherStatsDataSource;
120 u32 etherStatsDropEvents;
121 u32 etherStatsOctets;
123 u32 etherStatsBroadcastPkts;
124 u32 etherStatsMulticastPkts;
125 u32 etherStatsCRCAlignErrors;
126 u32 etherStatsUndersizePkts;
127 u32 etherStatsOversizePkts;
128 u32 etherStatsFragments;
129 u32 etherStatsJabbers;
130 u32 etherStatsCollisions;
131 u32 etherStatsPkt64Octets;
132 u32 etherStatsPkt65to127Octets;
133 u32 etherStatsPkt128to255Octets;
134 u32 etherStatsPkt256to511Octets;
135 u32 etherStatsPkt512to1023Octets;
136 u32 etherStatsPkt1024to1518Octets;
137 u32 etherStatsOwners;
138 u32 etherStatsStatus;
139 } SRmonCounter, *PSRmonCounter;
144 typedef struct tagSCustomCounters {
145 unsigned long Length;
147 unsigned long long ullTsrAllOK;
149 unsigned long long ullRsr11M;
150 unsigned long long ullRsr5M;
151 unsigned long long ullRsr2M;
152 unsigned long long ullRsr1M;
154 unsigned long long ullRsr11MCRCOk;
155 unsigned long long ullRsr5MCRCOk;
156 unsigned long long ullRsr2MCRCOk;
157 unsigned long long ullRsr1MCRCOk;
159 unsigned long long ullRsr54M;
160 unsigned long long ullRsr48M;
161 unsigned long long ullRsr36M;
162 unsigned long long ullRsr24M;
163 unsigned long long ullRsr18M;
164 unsigned long long ullRsr12M;
165 unsigned long long ullRsr9M;
166 unsigned long long ullRsr6M;
168 unsigned long long ullRsr54MCRCOk;
169 unsigned long long ullRsr48MCRCOk;
170 unsigned long long ullRsr36MCRCOk;
171 unsigned long long ullRsr24MCRCOk;
172 unsigned long long ullRsr18MCRCOk;
173 unsigned long long ullRsr12MCRCOk;
174 unsigned long long ullRsr9MCRCOk;
175 unsigned long long ullRsr6MCRCOk;
177 } SCustomCounters, *PSCustomCounters;
182 typedef struct tagSISRCounters {
183 unsigned long Length;
192 u32 dwIsrUnrecoverableError;
193 u32 dwIsrSoftInterrupt;
194 u32 dwIsrMIBNearfull;
197 u32 dwIsrUnknown; // unknown interrupt count
204 u32 dwIsrSYNCFlushOK;
206 /////////////////////////////////////
207 } SISRCounters, *PSISRCounters;
209 // Value in the etherStatsStatus entry
211 #define CREATE_REQUEST 2 //
212 #define UNDER_CREATION 3 //
216 // Tx packet information
218 typedef struct tagSTxPktInfo {
222 u8 abyDestAddr[ETH_ALEN];
223 } STxPktInfo, *PSTxPktInfo;
229 typedef struct tagSStatCounter {
234 SISRCounters ISRStat;
248 u32 dwNewRsrDECRYPTOK;
267 unsigned long long ullRsrOK;
269 // for some optional OIDs (64 bits) and DMI support
270 unsigned long long ullRxBroadcastBytes;
271 unsigned long long ullRxMulticastBytes;
272 unsigned long long ullRxDirectedBytes;
273 unsigned long long ullRxBroadcastFrames;
274 unsigned long long ullRxMulticastFrames;
275 unsigned long long ullRxDirectedFrames;
279 u32 dwRsrRxFrmLen65_127;
280 u32 dwRsrRxFrmLen128_255;
281 u32 dwRsrRxFrmLen256_511;
282 u32 dwRsrRxFrmLen512_1023;
283 u32 dwRsrRxFrmLen1024_1518;
287 u32 dwTsrTotalRetry; // total collision retry count
288 u32 dwTsrOnceRetry; // this packet only occur one collision
289 u32 dwTsrMoreThanOnceRetry; // this packet occur more than one collision
290 u32 dwTsrRetry; // this packet has ever occur collision,
291 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
295 u32 dwTsrRetryTimeout;
296 u32 dwTsrTransmitTimeout;
305 u32 dwCntRxFrmLength;
306 u32 dwCntTxBufLength;
308 u8 abyCntRxPattern[16];
309 u8 abyCntTxPattern[16];
311 // Software check....
312 u32 dwCntRxDataErr; // rx buffer data software compare CRC err count
313 u32 dwCntDecryptErr; // rx buffer data software compare CRC err count
314 u32 dwCntRxICVErr; // rx buffer data software compare CRC err count
317 unsigned long long ullTsrOK;
319 // for some optional OIDs (64 bits) and DMI support
320 unsigned long long ullTxBroadcastFrames;
321 unsigned long long ullTxMulticastFrames;
322 unsigned long long ullTxDirectedFrames;
323 unsigned long long ullTxBroadcastBytes;
324 unsigned long long ullTxMulticastBytes;
325 unsigned long long ullTxDirectedBytes;
328 u32 dwTxOk[MAX_RATE+1];
329 u32 dwTxFail[MAX_RATE+1];
330 u32 dwTxRetryCount[8];
332 STxPktInfo abyTxPktInfo[16];
334 SUSBCounter USB_EP0Stat;
335 SUSBCounter USB_BulkInStat;
336 SUSBCounter USB_BulkOutStat;
337 SUSBCounter USB_InterruptStat;
339 SCustomCounters CustomStat;
342 unsigned long TxNoRetryOkCount; /* success tx no retry ! */
343 unsigned long TxRetryOkCount; /* success tx but retry ! */
344 unsigned long TxFailCount; /* fail tx ? */
346 unsigned long RxOkCnt; /* success rx ! */
347 unsigned long RxFcsErrCnt; /* fail rx ? */
349 unsigned long SignalStren;
350 unsigned long LinkQuality;
352 } SStatCounter, *PSStatCounter;
354 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
358 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
359 u8 byRSR, u8 byNewRSR, u8 byRxSts,
360 u8 byRxRate, u8 * pbyBuffer,
361 unsigned int cbFrameLength);
363 void STAvUpdateTDStatCounter(PSStatCounter pStatistic, u8 byPktNum,
364 u8 byRate, u8 byTSR);
367 STAvUpdate802_11Counter(
368 PSDot11Counters p802_11Counter,
369 PSStatCounter pStatistic,
376 void STAvUpdateUSBCounter(PSUSBCounter pUsbCounter, int ntStatus);
378 #endif /* __MIB_H__ */