Skip to content
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_analyzer not reporting correct #7

Open
dcrearer opened this issue May 13, 2019 · 1 comment
Open

ptp_analyzer not reporting correct #7

dcrearer opened this issue May 13, 2019 · 1 comment

Comments

@dcrearer
Copy link

It appear that the for loop that extracts the time stamp from the ptp messages are dependent on the source port. Example if int(pkt.udp.port) == PTP_PORT_1 and int(pkt.ptp.v2_messageid) == MSG_ID_SYNC_MSG:

The if statement evaluates to false if the UDP source port is not 319.
Sine this is a sync message should the if statement evaluate the destination port?

@wvermost
Copy link
Contributor

wvermost commented May 13, 2019

I just opened IEEE 1588, and Annex E says:
E.2 UDP port numbers
"The UDP destination port value of an event message shall be 319." Will you propose a pull request?

Note, The PTP script is just a small demonstration. In a good implementation, one would like to a state machine to keep track of the PTP communication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants