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

check_clocks.c does only support a single interface for ptp4l #39

Open
ccvca opened this issue Dec 14, 2023 · 0 comments
Open

check_clocks.c does only support a single interface for ptp4l #39

ccvca opened this issue Dec 14, 2023 · 0 comments

Comments

@ccvca
Copy link

ccvca commented Dec 14, 2023

The application check_clocks does not work, when ptp4l works on multiple interfaces (e.g. a switch ptp4l -f /etc/ptp4l-tsn.cfg -i enp2s0np2 -i enp2s0np3 -i enp2s0np4 -i enp2s0np5).

Rought overview of the required adaptions for such cases

  • The intefaces appear as additional messages on the socket, when query the port states here, so poll needs to be called multiple times to read all port states.
    int n = poll(&pollfd, 1, 1000);
  • For all received ports, this needs to be done:
    static bool get_port_status(uint8_t *rec_buf, int *port_state)

PS: I don't known if this issue is out ot scope for the application check_clocks. But I think it's worth documenting this, in case someone else has the same issues like me.

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

1 participant