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
40 typedef struct tagSUSBCounter {
43 } SUSBCounter, *PSUSBCounter;
52 typedef struct tagSDot11Counters {
53 /* unsigned long Length; // Length of structure */
54 unsigned long long TransmittedFragmentCount;
55 unsigned long long MulticastTransmittedFrameCount;
56 unsigned long long FailedCount;
57 unsigned long long RetryCount;
58 unsigned long long MultipleRetryCount;
59 unsigned long long RTSSuccessCount;
60 unsigned long long RTSFailureCount;
61 unsigned long long ACKFailureCount;
62 unsigned long long FrameDuplicateCount;
63 unsigned long long ReceivedFragmentCount;
64 unsigned long long MulticastReceivedFrameCount;
65 unsigned long long FCSErrorCount;
66 unsigned long long TKIPLocalMICFailures;
67 unsigned long long TKIPRemoteMICFailures;
68 unsigned long long TKIPICVErrors;
69 unsigned long long TKIPReplays;
70 unsigned long long CCMPFormatErrors;
71 unsigned long long CCMPReplays;
72 unsigned long long CCMPDecryptErrors;
73 unsigned long long FourWayHandshakeFailures;
75 * unsigned long long WEPUndecryptableCount;
76 * unsigned long long WEPICVErrorCount;
77 * unsigned long long DecryptSuccessCount;
78 * unsigned long long DecryptFailureCount;
80 } SDot11Counters, *PSDot11Counters;
86 typedef struct tagSMib2Counter {
88 char ifDescr[256]; // max size 255 plus zero ending
93 u8 ifPhysAddress[ETH_ALEN];
94 signed long ifAdminStatus;
95 signed long ifOperStatus;
102 u32 ifInUnknownProtos;
110 } SMib2Counter, *PSMib2Counter;
112 // Value in the ifType entry
113 #define WIRELESSLANIEEE80211b 6 //
115 // Value in the ifAdminStatus/ifOperStatus entry
124 typedef struct tagSRmonCounter {
125 signed long etherStatsIndex;
126 u32 etherStatsDataSource;
127 u32 etherStatsDropEvents;
128 u32 etherStatsOctets;
130 u32 etherStatsBroadcastPkts;
131 u32 etherStatsMulticastPkts;
132 u32 etherStatsCRCAlignErrors;
133 u32 etherStatsUndersizePkts;
134 u32 etherStatsOversizePkts;
135 u32 etherStatsFragments;
136 u32 etherStatsJabbers;
137 u32 etherStatsCollisions;
138 u32 etherStatsPkt64Octets;
139 u32 etherStatsPkt65to127Octets;
140 u32 etherStatsPkt128to255Octets;
141 u32 etherStatsPkt256to511Octets;
142 u32 etherStatsPkt512to1023Octets;
143 u32 etherStatsPkt1024to1518Octets;
144 u32 etherStatsOwners;
145 u32 etherStatsStatus;
146 } SRmonCounter, *PSRmonCounter;
151 typedef struct tagSCustomCounters {
152 unsigned long Length;
154 unsigned long long ullTsrAllOK;
156 unsigned long long ullRsr11M;
157 unsigned long long ullRsr5M;
158 unsigned long long ullRsr2M;
159 unsigned long long ullRsr1M;
161 unsigned long long ullRsr11MCRCOk;
162 unsigned long long ullRsr5MCRCOk;
163 unsigned long long ullRsr2MCRCOk;
164 unsigned long long ullRsr1MCRCOk;
166 unsigned long long ullRsr54M;
167 unsigned long long ullRsr48M;
168 unsigned long long ullRsr36M;
169 unsigned long long ullRsr24M;
170 unsigned long long ullRsr18M;
171 unsigned long long ullRsr12M;
172 unsigned long long ullRsr9M;
173 unsigned long long ullRsr6M;
175 unsigned long long ullRsr54MCRCOk;
176 unsigned long long ullRsr48MCRCOk;
177 unsigned long long ullRsr36MCRCOk;
178 unsigned long long ullRsr24MCRCOk;
179 unsigned long long ullRsr18MCRCOk;
180 unsigned long long ullRsr12MCRCOk;
181 unsigned long long ullRsr9MCRCOk;
182 unsigned long long ullRsr6MCRCOk;
184 } SCustomCounters, *PSCustomCounters;
190 typedef struct tagSISRCounters {
191 unsigned long Length;
200 u32 dwIsrUnrecoverableError;
201 u32 dwIsrSoftInterrupt;
202 u32 dwIsrMIBNearfull;
205 u32 dwIsrUnknown; // unknown interrupt count
212 u32 dwIsrSYNCFlushOK;
214 /////////////////////////////////////
215 } SISRCounters, *PSISRCounters;
218 // Value in the etherStatsStatus entry
220 #define CREATE_REQUEST 2 //
221 #define UNDER_CREATION 3 //
226 // Tx packet information
228 typedef struct tagSTxPktInfo {
232 u8 abyDestAddr[ETH_ALEN];
233 } STxPktInfo, *PSTxPktInfo;
240 typedef struct tagSStatCounter {
245 SISRCounters ISRStat;
259 u32 dwNewRsrDECRYPTOK;
278 unsigned long long ullRsrOK;
280 // for some optional OIDs (64 bits) and DMI support
281 unsigned long long ullRxBroadcastBytes;
282 unsigned long long ullRxMulticastBytes;
283 unsigned long long ullRxDirectedBytes;
284 unsigned long long ullRxBroadcastFrames;
285 unsigned long long ullRxMulticastFrames;
286 unsigned long long ullRxDirectedFrames;
290 u32 dwRsrRxFrmLen65_127;
291 u32 dwRsrRxFrmLen128_255;
292 u32 dwRsrRxFrmLen256_511;
293 u32 dwRsrRxFrmLen512_1023;
294 u32 dwRsrRxFrmLen1024_1518;
298 u32 dwTsrTotalRetry; // total collision retry count
299 u32 dwTsrOnceRetry; // this packet only occur one collision
300 u32 dwTsrMoreThanOnceRetry; // this packet occur more than one collision
301 u32 dwTsrRetry; // this packet has ever occur collision,
302 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
306 u32 dwTsrRetryTimeout;
307 u32 dwTsrTransmitTimeout;
316 u32 dwCntRxFrmLength;
317 u32 dwCntTxBufLength;
319 u8 abyCntRxPattern[16];
320 u8 abyCntTxPattern[16];
324 // Software check....
325 u32 dwCntRxDataErr; // rx buffer data software compare CRC err count
326 u32 dwCntDecryptErr; // rx buffer data software compare CRC err count
327 u32 dwCntRxICVErr; // rx buffer data software compare CRC err count
331 unsigned long long ullTsrOK;
333 // for some optional OIDs (64 bits) and DMI support
334 unsigned long long ullTxBroadcastFrames;
335 unsigned long long ullTxMulticastFrames;
336 unsigned long long ullTxDirectedFrames;
337 unsigned long long ullTxBroadcastBytes;
338 unsigned long long ullTxMulticastBytes;
339 unsigned long long ullTxDirectedBytes;
342 u32 dwTxOk[MAX_RATE+1];
343 u32 dwTxFail[MAX_RATE+1];
344 u32 dwTxRetryCount[8];
346 STxPktInfo abyTxPktInfo[16];
348 SUSBCounter USB_EP0Stat;
349 SUSBCounter USB_BulkInStat;
350 SUSBCounter USB_BulkOutStat;
351 SUSBCounter USB_InterruptStat;
353 SCustomCounters CustomStat;
356 unsigned long TxNoRetryOkCount; /* success tx no retry ! */
357 unsigned long TxRetryOkCount; /* success tx but retry ! */
358 unsigned long TxFailCount; /* fail tx ? */
360 unsigned long RxOkCnt; /* success rx ! */
361 unsigned long RxFcsErrCnt; /* fail rx ? */
363 unsigned long SignalStren;
364 unsigned long LinkQuality;
366 } SStatCounter, *PSStatCounter;
371 void STAvClearAllCounter(PSStatCounter pStatistic);
373 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
377 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
378 u8 byRSR, u8 byNewRSR, u8 byRxSts,
379 u8 byRxRate, u8 * pbyBuffer,
380 unsigned int cbFrameLength);
382 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
383 u8 byRSR, u8 byNewRSR, u8 byRxSts,
384 u8 byRxRate, u8 * pbyBuffer,
385 unsigned int cbFrameLength);
387 void STAvUpdateTDStatCounter(PSStatCounter pStatistic, u8 byPktNum,
388 u8 byRate, u8 byTSR);
391 STAvUpdate802_11Counter(
392 PSDot11Counters p802_11Counter,
393 PSStatCounter pStatistic,
400 void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
401 void STAvUpdateUSBCounter(PSUSBCounter pUsbCounter, int ntStatus);
403 #endif /* __MIB_H__ */