summaryrefslogtreecommitdiff
path: root/src/inc/ip_jt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/ip_jt.h')
-rw-r--r--src/inc/ip_jt.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/inc/ip_jt.h b/src/inc/ip_jt.h
new file mode 100644
index 0000000..609efe0
--- /dev/null
+++ b/src/inc/ip_jt.h
@@ -0,0 +1,60 @@
+/*
+ * ip_control.h
+ *
+ * Created on: 2015年5月26日
+ * Author: byte
+ */
+
+#ifndef IP_CONTROL_H_
+#define IP_CONTROL_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define IPC_WHITE_IP_TYPE 1
+#define IPC_BLACK_IP_TYPE 2
+
+typedef struct black_ip_t{
+ int thread_num;//线程号 仅DNS使用
+ int ip_type;//IP地址类型 IPC_WHITE_IP_TYPE/IPC_BLACK_IP_TYPE 仅DNS使用
+ int ip_num;//黑IP个数
+ unsigned int ipv4[MAX_IP_NUM];//解析出的IP地址 仅DNS使用
+}black_ip;
+
+typedef struct target_tag_t
+{
+ int type;//业务类型
+ int rule_id;//规则ID
+ short risk;//告警级别
+ char id[22];//唯一日志ID
+ void *dns_ip;//仅DNS使用
+}target_tag;
+
+
+/*
+* name:make_ip_control_wblist
+* functionality:add white or black list
+* param:
+* [IN]:
+* stream:stream info
+* thread_num:the thread num
+* rule_id:Maat result config_id
+* risk:alarm risk
+* type:IPC_WHITE_IP_TYPE or IPC_BLACK_IP_TYPE
+* [OUT]: none
+* returns:
+* >0,success;
+* <=0, there is error
+* */
+//wblist:white black list
+//int make_ip_control_wblist(struct streaminfo* stream,int thread_num,int rule_id,int risk,int type);
+int make_ip_control_wblist(black_ip* dns_black_ip,int rule_id,int risk);
+
+int ip_control_send_pkt(struct streaminfo *stream,target_tag *flow_tag,const void *raw_pkt,int thread_seq);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IP_CONTROL_H_ */