diff options
author | Luca Deri <deri@ntop.org> | 2022-12-09 14:26:53 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2022-12-09 14:26:53 +0100 |
commit | fc7b070030cc33029fc16a71ecd6bbe140bd105c (patch) | |
tree | 74b6cc36a68b8428b3eba724fc1d0d7a0cc99cfc /example/ndpiReader.c | |
parent | 63f349319f00abd29af03ebefc969caf17fa65e9 (diff) |
Added RTP stream type in flow metadata
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 326197ee3..b384e4b5a 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1527,6 +1527,32 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa } } break; + + case INFO_RTP: + if(flow->rtp.stream_type != rtp_unknown) { + const char *what; + + switch(flow->rtp.stream_type) { + case rtp_audio: + what = "audio"; + break; + + case rtp_video: + what = "video"; + break; + + case rtp_audio_video: + what = "audio/video"; + break; + + default: + what = NULL; + break; + } + + if(what) + fprintf(out, "[RTP Stream Type: %s]", what); + } } if(flow->ssh_tls.advertised_alpns) |