aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-06-26 12:05:16 +0200
committerGitHub <noreply@github.com>2023-06-26 12:05:16 +0200
commit88425e0199dc85f95b05ffb244c6ecc048dab853 (patch)
treea5fc230cd6d1dbc18563d4e37e4b642565228230 /example
parent3a1600ff26d02a3440186a6e8355521086a7e11f (diff)
Simplify the report of streaming multimedia info (#2026)
The two fields `flow->flow_type` and `flow->protos.rtp.stream_type` are pretty much identical: rename the former in `flow->flow_multimedia_type` and remove the latter.
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c30
-rw-r--r--example/reader_util.c7
-rw-r--r--example/reader_util.h5
3 files changed, 1 insertions, 41 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 4e4b74491..f3daeaad6 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1707,36 +1707,6 @@ 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_screen_share:
- what = "screen_share";
- break;
-
- 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)
diff --git a/example/reader_util.c b/example/reader_util.c
index 712bcf606..906d6dd43 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1273,11 +1273,6 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
ndpi_snprintf(flow->kerberos.username,
sizeof(flow->kerberos.username),
"%s", flow->ndpi_flow->protos.kerberos.username);
- }
- /* RTP */
- else if(is_ndpi_proto(flow, NDPI_PROTOCOL_RTP)) {
- flow->info_type = INFO_RTP;
- flow->rtp.stream_type = flow->ndpi_flow->protos.rtp.stream_type;
/* COLLECTD */
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_COLLECTD)) {
flow->info_type = INFO_GENERIC;
@@ -1372,7 +1367,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
}
}
- flow->multimedia_flow_type = flow->ndpi_flow->flow_type;
+ flow->multimedia_flow_type = flow->ndpi_flow->flow_multimedia_type;
/* HTTP metadata are "global" not in `flow->ndpi_flow->protos` union; for example, we can have
HTTP/BitTorrent and in that case we want to export also HTTP attributes */
diff --git a/example/reader_util.h b/example/reader_util.h
index 3b185d347..6e037b30c 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -166,7 +166,6 @@ enum info_type {
INFO_TIVOCONNECT,
INFO_FTP_IMAP_POP_SMTP,
INFO_NATPMP,
- INFO_RTP
};
// flow tracking
@@ -283,10 +282,6 @@ typedef struct ndpi_flow_info {
} ssh_tls;
struct {
- enum ndpi_rtp_stream_type stream_type;
- } rtp;
-
- struct {
char url[256], request_content_type[64], content_type[64], user_agent[256], server[128], nat_ip[32];
u_int response_status_code;
} http;