📄 swmib.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: swmib.h
*
* Purpose: Mib table operation functions
*
* Author: Tevin Chen
*
* Date: Jan 08, 2002
*
*/
#ifndef __SWMIB_H__
#define __SWMIB_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
/*--------------------- Export Definitions ------------------------*/
#define MIBTBL_CNTR_NUM 30
#define MIBTBL_RXBCAST 0
#define MIBTBL_RXOCTET 1
#define MIBTBL_RXMCAST 2
#define MIBTBL_RXFCSERROR 3
#define MIBTBL_RXOVERSIZE 4
#define MIBTBL_RXALIGNERROR 5
#define MIBTBL_RXJABBER 6
#define MIBTBL_RXFRAGMENT 7
#define MIBTBL_RXUNDERSIZE 8
#define MIBTBL_RXPKT64 9
#define MIBTBL_RXPKT65TO127 10
#define MIBTBL_RXPKT128TO255 11
#define MIBTBL_RXPKT256TO511 12
#define MIBTBL_RXPKT512TO1023 13
#define MIBTBL_RXPKT1024TOMAX 14
#define MIBTBL_TXUCAST 15
#define MIBTBL_TXNUCAST 16
#define MIBTBL_TXOCTET 17
#define MIBTBL_TXSINGLECOLLISN 18
#define MIBTBL_TXMULTICOLLISN 19
#define MIBTBL_TXLATECOLLISN 20
#define MIBTBL_TXEXCESSCOLLISN 21
#define MIBTBL_TXCOLLISN 22
#define MIBTBL_TXDEFFERTRANS 23
#define MIBTBL_DROPFWDLKUP 24
#define MIBTBL_DROPINOVERRUN 25
#define MIBTBL_TXUNDERRUN 26
#define MIBTBL_DROPOUTQUELIFE 27
#define MIBTBL_OUTQUELEN 29
#define MIB_CNTNO_DROPEVENTS 30 //Wango add 2002_0309
#define MIB_CNTNO_RXALLPKTS 31 //Wango add 2002_0309
#define MIB_CNTNO_RXCRCALIGNERRORS 32 //Wango add 2002_0309
#define MIB_CNTNO_INFRAMES 33 //for Bridge.c
#define MIB_CNTNO_OUTFRAMES 34 //for Bridge.c
#define MIB_CNTNO_INUCASTPKTS 35 //for Rfc1213.c
#define MIB_CNTNO_INNUCASTPKTS 36 //for Rfc1213.c
#define MIB_CNTNO_OUTDISCARDS 37 //for Rfc1213.c
/*--------------------- Export Types ------------------------------*/
typedef struct {
// MIB counter mentained 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 dwRxPkt1024toMax;
UINT32 dwTxUcastPkt;
UINT32 dwTxNUcastPkt;
UINT32 dwTxOctet;
UINT32 dwTxSingleCollisn;
UINT32 dwTxMultiCollisn;
UINT32 dwTxLateCollisn;
UINT32 dwTxExcesCollisn;
UINT32 dwTxCollisn;
UINT32 dwTxDefferTrans;
UINT32 dwDropFwdLkup;
UINT32 dwDropInOverrun;
UINT32 dwTxUnderrun;
UINT32 dwDropOutQueLife;
UINT32 dwOutQueLen;
UINT32 dwRESERVED;
} SMibCntr;
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
void SWMIB_vGetCntr(BYTE byPortId, BYTE byCntrId, UINT32 *pdwCntr);
void SWMIB_vClearCntr(BYTE byPortId, BYTE byCntrId);
void SWMIB_vGetAllCntr(BYTE byPortId, SMibCntr *pSMibCntr);
void SWMIB_vClearAllCntr(BYTE byPortId);
#endif // __SWMIB_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -