diff options
author | Luca Deri <deri@ntop.org> | 2021-08-07 17:35:34 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-08-07 17:35:34 +0200 |
commit | a13f1fe52f9504a2121d60f16b8f0495eb5a9152 (patch) | |
tree | 8b0fa121e8b9dd63da3beb46f27246ba0e87a2c3 /example | |
parent | 46ebd7128fd38f3eac5289ba281f3f25bad1d899 (diff) |
Report whether a protocol is encrypted
Diffstat (limited to 'example')
-rw-r--r-- | example/ndpiReader.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index b44346506..053dc2ec5 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, |