summaryrefslogtreecommitdiff
path: root/src/ntc_ip_comm.h
diff options
context:
space:
mode:
authoryw <[email protected]>2018-06-25 17:04:17 +0800
committeryw <[email protected]>2018-06-25 17:05:24 +0800
commit86abcd28b2df289eaa0cc6804e1f7262a62b0a1c (patch)
treee39b83879d15bb69238044e794a9565793402dd0 /src/ntc_ip_comm.h
parent3f74d6c81bc33a5ebca68f600b79beb098896883 (diff)
1.UPDATE comm_log_mode
2.using uint64 to store flow traffic count
Diffstat (limited to 'src/ntc_ip_comm.h')
-rw-r--r--src/ntc_ip_comm.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/ntc_ip_comm.h b/src/ntc_ip_comm.h
index 787abd7..f70a31f 100644
--- a/src/ntc_ip_comm.h
+++ b/src/ntc_ip_comm.h
@@ -14,7 +14,7 @@ extern "C"
void * log_handle;
char log_path[1024];
unsigned int log_level;
- unsigned int using_kafka;
+ unsigned int comm_log_mode;
unsigned int indie_kafka;
char kafka_brokelist[1024];
char kafka_handle_provide_path[1024];
@@ -25,6 +25,10 @@ extern "C"
char local_ip_str[128];
char dpkt_label[1024];
int dpkt_project_id;
+
+ int tcp_flow_id;
+ int udp_flow_id;
+
int entry_id;
int service;
unsigned int min_bytes;
@@ -32,6 +36,14 @@ extern "C"
}ntc_ip_comm_global_item;
+ typedef enum
+ {
+ SEND_NONE = 0,
+ SEND_KAFKA = 1,
+ INDIE_KAFKA = 2,
+ SEND_LOG = 4
+ } NTC_COMM_MODE_MASK;
+
typedef enum
{
@@ -61,6 +73,14 @@ extern "C"
unsigned int dpkt_behavior_type;
}dpkt_lable_t;
+ typedef struct _comm_context_t
+ {
+ unsigned long long c2s_pkts;
+ unsigned long long s2c_pkts;
+ unsigned long long c2s_bytes;
+ unsigned long long s2c_bytes;
+ }comm_context_t;
+
#ifdef __cplusplus
}