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

📄 swvlan.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:    swvlan.h
 *
 * Purpose: VLAN hardware accessing functions
 *
 * Author:  Tevin Chen
 *
 * Date:    Jan 08, 2002
 *
 */


#ifndef __SWVLAN_H__
#define __SWVLAN_H__

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




/*---------------------  Export Definitions  ------------------------*/
// Definiton of vlan mode
enum {
    VLAN_MODE_DISABLE,
    VLAN_MODE_PORTBASE,
    VLAN_MODE_8021Q
};

// Definition of vlan ingress filter config code
enum {
    VLAN_INGRS_FILTER_DISABLE,
    VLAN_INGRS_FILTER_NOTMBR,
    VLAN_INGRS_FILTER_UNTAG,
    VLAN_INGRS_FILTER_NOTMBR_UNTAG
};

/*---------------------  Export Types  ------------------------------*/
// VLAN table entry structure
typedef struct tagSVlanEntry {
    UINT16  wVid;                       // VID of the entry, is Address Offset of the entry
    BOOL    bSvl;                       // Shared VLAN?
    UINT16  wFid;                       // FID of the entry
    UINT32  dwMbrPortMsk;               // Member port mask
    UINT32  dwTagPortMsk;               // Tagged port mask
} SVlanEntry;

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

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

/*---------------------  Export Variables  --------------------------*/

/*---------------------  Export Functions  --------------------------*/
void SWVLAN_vSetVlanMode(BYTE byVlanMode) DIRECT_FUNTYPE_REENT;

BOOL SWVLAN_bGetEntry(UINT16 wVid, SVlanEntry *pSEntry) DIRECT_FUNTYPE_REENT;
void SWVLAN_vSetEntry(SVlanEntry *pSEntry) DIRECT_FUNTYPE_REENT;
void SWVLAN_vClearEntry(UINT16 wVid) DIRECT_FUNTYPE_REENT;
void SWVLAN_vSetIngrsFilter(BYTE byPortId, BYTE byCfg) DIRECT_FUNTYPE_REENT;

void SWVLAN_vClearAllPortBaseGrp(void) DIRECT_FUNTYPE_REENT;
void SWVLAN_vAddPortBaseGrp(UINT32 dwMbrMsk) DIRECT_FUNTYPE_REENT;
void SWVLAN_vSetPortBaseCfgForAllGrp(void) DIRECT_FUNTYPE_REENT;

void SWVLAN_vGetPvid(BYTE byPortId, PUINT16 pwPvid) DIRECT_FUNTYPE_REENT;
void SWVLAN_vSetPvid(BYTE byPortId, UINT16 wPvid) DIRECT_FUNTYPE_REENT;




#endif /* __SWVLAN_H__ */

⌨️ 快捷键说明

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