aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtcp.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2007-05-29 14:37:34 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2007-05-29 14:37:34 +0000
commit8e9896707546da8492e7cad55a39ae16a0835dde (patch)
treef01dab10240065e7e298b5cc8cb828cdcb81fede /epan/dissectors/packet-rtcp.c
parent41ac0624795df179822d41b775d6f5b4c60cfd11 (diff)
When reporting roundtrip delay, show delay since timestamp of LSR frame.
svn path=/trunk/; revision=21985
Diffstat (limited to 'epan/dissectors/packet-rtcp.c')
-rw-r--r--epan/dissectors/packet-rtcp.c45
1 files changed, 35 insertions, 10 deletions
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index e74bfe1704..18e44cffac 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -412,6 +412,7 @@ static int hf_rtcp_setup_method = -1;
/* RTCP roundtrip delay fields */
static int hf_rtcp_last_sr_timestamp_frame = -1;
+static int hf_rtcp_time_since_last_sr = -1;
static int hf_rtcp_roundtrip_delay = -1;
@@ -457,7 +458,9 @@ static void remember_outgoing_sr(packet_info *pinfo, long lsr);
static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, guint32 lsr, guint32 dlsr);
static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, guint frame, gint delay);
+ proto_tree *tree,
+ guint frame,
+ guint gap_between_reports, gint delay);
/* Set up an RTCP conversation using the info given */
@@ -928,16 +931,14 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
/* Display name */
item_len = tvb_get_guint8( tvb, offset );
- if (item_len != 0) {
- /* Item len of 1 because its an FT_UINT_STRING... */
- proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_disp_name,
- tvb, offset, 1, FALSE);
- }
+ /* Item len of 1 because its an FT_UINT_STRING... */
+ proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_disp_name,
+ tvb, offset, 1, FALSE);
offset++;
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " DISPLAY-NAME=\"%s\"",
- tvb_get_ephemeral_string(tvb, offset, item_len));
+ tvb_get_ephemeral_string(tvb, offset, item_len));
}
offset += item_len;
@@ -2113,6 +2114,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
/* Show info. */
add_roundtrip_delay_info(tvb, pinfo, tree,
p_packet_data->calculated_delay_used_frame,
+ p_packet_data->calculated_delay_report_gap,
p_packet_data->calculated_delay);
return;
}
@@ -2185,19 +2187,24 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
if (dlsr)
{
p_packet_data->calculated_delay = delay;
+ p_packet_data->calculated_delay_report_gap = total_gap;
p_packet_data->calculated_delay_used_frame = p_conv_data->last_received_frame_number;
}
/* Show info. */
- add_roundtrip_delay_info(tvb, pinfo, tree, p_conv_data->last_received_frame_number, delay);
+ add_roundtrip_delay_info(tvb, pinfo, tree,
+ p_conv_data->last_received_frame_number,
+ total_gap,
+ delay);
}
}
}
/* Show the calcaulted roundtrip delay info by adding protocol tree items
and appending text to the info column */
-static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, guint frame, gint delay)
+static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+ guint frame, guint gap_between_reports,
+ gint delay)
{
/* 'Last SR' frame used in calculation. Show this even if no delay shown */
proto_item* item = proto_tree_add_uint(tree,
@@ -2205,6 +2212,12 @@ static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo,
tvb, 0, 0, frame);
PROTO_ITEM_SET_GENERATED(item);
+ /* Time elapsed since 'Last SR' time in capture */
+ item = proto_tree_add_uint(tree,
+ hf_rtcp_time_since_last_sr,
+ tvb, 0, 0, gap_between_reports);
+ PROTO_ITEM_SET_GENERATED(item);
+
/* Don't report on calculated delays below the threshold.
Will report delays less than -threshold, to highlight
problems with generated reports */
@@ -3337,6 +3350,18 @@ proto_register_rtcp(void)
}
},
{
+ &hf_rtcp_time_since_last_sr,
+ {
+ "Time since Last SR captured",
+ "rtcp.lsr-frame-captured",
+ FT_UINT32,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ "Time since frame matching LSR field was captured", HFILL
+ }
+ },
+ {
&hf_rtcp_roundtrip_delay,
{
"Roundtrip Delay(ms)",