diff options
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 7144626ca..a70390d9c 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1198,6 +1198,21 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl ndpi_snprintf(flow->softether.fqdn, sizeof(flow->softether.fqdn), "%s", flow->ndpi_flow->protos.softether.fqdn); } + /* SERVICE_LOCATION */ + else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SERVICE_LOCATION)) { + flow->info_type = INFO_GENERIC; + flow->info[0] = 0; + if (flow->ndpi_flow->protos.slp.url_count > 0) + strncat(flow->info, "URL(s): ", sizeof(flow->info)); + for (size_t i = 0; i < flow->ndpi_flow->protos.slp.url_count; ++i) { + size_t length = strlen(flow->info); + strncat(flow->info + length, flow->ndpi_flow->protos.slp.url[i], + sizeof(flow->info) - length); + length = strlen(flow->info); + if (i < (size_t)flow->ndpi_flow->protos.slp.url_count - 1) + strncat(flow->info + length, ", ", sizeof(flow->info) - length); + } + } /* NATPMP */ else if(is_ndpi_proto(flow, NDPI_PROTOCOL_NATPMP)) { flow->info_type = INFO_NATPMP; |