📄 swmibtb.h
字号:
/*
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
* All rights reserved.
*
* This software is copyrighted by and is the sole property of
* VIA Networking Technologies, Inc. This software may only be used
* in accordance with the corresponding license agreement. Any unauthorized
* use, duplication, transmission, distribution, or disclosure of this
* software is expressly forbidden.
*
* This software is provided by VIA Networking Technologies, Inc. "as is"
* and any express or implied warranties, including, but not limited to, the
* implied warranties of merchantability and fitness for a particular purpose
* are disclaimed. In no event shall VIA Networking Technologies, Inc.
* be liable for any direct, indirect, incidental, special, exemplary, or
* consequential damages.
*
*
* File: swmibtb.h
*
* Purpose: Mib table operation functions
*
* Author: Tevin Chen
* Henry Lin
*
* Date: Jan 08, 2002
* Apr 06, 2005
*
*/
#ifndef __SWMIBTB_H__
#define __SWMIBTB_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
/*--------------------- Export Definitions ------------------------*/
#define MIBTB_CNTR_NUM 30
#define MIBTB_RXBCAST 0
#define MIBTB_RXOCTET 1
#define MIBTB_RXMCAST 2
#define MIBTB_RXFCSERROR 3
#define MIBTB_RXOVERSIZE 4
#define MIBTB_RXALIGNERROR 5
#define MIBTB_RXJABBER 6
#define MIBTB_RXFRAGMENT 7
#define MIBTB_RXUNDERSIZE 8
#define MIBTB_RXPKT64 9
#define MIBTB_RXPKT65TO127 10
#define MIBTB_RXPKT128TO255 11
#define MIBTB_RXPKT256TO511 12
#define MIBTB_RXPKT512TO1023 13
#define MIBTB_RXPKT1024TO1522 14
#define MIBTB_TXUCAST 15
#define MIBTB_TXBCAST 16
#define MIBTB_TXOCTET 17
#define MIBTB_TXSINGLECOLLISN 18
#define MIBTB_TXMULTICOLLISN 19
#define MIBTB_TXLATECOLLISN 20
#define MIBTB_TXEXCESSCOLLISN 21
#define MIBTB_TXCOLLISN 22
#define MIBTB_TXDEFFERTRANS 23
#define MIBTB_DROPFWDLKUP 24
#define MIBTB_RXDROP 25
#define MIBTB_TXMCAST 26
#define MIBTB_TXPAUSE 27
#define MIBTB_RXPAUSE 28
#define MIBTB_TXUNDERRUN 29
#define MIB_CNTNO_DROPEVENTS 30 //
#define MIB_CNTNO_RXALLPKTS 31 //
#define MIB_CNTNO_RXCRCALIGNERRORS 32 //
#define MIB_CNTNO_INFRAMES 33 // for Bridge MIB
#define MIB_CNTNO_OUTFRAMES 34 // for Bridge MIB
#define MIB_CNTNO_INUCASTPKTS 35 // for Rfc1213
#define MIB_CNTNO_INNUCASTPKTS 36 // for Rfc1213
#define MIB_CNTNO_OUTDISCARDS 37 // for Rfc1213
/*--------------------- Export Types ------------------------------*/
typedef struct tagSMibCntr {
// MIB counter maintained by hardware
UINT32 dwRxBcastPkt;
UINT32 dwRxOctet;
UINT32 dwRxMcastPkt;
UINT32 dwRxFCSErr;
UINT32 dwRxOverSizePkt;
UINT32 dwRxAlignErr;
UINT32 dwRxJabber;
UINT32 dwRxFragment;
UINT32 dwRxUnderSizePkt;
UINT32 dwRxPkt64;
UINT32 dwRxPkt65to127;
UINT32 dwRxPkt128to255;
UINT32 dwRxPkt256to511;
UINT32 dwRxPkt512to1023;
UINT32 dwRxPkt1024to1522;
UINT32 dwTxUcastPkt;
UINT32 dwTxBcastPkt;
UINT32 dwTxOctet;
UINT32 dwTxSingleCollisn;
UINT32 dwTxMultiCollisn;
UINT32 dwTxLateCollisn;
UINT32 dwTxExcesCollisn;
UINT32 dwTxCollisn;
UINT32 dwTxDefferTrans;
UINT32 dwDropFwdLkup;
UINT32 dwDropIn;
UINT32 dwTxMcst;
UINT32 dwTxPause;
UINT32 dwRxPause;
UINT32 dwTxUnderrun;
} SMibCntr;
typedef struct tagSPortStatistic {
UINT32 dwRxGoodPkt;
UINT32 dwRxBadPkt;
UINT32 dwTxGoodPkt;
UINT32 dwTxBadPkt;
UINT32 dwTxAbort;
UINT32 dwCollision;
UINT32 dwDropPkt;
} SPortStatistic;
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
void SWMIBTB_vGetCntr(UINT8 byPortId, UINT8 byCntrId, UINT32 *pdwCntr);
void SWMIBTB_vClearCntr(UINT8 byPortId, UINT8 byCntrId);
void SWMIBTB_vGetAllCntr(UINT8 byPortId, SMibCntr *pSMibCntr);
void SWMIBTB_vClearAllCntr(UINT8 byPortId);
void SWMIBTB_vGetPortStatistic(UINT8 byPortId, SPortStatistic *pSPortStatistic);
#endif // __SWMIBTB_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -