⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swrate.h

📁 vt6528芯片交换机API函数和文档运行程序
💻 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:    swrate.h
 *
 * Purpose: Ingress/Egress Rate Control and BSF hardware accessing functions
 *
 * Author:  Henry Lin
 *
 * Date:    Apr 14, 2005
 *
 */


#ifndef __SWRATE_H__
#define __SWRATE_H__

#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif




/*---------------------  Export Definitions  ------------------------*/
enum {
    BSF_RATE_50,
    BSF_RATE_25,
    BSF_RATE_12,
    BSF_RATE_6,
    BSF_MODE_OFF
};

struct tagSIRCLimitSetCfg {
    UINT8   byQueue[4];
};
typedef struct tagSIRCLimitSetCfg SIRCLimitSetCfg;

struct tagSBsfCfg {
    UINT8   byRateSel;
    BOOL    bFldUcstMcstEn;
    BOOL    bCtrlPktEn;
    BOOL    bIpMcstEn;
    BOOL    bBcstEn;
    BOOL    bBSFEn;
};
typedef struct tagSBsfCfg SBsfCfg;

/*---------------------  Export Types  ------------------------------*/

/*---------------------  Export Macros  -----------------------------*/

/*---------------------  Export Classes  ----------------------------*/

/*---------------------  Export Macro  ------------------------------*/

/*---------------------  Export Functions  --------------------------*/
void SWRATE_vSetRateCtrl(UINT8 byPortId, UINT8 byIngress, UINT8 byEgress);
void SWRATE_vSetRateCtrlExt(UINT8 byPortId,UINT16 u16IngrsMb, UINT32 u32EgrsKb);
void SWRATE_vGetRateCtrl(UINT8 byPortId, PUINT16 pu16IngrsMb, PUINT32 pu32EgrsKb);
void SWRATE_vSetIRCLimitSet(UINT8 bySetId, SIRCLimitSetCfg sLimitSet);
void SWRATE_vSetGigaPortIRCLimitSetId(UINT8 byGigaPortId, UINT8 bySetId);
void SWRATE_vGetEgrsOverhead(UINT8 byPortId, PUINT8 pbyCL, PINT8 pi8CH);
void SWRATE_vSetEgrsOverhead(UINT8 byPortId, UINT8 byCL, INT8 i8CH);
void SWRATE_vGetCnstMR(UINT8 byPortId, PUINT16 pu16M, PUINT8 pu8R);


void SWRATE_vSetBSFEn(UINT8 byPortId, BOOL bBsfEn);
void SWRATE_vGetBsfCfg(SBsfCfg* psBSFCfg);
BOOL SWRATE_bSetBsfCfg(SBsfCfg* psBSFCfg);

#endif /* __SWRATE_H__ */


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -