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 -------------------------*/
41 typedef struct tagSDot11Counters {
42 ULONG Length; // Length of structure
43 ULONGLONG TransmittedFragmentCount;
44 ULONGLONG MulticastTransmittedFrameCount;
45 ULONGLONG FailedCount;
47 ULONGLONG MultipleRetryCount;
48 ULONGLONG RTSSuccessCount;
49 ULONGLONG RTSFailureCount;
50 ULONGLONG ACKFailureCount;
51 ULONGLONG FrameDuplicateCount;
52 ULONGLONG ReceivedFragmentCount;
53 ULONGLONG MulticastReceivedFrameCount;
54 ULONGLONG FCSErrorCount;
55 ULONGLONG TKIPLocalMICFailures;
56 ULONGLONG TKIPRemoteMICFailures;
57 ULONGLONG TKIPICVErrors;
58 ULONGLONG TKIPCounterMeasuresInvoked;
59 ULONGLONG TKIPReplays;
60 ULONGLONG CCMPFormatErrors;
61 ULONGLONG CCMPReplays;
62 ULONGLONG CCMPDecryptErrors;
63 ULONGLONG FourWayHandshakeFailures;
64 // ULONGLONG WEPUndecryptableCount;
65 // ULONGLONG WEPICVErrorCount;
66 // ULONGLONG DecryptSuccessCount;
67 // ULONGLONG DecryptFailureCount;
68 } SDot11Counters, *PSDot11Counters;
74 typedef struct tagSMib2Counter {
76 char ifDescr[256]; // max size 255 plus zero ending
81 BYTE ifPhysAddress[ETH_ALEN];
90 DWORD ifInUnknownProtos;
93 DWORD ifOutNUcastPkts;
98 } SMib2Counter, *PSMib2Counter;
100 // Value in the ifType entry
101 //#define ETHERNETCSMACD 6 //
102 #define WIRELESSLANIEEE80211b 6 //
104 // Value in the ifAdminStatus/ifOperStatus entry
113 typedef struct tagSRmonCounter {
114 long etherStatsIndex;
115 DWORD etherStatsDataSource;
116 DWORD etherStatsDropEvents;
117 DWORD etherStatsOctets;
118 DWORD etherStatsPkts;
119 DWORD etherStatsBroadcastPkts;
120 DWORD etherStatsMulticastPkts;
121 DWORD etherStatsCRCAlignErrors;
122 DWORD etherStatsUndersizePkts;
123 DWORD etherStatsOversizePkts;
124 DWORD etherStatsFragments;
125 DWORD etherStatsJabbers;
126 DWORD etherStatsCollisions;
127 DWORD etherStatsPkt64Octets;
128 DWORD etherStatsPkt65to127Octets;
129 DWORD etherStatsPkt128to255Octets;
130 DWORD etherStatsPkt256to511Octets;
131 DWORD etherStatsPkt512to1023Octets;
132 DWORD etherStatsPkt1024to1518Octets;
133 DWORD etherStatsOwners;
134 DWORD etherStatsStatus;
135 } SRmonCounter, *PSRmonCounter;
140 typedef struct tagSCustomCounters {
143 ULONGLONG ullTsrAllOK;
150 ULONGLONG ullRsr11MCRCOk;
151 ULONGLONG ullRsr5MCRCOk;
152 ULONGLONG ullRsr2MCRCOk;
153 ULONGLONG ullRsr1MCRCOk;
164 ULONGLONG ullRsr54MCRCOk;
165 ULONGLONG ullRsr48MCRCOk;
166 ULONGLONG ullRsr36MCRCOk;
167 ULONGLONG ullRsr24MCRCOk;
168 ULONGLONG ullRsr18MCRCOk;
169 ULONGLONG ullRsr12MCRCOk;
170 ULONGLONG ullRsr9MCRCOk;
171 ULONGLONG ullRsr6MCRCOk;
173 } SCustomCounters, *PSCustomCounters;
179 typedef struct tagSISRCounters {
184 DWORD dwIsrBeaconTxOK;
187 DWORD dwIsrSTIMERInt;
189 DWORD dwIsrUnrecoverableError;
190 DWORD dwIsrSoftInterrupt;
191 DWORD dwIsrMIBNearfull;
194 DWORD dwIsrUnknown; // unknown interrupt count
201 DWORD dwIsrSYNCFlushOK;
202 DWORD dwIsrSTIMER1Int;
203 /////////////////////////////////////
204 } SISRCounters, *PSISRCounters;
207 // Value in the etherStatsStatus entry
209 #define CREATE_REQUEST 2 //
210 #define UNDER_CREATION 3 //
213 //#define MAX_RATE 12
217 typedef struct tagSStatCounter {
225 DWORD dwRsrFrmAlgnErr;
231 DWORD dwRsrBCNSSIDOk;
235 DWORD dwNewRsrDECRYPTOK;
238 DWORD dwNewRsrHITAID;
239 DWORD dwNewRsrHITAID0;
244 DWORD dwRsrRxControl;
250 DWORD dwRsrBroadcast;
251 DWORD dwRsrMulticast;
256 // for some optional OIDs (64 bits) and DMI support
257 ULONGLONG ullRxBroadcastBytes;
258 ULONGLONG ullRxMulticastBytes;
259 ULONGLONG ullRxDirectedBytes;
260 ULONGLONG ullRxBroadcastFrames;
261 ULONGLONG ullRxMulticastFrames;
262 ULONGLONG ullRxDirectedFrames;
264 DWORD dwRsrRxFragment;
265 DWORD dwRsrRxFrmLen64;
266 DWORD dwRsrRxFrmLen65_127;
267 DWORD dwRsrRxFrmLen128_255;
268 DWORD dwRsrRxFrmLen256_511;
269 DWORD dwRsrRxFrmLen512_1023;
270 DWORD dwRsrRxFrmLen1024_1518;
274 DWORD dwTsrTotalRetry[TYPE_MAXTD]; // total collision retry count
275 DWORD dwTsrOnceRetry[TYPE_MAXTD]; // this packet only occur one collision
276 DWORD dwTsrMoreThanOnceRetry[TYPE_MAXTD]; // this packet occur more than one collision
277 DWORD dwTsrRetry[TYPE_MAXTD]; // this packet has ever occur collision,
278 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
279 DWORD dwTsrACKData[TYPE_MAXTD];
280 DWORD dwTsrErr[TYPE_MAXTD];
281 DWORD dwAllTsrOK[TYPE_MAXTD];
282 DWORD dwTsrRetryTimeout[TYPE_MAXTD];
283 DWORD dwTsrTransmitTimeout[TYPE_MAXTD];
285 DWORD dwTsrTxPacket[TYPE_MAXTD];
286 DWORD dwTsrTxOctet[TYPE_MAXTD];
287 DWORD dwTsrBroadcast[TYPE_MAXTD];
288 DWORD dwTsrMulticast[TYPE_MAXTD];
289 DWORD dwTsrDirected[TYPE_MAXTD];
292 DWORD dwCntRxFrmLength;
293 DWORD dwCntTxBufLength;
295 BYTE abyCntRxPattern[16];
296 BYTE abyCntTxPattern[16];
300 // Software check....
301 DWORD dwCntRxDataErr; // rx buffer data software compare CRC err count
302 DWORD dwCntDecryptErr; // rx buffer data software compare CRC err count
303 DWORD dwCntRxICVErr; // rx buffer data software compare CRC err count
304 UINT idxRxErrorDesc[TYPE_MAXRD]; // index for rx data error RD
307 ULONGLONG ullTsrOK[TYPE_MAXTD];
309 // for some optional OIDs (64 bits) and DMI support
310 ULONGLONG ullTxBroadcastFrames[TYPE_MAXTD];
311 ULONGLONG ullTxMulticastFrames[TYPE_MAXTD];
312 ULONGLONG ullTxDirectedFrames[TYPE_MAXTD];
313 ULONGLONG ullTxBroadcastBytes[TYPE_MAXTD];
314 ULONGLONG ullTxMulticastBytes[TYPE_MAXTD];
315 ULONGLONG ullTxDirectedBytes[TYPE_MAXTD];
317 // DWORD dwTxRetryCount[8];
321 SISRCounters ISRStat;
323 SCustomCounters CustomStat;
325 #ifdef Calcu_LinkQual
327 ULONG TxNoRetryOkCount; //success tx no retry !
328 ULONG TxRetryOkCount; //success tx but retry !
329 ULONG TxFailCount; //fail tx ?
331 ULONG RxOkCnt; //success rx !
332 ULONG RxFcsErrCnt; //fail rx ?
337 } SStatCounter, *PSStatCounter;
339 /*--------------------- Export Classes ----------------------------*/
341 /*--------------------- Export Variables --------------------------*/
343 /*--------------------- Export Functions --------------------------*/
345 void STAvClearAllCounter(PSStatCounter pStatistic);
347 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, DWORD dwIsr);
349 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
350 BYTE byRSR, BYTE byNewRSR, BYTE byRxRate,
351 PBYTE pbyBuffer, UINT cbFrameLength);
353 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
354 BYTE byRSR, BYTE byNewRsr, BYTE byRxRate,
355 PBYTE pbyBuffer, UINT cbFrameLength);
357 void STAvUpdateTDStatCounter(PSStatCounter pStatistic,
358 BYTE byTSR0, BYTE byTSR1,
359 PBYTE pbyBuffer, UINT cbFrameLength, UINT uIdx );
361 void STAvUpdateTDStatCounterEx(
362 PSStatCounter pStatistic,
367 void STAvUpdate802_11Counter(
368 PSDot11Counters p802_11Counter,
369 PSStatCounter pStatistic,
373 void STAvClear802_11Counter(PSDot11Counters p802_11Counter);