Ethereal-dev: Re: [Ethereal-dev] WTAP_ENCAP_PER_PACKET for PCAP files?

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

From: Jesper Peterson <jesper@xxxxxxxxxx>
Date: Thu, 30 Oct 2003 12:17:58 +1300
Guy Harris wrote:

On Oct 29, 2003, at 1:25 PM, Jesper Peterson wrote:

Change the timestamp from timeval to timespec and you have covered everything I need (which is of course all that matters).

[...], or make the time stamp resolution a per-interface property (per-interface in case, for example, you merge two capture files, with different time stamps, into one file), which saves a little CPU time when writing the capture, *and* lets software reading the file know that you don't get nanosecond resolution

I suppose systems with faster clocks are most likely to run at some funky frequency and nano/pico would have to be computed in any case. Any solution that allows for extra resolution would basically be ok. A resonable compromise may be to switch between micro/nano in the interface header and put any extra bits in TLV fields. The most common cases will then have a fixed sized 32-bit timestamp to work with.

--
Jesper Peterson, Senior Software Developer
http://www.endace.com, +64 7 839 0540