[ntar-workers] Timestamp resolution: if_tsaccur option unclear!

Loris Degioanni loris.degioanni at gmail.com
Wed Aug 24 04:49:45 GMT 2005



Ulf Lamping wrote:
> Hi List!
> 
> I'm currently looking for a way to bring nanosecond timestamp resolution to Ethereal. Unfortunately this is urgent, so I cannot wait until the NTAR lib is integrated into Ethereal. To achieve this goal I'm planning to use a new libpcap DLT_ value and simply put nanosecond resolution into the microsecond timestamp field.
> 
> As I don't want to reinvent the wheel, I had a look at how the timestamp resolution is specificated in the new PCAP file format and simply use as much as possible of this spec.
> 
> 
> IMHO I've found a bug in the format specification: http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html. 
> 
> The description of the if_tsaccur option of the "3.2 Interface Description Block (mandatory)":
> 
> To qoute: "Precision of timestamps. If the Most Significant Bit is equal to zero, the remaining bits indicates the accuracy as as a negative power of 10 (e.g. 6 means microsecond accuracy). If the Most Significant Bit is equal to zero, the remaining bits indicates the accuracy as as negative power of 2 (e.g. 10 means 1/1024 of second). If this option is not present, a precision of 10^-6 is assumed."
> 
> Well, both sentences starts with the identical: "If the Most Significant Bit is equal to zero"?!? One of the sentences should include one and not zero :-)

You're true, the second sentence should say "equal to one". I'll fix it 
  as soon as possible.

> Could you tell me the correct way and update the spec accordingly?
> 
> BTW: The starting sentence "Precision of timestamps" is a bit misleading, as the if_tsaccur option will only affect the lower 32 bit part of the timestamp, according to the packet block format description. "Precision of Timestamp (Low)" might be better.

I can fix it too.

> 
> Please CC me, as I'm currently not on this list...
> 
> Regards, ULFL
> 
> P.S: With the current timestamp definition, the finest resolution would be 232,8 picoseconds (when I've done a correct calculation) until the lower 32 bit part of the timestamp will wrap around. Will this be enough even for 10GBit Ethernet?

If my calculations are not wrong, we have 31 bits, therefore a range 
from 0 to 2147483648. This number is the precision as a power of -10 or 
as a power of -2, i.e. 1/(10^2147483648) or 1/(2^2147483648) which is, I 
think, more than enough for AnyGbit Ethernet.

Loris


> __________________________________________________________________________
> Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
> Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
> 
> 
> _______________________________________________
> ntar-workers mailing list
> ntar-workers at winpcap.org
> https://www.winpcap.org/mailman/listinfo/ntar-workers
> 


More information about the ntar-workers mailing list