From b715467da621b0bb901160a14a01250e54e0b1f9 Mon Sep 17 00:00:00 2001
From: Luca Deri <deri@ntop.org>
Date: Wed, 24 Jul 2019 00:25:00 +0200
Subject: Added -e option to ndpiReader for searchign human readeable strings
 lenght Default human readeable strings lenght is not 5 chars (used to be 8)

---
 example/reader_util.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'example/reader_util.c')

diff --git a/example/reader_util.c b/example/reader_util.c
index 9b03d1278..d0ec31930 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -75,7 +75,7 @@
 #include "reader_util.h"
 
 extern u_int8_t enable_protocol_guess;
-extern u_int8_t verbose;
+extern u_int8_t verbose, human_readeable_string_len;
 
 /* ***************************************************** */
 
@@ -668,7 +668,8 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
       if(!skip) {
 	char outbuf[64] = { '\0' };
 	
-	if(ndpi_has_human_readeable_string(workflow->ndpi_struct, (char*)packet, header->caplen, 8,
+	if(ndpi_has_human_readeable_string(workflow->ndpi_struct, (char*)packet, header->caplen,
+					   human_readeable_string_len,
 					   flow->human_readeable_string_buffer,
 					   sizeof(flow->human_readeable_string_buffer)) == 1)
 	  flow->has_human_readeable_strings = 1;
-- 
cgit v1.2.3