📄 swqos.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: swqos.h
*
* Purpose: QoS hardware accessing functions
*
* Author: Henry Lin
*
* Date: Apr 07, 2005
*
*/
#ifndef __SWQOS_H__
#define __SWQOS_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
/*--------------------- Export Definitions ------------------------*/
enum {
QOS_FCFS,
QOS_SP,
QOS_WRR
};
enum {
QOS_WRR_8_4_2_1,
QOS_WRR_15_7_3_1,
QOS_WRR_15_10_5_1
};
enum {
PREC_LOWEST,
PREC_SEC_LOWEST,
PREC_THIRD_LOWEST,
PREC_SEC_HIGHEST,
PREC_HIGHEST
};
#define PRIOR_NUM 8
struct tagSPriorPrec {
UINT8 byPort;
UINT8 byVlanTag;
UINT8 byVlan;
UINT8 byTos;
UINT8 byL2p;
};
typedef struct tagSPriorPrec SPriorPrec;
struct tagSAdjPrior {
UINT8 byPri[PRIOR_NUM];
};
typedef struct tagSAdjPrior SAdjPrior;
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Macros -----------------------------*/
#define SWQOS_vSet8021pPriorMap(w8021pMap) SWREG_vWriteU16(FWDCTL_PRIORITY_MAP, w8021pMap)
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
void SWQOS_vSetQosCfg(UINT8 byOpt);
void SWQOS_vSetOutQueWght (UINT8 byOpt);
void SWQOS_vSetOutQueWghtTkn (UINT8 byQue3, UINT8 byQue2, UINT8 byQue1, UINT8 byQue0);
void SWQOS_vSetPortPrior (UINT8 byPortId, BOOL bSelected, UINT8 byPri);
void SWQOS_vSetVlanTag (UINT8 byPortId, BOOL bSelected);
void SWQOS_vSetVlan (UINT8 byPortId, BOOL bSelected);
void SWQOS_vSetTos (UINT8 byPortId, BOOL bSelected);
void SWQOS_vSetL2p (UINT8 byPortId, BOOL bSelected);
void SWQOS_vSetPriorAdj (UINT8 byPortId, BOOL bEnable, UINT8 byProfileId);
void SWQOS_vSetPriorPropagate (UINT8 byPortId, BOOL bEnable);
BOOL SWQOS_bSetPrecedence (SPriorPrec *psPrec);
void SWQOS_vSetRaisedPrior (UINT8 byPri);
void SWQOS_vSetBPDUPrior (BOOL bPri7);
void SWQOS_vSetAdjProfile (UINT8 byProfId, SAdjPrior *psAdjPri);
BOOL SWQOS_bGetDSCPPrior (UINT8 byDSCP, PUINT8 pbyPri);
BOOL SWQOS_bSetDSCPPrior (UINT8 byDSCP, UINT8 byPri);
void SWQOS_vSetStaticPrior(UINT8 byPortId, UINT8 byPrior);
#endif /* __SWQOS_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -