Ethereal-users: Re: [Ethereal-users] Bug in tethereal - delta time.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Mark Atwood <mra@xxxxxxxxx>
Date: 31 Oct 2000 11:08:14 -0800
"Jesus M. Salvo Jr." <jsalvo@xxxxxxxxxxxxxxxxx> writes:
> 
> 1) Get the sample capture file named teardrop.cap from www.ethereal.com.
> 2) Load the teardrop.cat using ethereal. Notice that the delta time on
> packets 10 and 11 are 4.67 and 0.99 seconds.
> 3) Run '/usr/sbin/tethereal -r teardrop.cap -V', and look at the delta
> time on packets 10 and 11. Its off by +1 seconds.

I havnt looked at your specific problem, but I hit something similar
in the dissector I am working on. I've got two «struct timval» fields
that I display and then display the difference between.

It just so happens that <sys/time.h> contains a macro, «timersub» that
is *supposed* to compute the difference between two «struct timval»s.
Well, sometimes it doesn't work, and adds an extra second. It's on my
todo list to dive in and find out why, and/or replace it, or fix it
and send a patch back for GNU libc.

-- 
Mark Atwood   | The summit of Mount Everest is marine limestone.
mra@xxxxxxxxx | 
http://www.pobox.com/~mra