diff options
author | Luca Deri <deri@ntop.org> | 2020-01-10 22:21:16 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-01-10 22:21:16 +0100 |
commit | 5571ce114d2837a7a700acd98af3efdf4adbed8e (patch) | |
tree | 096933e4c4fbd5ccd3e4c49a37192f31a1e0c1e8 /example | |
parent | a3e06da2a81ab761a2aaf331c8afe165b3557556 (diff) |
Added flow extra info field
Updated tests/results
Diffstat (limited to 'example')
-rw-r--r-- | example/ndpiReader.c | 1 | ||||
-rw-r--r-- | example/reader_util.c | 3 | ||||
-rw-r--r-- | example/reader_util.h | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index ccd154870..a2d9885bb 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1176,6 +1176,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa if(flow->host_server_name[0] != '\0') fprintf(out, "[Host: %s]", flow->host_server_name); if(flow->info[0] != '\0') fprintf(out, "[%s]", flow->info); + if(flow->flow_extra_info[0] != '\0') fprintf(out, "[%s]", flow->flow_extra_info); if((flow->src2dst_packets+flow->dst2src_packets) > 5) { if(flow->iat_c_to_s && flow->iat_s_to_c) { diff --git a/example/reader_util.c b/example/reader_util.c index b8fce9632..f8dd315d0 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -949,6 +949,9 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s", flow->ndpi_flow->host_server_name); + snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", + flow->ndpi_flow->flow_extra_info); + if(is_ndpi_proto(flow, NDPI_PROTOCOL_DHCP)) { snprintf(flow->dhcp_fingerprint, sizeof(flow->dhcp_fingerprint), "%s", flow->ndpi_flow->protos.dhcp.fingerprint); } else if(is_ndpi_proto(flow, NDPI_PROTOCOL_BITTORRENT)) { diff --git a/example/reader_util.h b/example/reader_util.h index c3d2caa72..c01682b8b 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -189,7 +189,8 @@ typedef struct ndpi_flow_info { *pktlen_c_to_s, *pktlen_s_to_c; char info[160]; - char host_server_name[256]; + char flow_extra_info[16]; + char host_server_name[240]; char bittorent_hash[41]; char dhcp_fingerprint[48]; |