diff options
author | Luca Deri <deri@ntop.org> | 2024-10-18 23:47:34 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-10-18 23:47:34 +0200 |
commit | 0cc84e4fdd3057826355596fc2cc5a6c783048d5 (patch) | |
tree | 4e8959e9dd33136847d7606fffcbbf68f2f9fd58 /example/reader_util.c | |
parent | 819291b7e42afca856ef1a3fa611ddd926da6549 (diff) |
Improved TCP fingepring calculation
Adde basidc OS detection based on TCP fingerprint
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 8f9dae101..ffa724800 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1586,9 +1586,14 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl flow->multimedia_flow_type = flow->ndpi_flow->flow_multimedia_type; - if(flow->ndpi_flow->tcp.fingerprint) - flow->tcp_fingerprint = ndpi_strdup(flow->ndpi_flow->tcp.fingerprint); + if(flow->ndpi_flow->tcp.fingerprint) { + char buf[128]; + snprintf(buf, sizeof(buf), "%s/%s", flow->ndpi_flow->tcp.fingerprint, + ndpi_print_os_hint(flow->ndpi_flow->tcp.os_hint)); + flow->tcp_fingerprint = ndpi_strdup(buf); + } + /* HTTP metadata are "global" not in `flow->ndpi_flow->protos` union; for example, we can have HTTP/BitTorrent and in that case we want to export also HTTP attributes */ if(is_ndpi_proto(flow, NDPI_PROTOCOL_HTTP) |