diff options
author | Jiri Novak <j.novak@netsystem.cz> | 2018-06-20 15:59:33 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-06-21 13:34:09 +0000 |
commit | d752f518cd810d58e886ded6edca89aa1b530451 (patch) | |
tree | 0b517a4f4abfba621ce736feb11af0449f0a3e24 /ui/tap-rtp-common.h | |
parent | 5f45709d95321a4d469579fc59752e7b81ec63cf (diff) |
RTP: Stats calculation unification
Changes:
- rtpstream_info_calc_t created
- rtpstream_info_calculate and rtpstream_info_calc_free functions created
- RTP code updated to use such functions
Change-Id: I1053a46cbd0cdef9d70382135da46e732b5af8b8
Reviewed-on: https://code.wireshark.org/review/28361
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/tap-rtp-common.h')
-rw-r--r-- | ui/tap-rtp-common.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/tap-rtp-common.h b/ui/tap-rtp-common.h index 28db22476b..1ee3dbe38a 100644 --- a/ui/tap-rtp-common.h +++ b/ui/tap-rtp-common.h @@ -43,6 +43,33 @@ typedef struct _tap_rtp_save_info_t { gboolean saved; } tap_rtp_save_info_t; +typedef struct _rtp_stream_info_calc { + gchar *src_addr_str; + guint16 src_port; + gchar *dst_addr_str; + guint16 dst_port; + guint32 ssrc; + gchar *payload_str; /* Name of coded derived from fixed or dynamic codec names */ + guint32 packet_count; + guint32 total_nr; + guint32 packet_expected; /* Count of expected packets, derived from lenght of RTP stream */ + gint32 lost_num; + double lost_perc; + double max_delta; + double max_jitter; + double max_skew; + double mean_jitter; + gboolean problem; /* Indication that RTP stream contains something unusual -GUI should indicate it somehow */ + double clock_drift_ms; + double freq_drift_hz; + double freq_drift_perc; + double duration_ms; + guint32 sequence_err; + double start_time_ms; /**< Unit is ms */ + guint32 first_packet_num; + guint32 last_packet_num; +} rtpstream_info_calc_t; + /** * Compares two RTP stream infos (GCompareFunc style comparison function) * @@ -61,6 +88,16 @@ void rtpstream_reset_cb(void*); void rtp_write_header(rtpstream_info_t*, FILE*); int rtpstream_packet_cb(void*, packet_info*, epan_dissect_t *, const void *); +/** + * Evaluate rtp_stream_info_t calculations + */ +void rtpstream_info_calculate(const rtpstream_info_t *strinfo, rtpstream_info_calc_t *calc); + +/** + * Free rtpstream_info_calc_t structure (internal items) + */ +void rtpstream_info_calc_free(rtpstream_info_calc_t *calc); + #ifdef __cplusplus } #endif /* __cplusplus */ |