pimacflt.h

来自「vt6528芯片交换机API函数和文档运行程序」· C头文件 代码 · 共 87 行

H
87
字号
/*
 * 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:    pimacflt.h
 *
 * Purpose: mac table filter module UI definitions
 *
 * Author:  Tim Feng
 *
 * Date:    Jan 13, 2006
 *
 */

#ifndef __PIMACFLT_H__
#define __PIMACFLT_H__

#include "ttype.h"
#include "switch.h"
#include "str.h"
#include "picfgmp.h"
#include "swpmactb.h"
#include "swsmactb.h"
#include "engine.h"
#include "pieeprom.h"

/*---------------------  Export Classes -----------------------------*/
typedef struct tagSMacFltEntryPage {
    char    azMacAddr[MAC_STRING_LEN+1];    // MAC address of the entry
    UINT16  u16Fid;                           // FID of the entry
    UINT8   bySrcId;                        // Src port/Trunk grp ID
    
    SStringTableMap SStrTblMap;             // For UI engine to map port id
    UINT8    abyDestPortList[SWITCH_PORT_NUM];    
} SMacFltEntryPage;

// Definition of mac filter configuration page
typedef struct tagSMacFltPageCfg {
    UINT8            bySMACFltMode;
    UINT16          wValidEntryNum;                                             // Valid table entry number
    UINT16          awValidGrpFidList[SWITCH_MAC_FLT_GRP_NUM];                     // Valid Fid array
    char            astrGrpMacList[SWITCH_MAC_FLT_GRP_NUM*(MAC_STRING_LEN+1)];     // Valid mac addr array
    SMacFltEntryPage  SCurGrp;                                                    // Currently configuring group
} SMacFltPageCfg;


/*---------------------  Export Definitions -------------------------*/
// Define size of mac filter config
#define EEP_SIZE_SMACFLT_MODE            sizeof(UINT8) 
#define EEP_SIZE_MACFLT_TBL_ENTRY         sizeof(SMacEntry) 

#define EEP_SIZE_MACFLT_GROUP_CFG     (SWITCH_MAC_FLT_GRP_NUM * EEP_SIZE_MACFLT_TBL_ENTRY) 

#define EEP_SIZE_MACFLT_CFG            (EEP_SIZE_SMACFLT_MODE + EEP_SIZE_MACFLT_GROUP_CFG) 

#define EEP_ADDR_SMACFLT_MODE   (EEP_ADDR_MACFLT_CFG)
#define EEP_ADDR_MACFLT_GROUP_CFG   (EEP_ADDR_SMACFLT_MODE + EEP_SIZE_SMACFLT_MODE)  

enum {
    MACFLT_MODE_SMAC_DISABLE,
    MACFLT_MODE_SMAC_PERMIT,    
    MACFLT_MODE_SMAC_DENY
};

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

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

/*---------------------  Export Functions  --------------------------*/
#endif /* __PIMACFLT_H__ */


⌨️ 快捷键说明

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