27 lines
980 B
Diff
27 lines
980 B
Diff
|
From 5f286a17c1ecb88b06ee069650fa73f7565165dc Mon Sep 17 00:00:00 2001
|
||
|
From: Luca Deri <deri@ntop.org>
|
||
|
Date: Sat, 7 Aug 2021 17:35:34 +0200
|
||
|
Subject: [PATCH 2/3] Report whether a protocol is encrypted
|
||
|
|
||
|
---
|
||
|
example/ndpiReader.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
|
||
|
index b4434650..053dc2ec 100644
|
||
|
--- a/example/ndpiReader.c
|
||
|
+++ b/example/ndpiReader.c
|
||
|
@@ -1368,6 +1368,9 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||
|
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||
|
flow->detected_protocol, buf1, sizeof(buf1)));
|
||
|
|
||
|
+ fprintf(out, "[%s]",
|
||
|
+ ndpi_is_encrypted_proto(ndpi_thread_info[thread_id].workflow->ndpi_struct, flow->detected_protocol) ? "Encrypted" : "ClearText");
|
||
|
+
|
||
|
if(flow->detected_protocol.category != 0)
|
||
|
fprintf(out, "[cat: %s/%u]",
|
||
|
ndpi_category_get_name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||
|
--
|
||
|
2.32.0
|
||
|
|