diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/ndpiReader.c | 3 | ||||
-rw-r--r-- | example/reader_util.c | 1 | ||||
-rw-r--r-- | example/reader_util.h | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index f3daeaad6..be85bf0cc 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1769,6 +1769,9 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa if(flow->http.user_agent[0] != '\0') fprintf(out, "[User-Agent: %s]", flow->http.user_agent); + if(flow->http.filename[0] != '\0') + fprintf(out, "[Filename: %s]", flow->http.filename); + if(flow->risk) { u_int i; u_int16_t cli_score, srv_score; diff --git a/example/reader_util.c b/example/reader_util.c index 906d6dd43..1f53bd3b5 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1382,6 +1382,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl ndpi_snprintf(flow->http.server, sizeof(flow->http.server), "%s", flow->ndpi_flow->http.server ? flow->ndpi_flow->http.server : ""); ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : ""); ndpi_snprintf(flow->http.nat_ip, sizeof(flow->http.nat_ip), "%s", flow->ndpi_flow->http.nat_ip ? flow->ndpi_flow->http.nat_ip : ""); + ndpi_snprintf(flow->http.filename, sizeof(flow->http.filename), "%s", flow->ndpi_flow->http.filename ? flow->ndpi_flow->http.filename : ""); } ndpi_snprintf(flow->http.user_agent, diff --git a/example/reader_util.h b/example/reader_util.h index 6e037b30c..4dabbc88d 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -282,7 +282,7 @@ typedef struct ndpi_flow_info { } ssh_tls; struct { - char url[256], request_content_type[64], content_type[64], user_agent[256], server[128], nat_ip[32]; + char url[256], request_content_type[64], content_type[64], user_agent[256], server[128], nat_ip[32], filename[256]; u_int response_status_code; } http; |