diff options
| -rw-r--r-- | src/Makefile | 2 | ||||
| -rw-r--r-- | src/ntc_ssl_collect.c | 5 | ||||
| -rw-r--r-- | src/ntc_ssl_collect.h | 18 |
3 files changed, 20 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile index 9159f50..a7b8dfd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,7 @@ CPPFLAGS=$(CFLAGS) LIB+=-lMESA_handle_logger LIB+=-lMESA_prof_load LIB+=-lrdkafka -LIB+=-lcJSON +LIB+=-lcjson LIB+=-ldl SOURCES=$(wildcard *.c) diff --git a/src/ntc_ssl_collect.c b/src/ntc_ssl_collect.c index d0d3e80..d1e994e 100644 --- a/src/ntc_ssl_collect.c +++ b/src/ntc_ssl_collect.c @@ -25,7 +25,7 @@ #include <cJSON.h> #define PLUGIN_NAME "NTC_SSL_COLLECT" -#define PROFILE_PATH "./t1conf/ssl_collect.conf" +#define PROFILE_PATH "./t1conf/main.conf" #define NTC_SSL_COLLECT_TOPIC "ntc_ssl_collect_log" extern long long g_CurrentTime; @@ -185,7 +185,8 @@ void ntc_ssl_collect_send_kafka_log(rd_kafka_topic_t *topic, struct streaminfo * cJSON_AddNumberToObject(log_obj, "lastmtime", a_stream->ptcpdetail->lastmtime); - char *payload = cJSON_Print(log_obj); + //char *payload = cJSON_Print(log_obj); + char *payload = cJSON_PrintUnformatted(log_obj); int paylen = strlen(payload); rd_kafka_produce(g_ntc_kafka_topic, RD_KAFKA_PARTITION_UA, RD_KAFKA_MSG_F_COPY, payload, paylen, NULL, 0, NULL); diff --git a/src/ntc_ssl_collect.h b/src/ntc_ssl_collect.h index 8b02d28..9b3c9b7 100644 --- a/src/ntc_ssl_collect.h +++ b/src/ntc_ssl_collect.h @@ -8,7 +8,7 @@ extern "C" #endif #include "stream.h" -#include "soq/identify_v2.h" +//#include "soq/identify_v2.h" typedef struct ntc_ssl_collect_global_item { @@ -51,7 +51,21 @@ typedef struct _dpkt_lable_t }dpkt_lable_t; */ -typedef stDntyProInfoV2 dpkt_lable_t; +//typedef stDntyProInfoV2 dpkt_lable_t; +typedef struct _dpkt_lable_t +{ + unsigned char trans_proto; + unsigned char v6; + unsigned short _pad0; + // uint16_t dpkt_app_ser_type; + // uint16_t dpkt_proto_ser_type; + unsigned int dpkt_proto_type; + unsigned int dpkt_app_type; + unsigned int dpkt_op_type; + unsigned int dpkt_browser_type; + unsigned int dpkt_web_type; + unsigned int dpkt_behavior_type; +}dpkt_lable_t; typedef struct _comm_context_t |
