From 9939b5c30775993941a4b9afe01ddc36434afbf1 Mon Sep 17 00:00:00 2001 From: lns Date: Fri, 5 Aug 2022 21:26:54 +0200 Subject: Add TiVoConnect dissector. Fixes #1697. * added static assert if supported, to complain if the flow struct changes Signed-off-by: lns --- example/ndpiReader.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index b197ec8e6..0ef7cd9eb 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -523,6 +523,11 @@ static void help(u_int long_help) { #endif if(long_help) { + printf("\n\nSize of nDPI Flow structure: %u\n" + "Sizeof of nDPI Flow protocol union: %zu\n", + ndpi_detection_get_sizeof_ndpi_flow_struct(), + sizeof(((struct ndpi_flow_struct *)0)->protos)); + NDPI_PROTOCOL_BITMASK all; ndpi_info_mod = ndpi_init_detection_module(ndpi_no_prefs); @@ -1484,6 +1489,25 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa } break; + case INFO_TIVOCONNECT: + if (flow->tivoconnect.identity_uuid[0] != '\0') + { + fprintf(out, "[UUID: %s]", flow->tivoconnect.identity_uuid); + } + if (flow->tivoconnect.machine[0] != '\0') + { + fprintf(out, "[Machine: %s]", flow->tivoconnect.machine); + } + if (flow->tivoconnect.platform[0] != '\0') + { + fprintf(out, "[Platform: %s]", flow->tivoconnect.platform); + } + if (flow->tivoconnect.services[0] != '\0') + { + fprintf(out, "[Services: %s]", flow->tivoconnect.services); + } + break; + case INFO_FTP_IMAP_POP_SMTP: if (flow->ftp_imap_pop_smtp.username[0] != '\0') { -- cgit v1.2.3