diff options
-rw-r--r-- | configure.seed | 22 | ||||
-rw-r--r-- | example/Makefile.in | 9 | ||||
-rw-r--r-- | example/reader_util.h | 2 | ||||
-rw-r--r-- | src/lib/protocols/tls.c | 4 |
4 files changed, 9 insertions, 28 deletions
diff --git a/configure.seed b/configure.seed index c1bbf1593..326242cd2 100644 --- a/configure.seed +++ b/configure.seed @@ -123,28 +123,6 @@ case "$host" in ;; esac -dnl> https://github.com/json-c/json-c -AC_ARG_ENABLE([json-c], - AS_HELP_STRING([--disable-json-c], [Disable json-c support])) - -AS_IF([test "x$enable_json_c" != "xno"], [ - PKG_CHECK_MODULES([JSONC],[json-c], - [ - CFLAGS="$CFLAGS $JSONC_CFLAGS" - LDFLAGS="$LDFLAGS $JSONC_LIBS" - AC_CHECK_LIB(json-c, json_object_new_object, AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present])) - ], - [ - JSONC_HOME="$HOME/json-c" - if test -d "$JSONC_HOME"; then : - CFLAGS="$CFLAGS -I $JSONC_HOME" - LDFLAGS="$LDFLAGS $JSONC_HOME/.libs/libjson-c.a" - AC_MSG_RESULT([Found json-c in $JSONC_HOME]) - AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present]) - fi - ]) - ]) - AC_ARG_ENABLE([debug-messages], AS_HELP_STRING([--enable-debug-messages], [Define NDPI_ENABLE_DEBUG_MESSAGES=1]), [ AC_DEFINE(NDPI_ENABLE_DEBUG_MESSAGES, 1, [Enable ndpi_debug_messages]) ]) diff --git a/example/Makefile.in b/example/Makefile.in index 225e5681c..486087521 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -1,8 +1,11 @@ CC=@CC@ CXX=@CXX@ -CFLAGS=-g -I../src/include @CFLAGS@ -LIBNDPI=../src/lib/libndpi.a +SRCHOME=../src +CFLAGS=-g -I$(SRCHOME)/include @CFLAGS@ +LIBNDPI=$(SRCHOME)/lib/libndpi.a LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread -lm @LDFLAGS@ +HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \ + $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h OBJS=ndpiReader.o reader_util.o intrusion_detection.o PREFIX?=@prefix@ @@ -27,7 +30,7 @@ dpdk: make -f Makefile.dpdk check: - cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I../src/include *.c + cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I$(SRCHOME)/include *.c clean: /bin/rm -f *.o ndpiReader ndpiReader.dpdk diff --git a/example/reader_util.h b/example/reader_util.h index 55c260a54..c3d2caa72 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -188,7 +188,7 @@ typedef struct ndpi_flow_info { struct ndpi_analyze_struct *iat_c_to_s, *iat_s_to_c, *iat_flow, *pktlen_c_to_s, *pktlen_s_to_c; - char info[96]; + char info[160]; char host_server_name[256]; char bittorent_hash[41]; char dhcp_fingerprint[48]; diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 737585db4..e87262e87 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -625,7 +625,7 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct, static int ndpi_search_tls_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; - u_int8_t handshake_type; + // u_int8_t handshake_type; u_int32_t handshake_len; u_int16_t p_len; const u_int8_t *p; @@ -651,7 +651,7 @@ static int ndpi_search_tls_udp(struct ndpi_detection_module_struct *ndpi_struct, return(0); /* Giveup */ } - handshake_type = packet->payload[13]; + // handshake_type = packet->payload[13]; handshake_len = (packet->payload[14] << 16) + (packet->payload[15] << 8) + packet->payload[16]; if((handshake_len+25) != packet->payload_packet_len) |