📄 swsecu.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: swsecu.h
*
* Purpose: Security hardware accessing functions
*
* Author: Henry Lin
*
* Date: Apr 11, 2005
*
*/
#ifndef __SWSECU_H__
#define __SWSECU_H__
/*--------------------- Export Definitions ------------------------*/
enum {
INCON_NOT_CARE,
INCON_STATIC_ENTRY,
INCON_DYNAMIC_ENTRY,
INCON_BOTH_ENTRY
};
enum {
SV_FWD_DROP, //security violator
SV_FWD_NORMAL,
SV_FWD_ONLY_CPU
};
enum {
CTRL_PKT_BYPASS,
CTRL_PKT_SV
};
enum {
RATE_LIMIT_TIME_UINT_SEC,
RATE_LIMIT_TIME_UINT_100MSEC,
RATE_LIMIT_TIME_UINT_10MSEC
};
struct tagSGlobalSecuCfg {
UINT8 bySrcPortIncon;
BOOL bBcstMcstSMACDetect;
BOOL bSMACSIPDetect;
UINT8 bySVFwdOpt;
BOOL bLogSVSMAC;
UINT8 byCtrlPktOpt;
};
typedef struct tagSGlobalSecuCfg SGlobSecuCfg;
struct tagSSecuFwdScope {
BOOL bSVProcEn;
BOOL bSVDetectEn;
BOOL bLkupMissFltEn;
};
typedef struct tagSSecuFwdScope SSecuFwdScope;
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
BOOL SWSECU_bGetLearnEn(UINT8 byPortId);
void SWSECU_vSetLearnEn(UINT8 byPortId, BOOL bLearnEn);
void SWSECU_vSetSecuDetectEn(UINT8 byPortId, BOOL bSecuDetctEn);
void SWSECU_vGetGlobalCfg(SGlobSecuCfg *psSecuCfg);
BOOL SWSECU_bSetGlobalCfg(SGlobSecuCfg sSecuCfg);
void SWSECU_vGetFwdScope (UINT8 byScopeId, SSecuFwdScope *psSecuCfg);
void SWSECU_vSetFwdScope (UINT8 byScopeId, SSecuFwdScope sSecuCfg);
void SWSECU_vSetPortFwdScopeId (UINT8 byPortId, UINT8 byScopeId);
BOOL SWSECU_bSetRateLimit (UINT8 byCfgId, UINT8 byTimeUnit, UINT8 byPktNum);
#endif /* __SWSECU_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -