📄 swtrk.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: swtrk.h
*
* Purpose: Trunk hardware accessing functions
*
* Author: Tevin Chen
* Henry Lin
*
* Date: Jan 08, 2002
* Apr 26, 2005
*
*/
#ifndef __SWTRK_H__
#define __SWTRK_H__
#if !defined(__CCONFIG_H__)
#include "cconfig.h"
#endif
#if !defined(__SWCFG_H__)
#include "swcfg.h"
#endif
/*--------------------- Export Definitions ------------------------*/
#define MAX_TRK_MBR_NUM 8
#define MIN_TRK_MBR_NUM 2
#define MAX_TRK_GRP_ID SWITCH_TRUNK_GRP_NUM
#define MIN_TRK_GRP_ID 1 // TBD.... because UI, should set to 0 later
/*--------------------- Export Types ------------------------------*/
#if defined(__BIG_ENDIAN_OF_BIT)
__PACKED struct tagSPortTrkCfg { // Define per-port trunk configuration
BITS8 b3Reserved: 3;
BITS8 f1Enable: 1; // Is this group enabled?
BITS8 f4GrpId: 4; // Group ID
UINT8 byCriteria; // Admin criteria
} __PACKED_GCC;
#else
__PACKED struct tagSPortTrkCfg { // Define per-port trunk configuration
UINT8 byCriteria; // Admin criteria
BITS8 f4GrpId: 4; // Group ID
BITS8 f1Enable: 1; // Is this group enabled?
} __PACKED_GCC;
#endif
typedef struct tagSPortTrkCfg SPortTrkCfg;
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Classes -----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
// Insert a trunk group
UINT8 SWTRK_byInsGrp(UINT8 byGrpId, UINT32 dwMbrMsk);
// Delete a trunk group
void SWTRK_vDelGrp(UINT32 dwMbrMsk);
#endif /* __SWTRK_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -