📄 authconfig.h
字号:
#ifndef AUTHCONFIG_H
#define AUTHCONFIG_H
#include <tmsTypes.h>
#include <idbLib.h>
#include <vmitbl.h>
#define ROW_STATUS_ACTIVE 1
#define ROW_STATUS_NOTREADY 3
#define ROW_STATUS_DESTORY 6
#define MAX_MAIN_TEMPLETE_NUM 33
#define MAX_RADIUS_TEMPLETE_NUM 33
#define MAX_AUTH_TEMPLETE_NUM 33
#define MAX_WEB_TEMPLETE_NUM 33
#define MAX_DOT1X_TEMPLETE_NUM 33
#define MAX_PPPOE_TEMPLETE_NUM 33
#define MAX_USER_MAN_TEMPLETE_NUM 33
#define MAX_MESSAGE_TEMPLETE_NUM 33
#define MAX_BLK_POLCY_NUM 33
#define LocalAuthenticate 1
#define RadiusAuthenticate 2
#define Auth_Style_Default 1
#define Auth_Style_WEB 2
#define Auth_Style_Dot1x 3
#define Auth_Style_PPPoE 4
#define FAIL_BY_USER 1
#define FAIL_BY_REJECT 2
#define FAIL_BY_PROXY 3
#define FAIL_BY_TIMEOUT 4
#define MSG_TYPE_MESSAG 1
#define MSG_TYPE_ADVERT 2
typedef struct MainTemplete_s
{
u_char AuthLocation; /* LocalAuthenticate, RadiusAuthenticate */
u_char PrimaryRadiusTempleteIndex;
u_char SecondaryRadiusTempleteIndex;
u_char AuthMainTempleteIndex;
u_char UserManageTempleteIndex;
u_long RowStatus;
u_char Describe[255];
} MainTemplete_t;
typedef struct RadiusTemplete_s
{
u_long ServerIP;
u_short AuthPort; /* default = 1812 */
u_short AcctPort; /* default = 1813 */
u_char Secret[65];
u_long MaxDeadTimes; /* default = 10 */
u_char SendUpdate; /* default = Disabled */
u_long SendUpdatePriod; /* default = 10mins */
u_long ReTransPriod; /* default = 30s */
u_char ReTransTimes; /* default = 3 */
u_char ServerName[33];
u_char Describtion[65];
u_long RowStatus;
} RadiusTemplete_t;
typedef struct AuthMainTemplete_s
{
u_char FirstAuthStyle; /* Default, WEB, 802.1x, PPPoE */
u_char SecondAuthStyle; /* WEB, 802.1x, PPPoE */
u_char AuthWEBTempleteIndex;
u_char AuthDot1xTempleteIndex;
u_char AuthPPPoETempleteIndex;
u_long RowStatus;
u_char Describe[125];
} AuthMainTemplete_t;
typedef struct AuthDot1xTemplete_s
{
u_char AuthStyle;
u_long ReTransPriod;
u_char ReTransTimes;
u_long ReAuthPriod;
u_long ReAuthReTransPriod;
u_char ReAuthReTransTimes;
u_char ReAuthStyle;
u_char ReAuthEn;
u_long HoldPriod;
u_long RowStatus;
u_char Describe[125];
} AuthDot1xTemplete_t;
typedef struct AuthWebTemplete_s
{
u_char WebSecret[65];
u_char Describe[255];
u_long RowStatus;
u_short Port;
} AuthWebTemplete_t;
typedef struct UserManageTemplete_s
{
u_char AntiProxy; /* default = Disabled */
u_char CheckClientVersion; /* default = Disabled */
u_char CheckFactroy; /* default = Disabled */
u_char SendLeftUp; /* default = Disabled */
u_char SendLeftDown; /* default = Disabled */
u_char SendMessage; /* default = Disabled */
u_char MessagePolicyIndex;
u_char RecBlackList; /* default = Disabled*/
u_char BlackListPolicyIndex;
u_char ProtectTimer; /* default = Disabled */
u_long ProtectPriod; /* default = 24hours */
u_char AddDomainEn; /* default = Disabled */
u_char AddDomain[9];
u_char SendTrap;
u_long PortType;
u_long RowStatus;
u_char Describe[125];
} UserManageTemplete_t;
typedef struct MessageAdvert_s
{
u_char MsgType;
u_char userName[33];
u_char MsgDomain[9];
u_char MsgContant[256];
u_long RowStatus;
} MessageAdvert_t;
typedef struct BlackPolicy_s
{
u_short Event; /* password error, proxy */
u_short Times;
u_char Describe[64];
u_short Status;
} BlackPolicy_t;
typedef struct Temp2Vlan_s
{
struct Temp2Vlan_s *next;
struct Temp2Vlan_s *prev;
u_char TempleteIndex;
u_char VlanList[512];
} Temp2Vlan_t;
#define MAX_ROW_IN_MSG_TBL 1
#define MAX_ROW_IN_ADVERT_TBL 1
#define MAX_ROW_IN_FROZE_TBL 100
#define MAX_ROW_IN_SHUT_TBL 1
#define MAX_ROW_IN_BLK_TBL 100
typedef struct Mesage_Table_s {
u_char userMAC[7];
u_char userDomain[9];
u_char userName[33];
u_char Message[255];
u_long userIP;
u_short userVlan;
u_short userPort;
u_short event;
u_short action;
u_long period;
u_long RowStatus;
} Mesage_Table_t;
typedef struct Advert_Table_s {
u_char userMAC[7];
u_char userDomain[9];
u_char userName[33];
u_char AdvertPrimary[256];
u_char AdvertSlave[256];
u_long userIP;
u_short userVlan;
u_short userPort;
u_short event;
u_short action;
u_long period;
u_long RowStatus;
} Advert_Table_t;
typedef struct FrozenUser_Table_s {
u_char userDomain[9];
u_char userName[33];
u_char userMac[7];
u_short userVlan;
u_short userPort;
u_short RowStatus;
}FrozenUser_Table_t;
typedef struct Shutdown_Table_s {
u_char userMac[7];
u_char UserName[33];
u_char UserDomain[9];
u_long UserIp;
u_short UserVlan;
u_short UserPort;
u_long RowStatus;
}Shutdown_Table_t;
typedef struct Abnormal_Table_s {
u_char userMAC[7];
u_short userReason; /* Fail_By_Reject, Fail_By_Proxy */
u_long times;
}Abnormal_Table_t;
typedef struct Black_Table_s {
u_char userMAC[7];
u_char userDomain[9];
u_char userName[33];
u_short userVlan;
u_short userPort;
u_short userReason;
u_long RowStatus;
}Black_Table_t;
#define MAX_LOCAL_USER_NUM 32
typedef struct LocalUserEntry_s {
u_char userName[33];
u_char password[33];
u_long RowStatus;
}LocalUserEntry_t;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -