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

Confusing parameter documentation in mtp_init_client #551

Open
Misamag opened this issue Sep 14, 2023 · 2 comments
Open

Confusing parameter documentation in mtp_init_client #551

Misamag opened this issue Sep 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Misamag
Copy link

Misamag commented Sep 14, 2023

In function mtp_init_client, there is a mtp_dest_host parameter. The doc is multicast ip address where the sensor should send data.

As I can see from the code, it's rather the local ip address of the interface which is used to join the mutlicast group which is defined in the config parameter. If it's empty, the OS will automatically all (?) interfaces.

@Misamag Misamag added the bug Something isn't working label Sep 14, 2023
@twslankard twslankard self-assigned this Sep 14, 2023
@twslankard
Copy link
Collaborator

Thanks for the report @Misamag - I'll make sure we fix the documentation.

Best Regards,

Tom
Staff Engineer
Ouster Inc.

@twslankard
Copy link
Collaborator

After double-checking the code, it looks like mtp_dest_host specifies the address of the interface used to join the multicast group.

However, any interface will be used[1] if mtp_dest_host is empty (which as you've probably seen in the code sets the address to INADDR_ANY in an ip_mreq structure passed to setsockopt to join the multicast group.)

[1] https://man7.org/linux/man-pages/man7/ip.7.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants