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

📄 pipc_qos.h

📁 VIA VT6524 8口网管交换机源码
💻 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:    pipc_qos.h
 *
 * Purpose: Port control and QoS module shared UI callback functions
 *
 * Author:  Tevin Chen
 *
 * Date:    Jan 08, 2002
 *
 */


#ifndef _PIPC_QOS_H
#define _PIPC_QOS_H

#ifdef __ASIC_VT6524

#include "ttype.h"
#include "switch.h"
//#include "Piport.h"


/*---------------------  Export Classes -----------------------------*/
typedef struct tagSPort_QosCfg {  // Single port config
    UINT8   f1Enable:       1;      // port enable
    UINT8   f1Auto:         1;      // Auto
    UINT8   f3SpdDpx:       3;      // Auto negotiation ability and Port speed & duplex config
    UINT8   f1FC:           1;      // Flow control ability
    UINT8   f2StaticPrior:  2;      // Port static priority
} SPort_QosCfg;

typedef struct tagSPort_QosPageCfg { // Port system config
    SPort_QosCfg    aSPortCfg[SWITCH_PORT_NUM]; // Configuration of each port
    UINT8           byQosMode;                  // QoS mode configuration
    UINT8           by8021pMap;                 // 802.1p mapping configuration
} SPort_QosPageCfg;


// operator for PIPCQOS_vOp()
enum {
    PORT_QOS_OP_EEP_TO_BUF,
    PORT_OP_BUF_TO_EEP_HW,
    PORT_OP_BUF_TO_HW,

    QOS_OP_BUF_TO_EEP_HW,
    QOS_OP_BUF_TO_HW
};

/*---------------------  Export Definitions -------------------------*/
// Define port config eeprom block size
#define EEP_ADDR_PORT_CFG       EEP_ADDR_PORT_QOS_CFG

#define EEP_SIZE_PORT_QOS_CFG   sizeof(SPort_QosPageCfg)

#define EEP_SIZE_PORT_CFG       EEP_SIZE_PORT_QOS_CFG
#define EEP_SIZE_PORT_OFFSET    sizeof(SPort_QosCfg)

#define EEP_SIZE_QOS_CFG        2
#define EEP_ADDR_QOS_CFG        (EEP_ADDR_PORT_CFG + EEP_SIZE_PORT_QOS_CFG - EEP_SIZE_QOS_CFG)

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

/*---------------------  Export Functions  --------------------------*/
// Operate within buf, eep, and hw
// shared with piportcl and piqos and used for macros only
BYTE PIPCQOS_byOp(SPort_QosPageCfg* pSPageCfg_Port, BYTE byOp, PBYTE pbyRtnPortId) DIRECT_FUNTYPE_REENT;

// Set EEPROM into default value heavychen
//void PIPCQOS_vSetEepDefault (SPort_QosPageCfg* pSPageCfg_Port) DIRECT_FUNTYPE_REENT;
void PIPORT_vSetEepDefault (SPort_QosPageCfg* pSPageCfg_Port) DIRECT_FUNTYPE_REENT;


#endif // __ASIC_VT6524
#endif /* __PIPC_QOS_H__ */

⌨️ 快捷键说明

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