aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 9f355087b..630daa43f 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1810,28 +1810,10 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
flow->detected_protocol.protocol_by_ip));
- if(flow->multimedia_flow_type != ndpi_multimedia_unknown_flow) {
- const char *content;
+ if(flow->multimedia_flow_types != ndpi_multimedia_unknown_flow) {
+ char content[64] = {0};
- switch(flow->multimedia_flow_type) {
- case ndpi_multimedia_audio_flow:
- content = "Audio";
- break;
-
- case ndpi_multimedia_video_flow:
- content = "Video";
- break;
-
- case ndpi_multimedia_screen_sharing_flow:
- content = "Screen Sharing";
- break;
-
- default:
- content = "???";
- break;
- }
-
- fprintf(out, "[Stream Content: %s]", content);
+ fprintf(out, "[Stream Content: %s]", ndpi_multimedia_flowtype2str(content, sizeof(content), flow->multimedia_flow_types));
}
fprintf(out, "[%s]",