删除一些多余配置, 修复一些小bug

This commit is contained in:
崔一鸣
2019-11-20 16:05:40 +08:00
parent 3b81b3f083
commit 72e38dcdab
7 changed files with 40 additions and 307 deletions

View File

@@ -2,13 +2,27 @@
#define __TSG_RULE_H__
#include <MESA/Maat_rule.h>
#include "tsg_types.h"
#ifdef __cplusplus
extern "C"
typedef enum _tsg_protocol
{
#endif
PROTO_UNKONWN=0,
PROTO_IPv4=1,
PROTO_IPv6,
PROTO_TCP,
PROTO_UDP,
PROTO_HTTP,
PROTO_MAIL,
PROTO_DNS,
PROTO_FTP,
PROTO_SSL,
PROTO_SIP,
PROTO_BGP,
PROTO_STREAMING_MEDIA,
PROTO_MAX
}tsg_protocol_t;
#define MAX_RESULT_NUM 8
#define MAX_DOAMIN_LEN 2048
struct _identify_info
@@ -24,9 +38,11 @@ typedef enum _PULL_RESULT_TYPE
PULL_FW_RESULT
}PULL_RESULT_TYPE;
#define TSG_DOMAIN_MAX 256
extern Maat_feather_t g_tsg_maat_feather;
int tsg_rule_init(const char *conffile);
int tsg_rule_init(const char *conffile, void *logger);
int tsg_scan_nesting_addr(Maat_feather_t maat_feather, const struct streaminfo *a_stream, tsg_protocol_t proto, scan_status_t *mid, Maat_rule_t*result, int result_num);
@@ -39,8 +55,7 @@ int tsg_shared_table_init(const char *conffile, Maat_feather_t maat_feather, voi
//return value: -1: failed, 0: not hit, >0: hit count
int tsg_scan_shared_policy(Maat_feather_t maat_feather, void *pkt, int pkt_len, Maat_rule_t *result, int result_num, struct _identify_info *identify_info, scan_status_t *mid, void *logger, int thread_seq);
#ifdef __cplusplus
}
#endif
//return NULL if none exists, otherwise return one deny rule;
Maat_rule_t *tsg_fetch_deny_rule(Maat_rule_t *result, int result_num);
#endif