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
32 #if !defined(__TTYPE_H__)
35 #if !defined(__TETHER_H__)
38 #if !defined(__DESC_H__)
44 //#define ULONGLONG ULONG
46 /*--------------------- Export Definitions -------------------------*/
51 typedef struct tagSDot11Counters
{
52 ULONG Length
; // Length of structure
53 ULONGLONG TransmittedFragmentCount
;
54 ULONGLONG MulticastTransmittedFrameCount
;
55 ULONGLONG FailedCount
;
57 ULONGLONG MultipleRetryCount
;
58 ULONGLONG RTSSuccessCount
;
59 ULONGLONG RTSFailureCount
;
60 ULONGLONG ACKFailureCount
;
61 ULONGLONG FrameDuplicateCount
;
62 ULONGLONG ReceivedFragmentCount
;
63 ULONGLONG MulticastReceivedFrameCount
;
64 ULONGLONG FCSErrorCount
;
65 ULONGLONG TKIPLocalMICFailures
;
66 ULONGLONG TKIPRemoteMICFailures
;
67 ULONGLONG TKIPICVErrors
;
68 ULONGLONG TKIPCounterMeasuresInvoked
;
69 ULONGLONG TKIPReplays
;
70 ULONGLONG CCMPFormatErrors
;
71 ULONGLONG CCMPReplays
;
72 ULONGLONG CCMPDecryptErrors
;
73 ULONGLONG FourWayHandshakeFailures
;
74 // ULONGLONG WEPUndecryptableCount;
75 // ULONGLONG WEPICVErrorCount;
76 // ULONGLONG DecryptSuccessCount;
77 // ULONGLONG DecryptFailureCount;
78 } SDot11Counters
, DEF
* PSDot11Counters
;
84 typedef struct tagSMib2Counter
{
86 TCHAR ifDescr
[256]; // max size 255 plus zero ending
91 BYTE ifPhysAddress
[U_ETHER_ADDR_LEN
];
100 DWORD ifInUnknownProtos
;
102 DWORD ifOutUcastPkts
;
103 DWORD ifOutNUcastPkts
;
108 } SMib2Counter
, DEF
* PSMib2Counter
;
110 // Value in the ifType entry
111 //#define ETHERNETCSMACD 6 //
112 #define WIRELESSLANIEEE80211b 6 //
114 // Value in the ifAdminStatus/ifOperStatus entry
123 typedef struct tagSRmonCounter
{
124 LONG etherStatsIndex
;
125 DWORD etherStatsDataSource
;
126 DWORD etherStatsDropEvents
;
127 DWORD etherStatsOctets
;
128 DWORD etherStatsPkts
;
129 DWORD etherStatsBroadcastPkts
;
130 DWORD etherStatsMulticastPkts
;
131 DWORD etherStatsCRCAlignErrors
;
132 DWORD etherStatsUndersizePkts
;
133 DWORD etherStatsOversizePkts
;
134 DWORD etherStatsFragments
;
135 DWORD etherStatsJabbers
;
136 DWORD etherStatsCollisions
;
137 DWORD etherStatsPkt64Octets
;
138 DWORD etherStatsPkt65to127Octets
;
139 DWORD etherStatsPkt128to255Octets
;
140 DWORD etherStatsPkt256to511Octets
;
141 DWORD etherStatsPkt512to1023Octets
;
142 DWORD etherStatsPkt1024to1518Octets
;
143 DWORD etherStatsOwners
;
144 DWORD etherStatsStatus
;
145 } SRmonCounter
, DEF
* PSRmonCounter
;
150 typedef struct tagSCustomCounters
{
153 ULONGLONG ullTsrAllOK
;
160 ULONGLONG ullRsr11MCRCOk
;
161 ULONGLONG ullRsr5MCRCOk
;
162 ULONGLONG ullRsr2MCRCOk
;
163 ULONGLONG ullRsr1MCRCOk
;
174 ULONGLONG ullRsr54MCRCOk
;
175 ULONGLONG ullRsr48MCRCOk
;
176 ULONGLONG ullRsr36MCRCOk
;
177 ULONGLONG ullRsr24MCRCOk
;
178 ULONGLONG ullRsr18MCRCOk
;
179 ULONGLONG ullRsr12MCRCOk
;
180 ULONGLONG ullRsr9MCRCOk
;
181 ULONGLONG ullRsr6MCRCOk
;
183 } SCustomCounters
, DEF
* PSCustomCounters
;
189 typedef struct tagSISRCounters
{
194 DWORD dwIsrBeaconTxOK
;
197 DWORD dwIsrSTIMERInt
;
199 DWORD dwIsrUnrecoverableError
;
200 DWORD dwIsrSoftInterrupt
;
201 DWORD dwIsrMIBNearfull
;
204 DWORD dwIsrUnknown
; // unknown interrupt count
211 DWORD dwIsrSYNCFlushOK
;
212 DWORD dwIsrSTIMER1Int
;
213 /////////////////////////////////////
214 } SISRCounters
, DEF
* PSISRCounters
;
217 // Value in the etherStatsStatus entry
219 #define CREATE_REQUEST 2 //
220 #define UNDER_CREATION 3 //
223 //#define MAX_RATE 12
227 typedef struct tagSStatCounter
{
235 DWORD dwRsrFrmAlgnErr
;
241 DWORD dwRsrBCNSSIDOk
;
245 DWORD dwNewRsrDECRYPTOK
;
248 DWORD dwNewRsrHITAID
;
249 DWORD dwNewRsrHITAID0
;
254 DWORD dwRsrRxControl
;
260 DWORD dwRsrBroadcast
;
261 DWORD dwRsrMulticast
;
266 // for some optional OIDs (64 bits) and DMI support
267 ULONGLONG ullRxBroadcastBytes
;
268 ULONGLONG ullRxMulticastBytes
;
269 ULONGLONG ullRxDirectedBytes
;
270 ULONGLONG ullRxBroadcastFrames
;
271 ULONGLONG ullRxMulticastFrames
;
272 ULONGLONG ullRxDirectedFrames
;
274 DWORD dwRsrRxFragment
;
275 DWORD dwRsrRxFrmLen64
;
276 DWORD dwRsrRxFrmLen65_127
;
277 DWORD dwRsrRxFrmLen128_255
;
278 DWORD dwRsrRxFrmLen256_511
;
279 DWORD dwRsrRxFrmLen512_1023
;
280 DWORD dwRsrRxFrmLen1024_1518
;
284 DWORD dwTsrTotalRetry
[TYPE_MAXTD
]; // total collision retry count
285 DWORD dwTsrOnceRetry
[TYPE_MAXTD
]; // this packet only occur one collision
286 DWORD dwTsrMoreThanOnceRetry
[TYPE_MAXTD
]; // this packet occur more than one collision
287 DWORD dwTsrRetry
[TYPE_MAXTD
]; // this packet has ever occur collision,
288 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
289 DWORD dwTsrACKData
[TYPE_MAXTD
];
290 DWORD dwTsrErr
[TYPE_MAXTD
];
291 DWORD dwAllTsrOK
[TYPE_MAXTD
];
292 DWORD dwTsrRetryTimeout
[TYPE_MAXTD
];
293 DWORD dwTsrTransmitTimeout
[TYPE_MAXTD
];
295 DWORD dwTsrTxPacket
[TYPE_MAXTD
];
296 DWORD dwTsrTxOctet
[TYPE_MAXTD
];
297 DWORD dwTsrBroadcast
[TYPE_MAXTD
];
298 DWORD dwTsrMulticast
[TYPE_MAXTD
];
299 DWORD dwTsrDirected
[TYPE_MAXTD
];
302 DWORD dwCntRxFrmLength
;
303 DWORD dwCntTxBufLength
;
305 BYTE abyCntRxPattern
[16];
306 BYTE abyCntTxPattern
[16];
310 // Software check....
311 DWORD dwCntRxDataErr
; // rx buffer data software compare CRC err count
312 DWORD dwCntDecryptErr
; // rx buffer data software compare CRC err count
313 DWORD dwCntRxICVErr
; // rx buffer data software compare CRC err count
314 UINT idxRxErrorDesc
[TYPE_MAXRD
]; // index for rx data error RD
317 ULONGLONG ullTsrOK
[TYPE_MAXTD
];
319 // for some optional OIDs (64 bits) and DMI support
320 ULONGLONG ullTxBroadcastFrames
[TYPE_MAXTD
];
321 ULONGLONG ullTxMulticastFrames
[TYPE_MAXTD
];
322 ULONGLONG ullTxDirectedFrames
[TYPE_MAXTD
];
323 ULONGLONG ullTxBroadcastBytes
[TYPE_MAXTD
];
324 ULONGLONG ullTxMulticastBytes
[TYPE_MAXTD
];
325 ULONGLONG ullTxDirectedBytes
[TYPE_MAXTD
];
327 // DWORD dwTxRetryCount[8];
331 SISRCounters ISRStat
;
333 SCustomCounters CustomStat
;
335 #ifdef Calcu_LinkQual
337 ULONG TxNoRetryOkCount
; //success tx no retry !
338 ULONG TxRetryOkCount
; //sucess tx but retry !
339 ULONG TxFailCount
; //fail tx ?
341 ULONG RxOkCnt
; //sucess rx !
342 ULONG RxFcsErrCnt
; //fail rx ?
347 } SStatCounter
, DEF
* PSStatCounter
;
349 /*--------------------- Export Classes ----------------------------*/
351 /*--------------------- Export Variables --------------------------*/
353 /*--------------------- Export Functions --------------------------*/
355 extern "C" { /* Assume C declarations for C++ */
356 #endif /* __cplusplus */
359 void STAvClearAllCounter(PSStatCounter pStatistic
);
361 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic
, DWORD dwIsr
);
363 void STAvUpdateRDStatCounter(PSStatCounter pStatistic
,
364 BYTE byRSR
, BYTE byNewRSR
, BYTE byRxRate
,
365 PBYTE pbyBuffer
, UINT cbFrameLength
);
367 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic
,
368 BYTE byRSR
, BYTE byNewRsr
, BYTE byRxRate
,
369 PBYTE pbyBuffer
, UINT cbFrameLength
);
371 void STAvUpdateTDStatCounter(PSStatCounter pStatistic
,
372 BYTE byTSR0
, BYTE byTSR1
,
373 PBYTE pbyBuffer
, UINT cbFrameLength
, UINT uIdx
);
375 void STAvUpdateTDStatCounterEx(
376 PSStatCounter pStatistic
,
381 void STAvUpdate802_11Counter(
382 PSDot11Counters p802_11Counter
,
383 PSStatCounter pStatistic
,
387 void STAvClear802_11Counter(PSDot11Counters p802_11Counter
);
390 } /* End of extern "C" { */
391 #endif /* __cplusplus */