IETF-OPSAWG-WG / draft-ietf-opsawg-pcap

PCAP next generation file format specification
Other
263 stars 59 forks source link

Clarification: Purpose of if_tsresol to support powers or 2 #117

Closed unmanned-player closed 2 years ago

unmanned-player commented 2 years ago

The interface description block has an option (if_tsresol) that lets you set timestamp resolution. That value seems to be quite involved. In that, it can also support timestamps as powers of 2.

Are there any operating systems, devices or clocks that can produce timestamps in powers of 2? I reckon, RFC document could benefit from clear rationale for rare resolutions like these.

guyharris commented 2 years ago

The earliest pcapng draft I can find - dated April 2004, although it's from an April 2005 Wayback Machine archive - has both power-of-10 and power-of-2 time stamp support, but gives no rationale.

It may have been a "just in case, so that, if we ever need it, we don't have to introduce a feature that older code doesn't support and ''couldn't'' support as it didn't exist before we introduced it" idea. I can see if any of the original developers of pcapng know what the rationale was.

Are there any operating systems, devices or clocks that can produce timestamps in powers of 2?

Endace's DAG API, for their DAG cards, appears to provide a 64-bit time stamp in units of 2^-32 seconds.

unmanned-player commented 2 years ago

Thanks for the quick response.