Wireshark-bugs: [Wireshark-bugs] [Bug 8066] tshark -z io, stat reports bad byte counts if filter

Date: Mon, 10 Dec 2012 15:11:49 +0000

Comment # 4 on bug 8066 from
(In reply to comment #3)
> One of either two problems:

1. Number of rows displayed is miscalculated. 
> ui\cli\tap-iostat.c (~line 927 in SVN) shows:

num_rows =
> (int)(duration/interval) + (((duration%interval+500000)/1000000) > 0 ? 1 :
> 0);

I don't think the remainder/roundup calculation is correct.  For this
> particular test case (with filters used in comment #0), it incorrectly
> rounds up.


While I still don't like this roundup calculation
((durartion+(interval-1)/interval would be simpler), I see the need for the
calculating "fractions of a second (interval) in the last second (interval)"
which wasn't obvious when I first started looking at the output.

#2 mentioned in comment #3 seems like a stronger fix, but if all platforms
can't support a dummy argument, I'm not sure how to determine if
CALC_TYPE_FRAMES_AND_BYTES format is really the "last" format being used in the
output.  Normally it's keyed off of an "item", but in this case we don't have
one.


You are receiving this mail because:
  • You are watching all bug changes.