From 8c64c5da892b3861260950d8bd34b6c2f9acd2d4 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 27 Oct 2013 20:38:42 +0000 Subject: Remove iplen and iphdrlen from struct _packet_info. Dissectors should just use (reported) tvb length and taps have other ways to get the data. svn path=/trunk/; revision=52899 --- ui/tap-rtp-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/tap-rtp-common.c') diff --git a/ui/tap-rtp-common.c b/ui/tap-rtp-common.c index 2a474b0670..6785e5fd1d 100644 --- a/ui/tap-rtp-common.c +++ b/ui/tap-rtp-common.c @@ -651,8 +651,8 @@ int rtp_packet_analyse(tap_rtp_stat_t *statinfo, statinfo->sumtTS += 1.0 * current_time * nominaltime; } - /* Calculate the BW in Kbps adding the IP+UDP header to the RTP -> IP header+8bytes(UDP) */ - statinfo->bw_history[statinfo->bw_index].bytes = rtpinfo->info_data_len + pinfo->iphdrlen + 8; + /* Calculate the BW in Kbps adding the IP+UDP header to the RTP -> 20bytes(IP) + 8bytes(UDP) */ + statinfo->bw_history[statinfo->bw_index].bytes = rtpinfo->info_data_len + 28; statinfo->bw_history[statinfo->bw_index].time = current_time; /* Check if there are more than 1sec in the history buffer to calculate BW in bps. If so, remove those for the calculation */ @@ -662,7 +662,7 @@ int rtp_packet_analyse(tap_rtp_stat_t *statinfo, if (statinfo->bw_start_index == BUFF_BW) statinfo->bw_start_index=0; }; /* IP hdr + UDP + RTP */ - statinfo->total_bytes += rtpinfo->info_data_len + pinfo->iphdrlen + 8; + statinfo->total_bytes += rtpinfo->info_data_len + 28; statinfo->bandwidth = (double)(statinfo->total_bytes*8)/1000; statinfo->bw_index++; if (statinfo->bw_index == BUFF_BW) statinfo->bw_index = 0; -- cgit v1.2.1