Add ENC_TIME_NSECS timestamp encoding
Add a new timestamp encoding format ENC_TIME_NSECS
, like ENC_TIME_SEC
but
for nanosecond values. Needed for my work-in-progress dissector for Apple
push notifications.
I based it on the ENC_TIME_MSECS code, I hope it's correct :)
Questions:
- Ever since ENC_TIME_SECS and _MSECS were introduced (8f515b1a), the code checks that the length is between 1 and 8, but the documentation says SECS is 4 to 8 bytes and MSECS is 6 to 8 bytes. What is the real minimum length and why? I assumed this is because you can't represent useful absolute times with less than 6 bytes of milliseconds, so I also documented NSECS as being 8 bytes long (with 7 bytes nsec you don't get past April 1972), but that doesn't account for relative times...
- Should I proactively add microseconds too (USEC), or should it only be added when there is an actual dissector that needs it?
- Should the documentation be next to SECS and MSECS, even if that makes the order of the docs not match the order of the defines?
Edited by AndersBroman