Skip to content

PTP: Refine timestamp printing. #1277

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

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

infrastation
Copy link
Member

Fixes #1260.

@infrastation
Copy link
Member Author

The next revision makes the code style more consistent and fixes one other bug.

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 indicate an invalid
nanoseconds value.  Update the tests.  This resolves GH issue the-tcpdump-group#1260.
@infrastation
Copy link
Member Author

Simplified the matter a bit. This will be merged in one day unless anyone objects.

@fxlb
Copy link
Member

fxlb commented Jan 20, 2025

The option for --time-stamp-precision are microand nano. The is also --micro option. Thus we should use msfor microsecond, not us.

@infrastation
Copy link
Member Author

There is an authoritative source for that.

@fxlb
Copy link
Member

fxlb commented Jan 20, 2025

m is for milli, OK.

@infrastation infrastation merged commit 94675fc into the-tcpdump-group:master Jan 21, 2025
19 checks passed
@infrastation infrastation deleted the ptp_timestamp branch February 6, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

ptp: originTimeStamp field comma inconsistent between announce, sync
2 participants