diff options
author | Michael Mann <mmann78@netscape.net> | 2013-10-27 20:38:42 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-10-27 20:38:42 +0000 |
commit | 8c64c5da892b3861260950d8bd34b6c2f9acd2d4 (patch) | |
tree | f5c414e70579768ac7b32e5e4e1ed488aa3e05b1 /ui | |
parent | 63ff652b8e07600ad0c7a350f379cfb9fbbf96ab (diff) | |
download | wireshark-8c64c5da892b3861260950d8bd34b6c2f9acd2d4.tar.gz |
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
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cli/tap-comparestat.c | 2 | ||||
-rw-r--r-- | ui/gtk/compare_stat.c | 2 | ||||
-rw-r--r-- | ui/tap-rtp-common.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 3d454281a3..d374fd8ccd 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -131,7 +131,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const cksum_vec[2].ptr=(const guint8 *)ci->ip_dst.data; cksum_vec[2].ptr=cksum_vec[2].ptr+ci->ip_dst.len; /* dynamic computation */ - cksum_vec[2].len=pinfo->iphdrlen-20; + cksum_vec[2].len=ci->ip_len-20; computed_cksum=in_cksum(&cksum_vec[0], 3); /* collect all packet infos */ diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c index 2491264fcf..23b68de358 100644 --- a/ui/gtk/compare_stat.c +++ b/ui/gtk/compare_stat.c @@ -206,7 +206,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const cksum_vec[2].ptr=(guint8 *)ci->ip_dst.data; cksum_vec[2].ptr=cksum_vec[2].ptr+ci->ip_dst.len; /* dynamic computation */ - cksum_vec[2].len=pinfo->iphdrlen-20; + cksum_vec[2].len=ci->ip_len-20; computed_cksum=in_cksum(&cksum_vec[0], 3); /* Set up the new order to create the zebra effect */ 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; |