-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ptp: originTimeStamp field comma inconsistent between announce, sync #1260
Comments
Since the existing code uses a comma to separate different data elements and calls the seconds + nanoseconds pair a timestamp element, it would make the most sense to me not to use a comma within the timestamp in both cases, i.e. to remove the comma from |
+1 |
Is there a compelling reason not to represent the first example as
and the second example as
|
No. We have to change the output and your proposal is in line with some |
One format or the other, it should indicate an invalid (> 999999999) value of ns as was done in commit 8db1e99 earlier. |
We could also signal bogus packet timestamp with an exclamation mark, such as: |
A word is a bit easier to notice on a busy screen. |
Yes. |
Move nanosecond-specific constants from print-arista.c to netdissect.h. In ptp_print_timestamp_identity() and ptp_print_announce_msg() use ptp_print_timestamp() to deduplicate code. In ptp_print_timestamp() change the format to SECONDS.NANOSECONDS and a bogus nanoseconds value indicator. Update the tests. This resolves GH issue the-tcpdump-group#1260.
Tested and present in two versions:
Inside an
announce
message:Inside a
sync
message:I would quickly create a PR myself but I am unsure about the conventions that should be used here since other subfields (such as NS correction/sub NS correction) are broken up into two comma-separated titled fields.
Full comparison between two packets:
The text was updated successfully, but these errors were encountered: