iprules.h
来自「JK Proxy Project - Version 0.1 --------」· C头文件 代码 · 共 31 行
H
31 行
#ifndef _IPALLOW_H_
#define _IPALLOW_H_
#include "proxymain.h"
#include <vector>
// rule type: deny or allow
enum IPRULETYPE { IPR_ALLOW, IPR_DENY };
// list of IP rules
typedef std::vector<CHARPTR> IPRULELIST; // list of IPRules
typedef std::vector<CHARPTR>* IPRULELISTPTR; // pointer to list of IPRules
// structure for complete IP ruleset
struct IPRULESET
{
IPRULETYPE basetype; // base type defines if this rule set is based on
// "deny all" or "allow all"
IPRULELISTPTR rulelist; // pointer to rulelist
};
// prototype for function to load IPRULE file
IPRULESET* LoadIPRules(CHARPTR file);
// function for checking a host
bool CheckIP(CHARPTR ip, IPRULESET* rules);
// function for releasing all memory reserved for a IPRULESET struct
void ReleaseIPRules(IPRULESET* rules);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?