diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-11-25 10:12:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 10:12:48 +0100 |
commit | cff8bd1bb2aac9edaa83645e2bfe2d378413ec1d (patch) | |
tree | cd19617a1649e228c45f17a2632f59cfa904585f /src/include | |
parent | 5c4061d0cdaba61681c6ee5b63ce80c331161c6a (diff) |
Update `flow->flow_multimedia_types` to a bitmask (#2625)
In the same flow, we can have multiple multimedia types
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_api.h | 1 | ||||
-rw-r--r-- | src/include/ndpi_private.h | 2 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 10 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 612f66662..f1f016be0 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -1133,6 +1133,7 @@ extern "C" { ndpi_protocol const * const l7_protocol); char* ndpi_ssl_version2str(char *buf, int buf_len, u_int16_t version, u_int8_t *unknown_tls_version); + char *ndpi_multimedia_flowtype2str(char *buf, int buf_len, u_int8_t m_types); char *ndpi_quic_version2str(char *buf, int buf_len, u_int32_t version); int ndpi_netbios_name_interpret(u_char *in, u_int in_len, u_char *out, u_int out_len); void ndpi_patchIPv6Address(char *str); diff --git a/src/include/ndpi_private.h b/src/include/ndpi_private.h index cf557ae34..a8399f65a 100644 --- a/src/include/ndpi_private.h +++ b/src/include/ndpi_private.h @@ -691,7 +691,7 @@ const uint8_t *get_crypto_data(struct ndpi_detection_module_struct *ndpi_struct, int is_valid_rtp_payload_type(uint8_t type); int is_rtp_or_rtcp(struct ndpi_detection_module_struct *ndpi_struct, const u_int8_t *payload, u_int16_t payload_len, u_int16_t *seq); -u_int8_t rtp_get_stream_type(u_int8_t payloadType, ndpi_multimedia_flow_type *s_type, u_int16_t sub_proto); +u_int8_t rtp_get_stream_type(u_int8_t payloadType, u_int8_t *s_type, u_int16_t sub_proto); /* Bittorrent */ u_int64_t make_bittorrent_host_key(struct ndpi_flow_struct *flow, int client, int offset); diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index afc25b30c..6d2373a76 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -72,10 +72,10 @@ typedef enum { } ndpi_log_level_t; typedef enum { - ndpi_multimedia_unknown_flow = 0, - ndpi_multimedia_audio_flow, - ndpi_multimedia_video_flow, - ndpi_multimedia_screen_sharing_flow, + ndpi_multimedia_unknown_flow = 0x00, + ndpi_multimedia_audio_flow = 0x01, + ndpi_multimedia_video_flow = 0x02, + ndpi_multimedia_screen_sharing_flow = 0x04, } ndpi_multimedia_flow_type; typedef enum { @@ -1358,7 +1358,7 @@ struct ndpi_flow_struct { char *username, *password; } http; - ndpi_multimedia_flow_type flow_multimedia_type; + u_int8_t flow_multimedia_types; /* Put outside of the union to avoid issues in case the protocol |