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

Discovery: MDNS does not find devices across multiple interfaces #15

Closed
5 tasks done
bltavares opened this issue Jun 26, 2020 · 1 comment · Fixed by #16
Closed
5 tasks done

Discovery: MDNS does not find devices across multiple interfaces #15

bltavares opened this issue Jun 26, 2020 · 1 comment · Fixed by #16
Labels

Comments

@bltavares
Copy link
Owner

bltavares commented Jun 26, 2020

I found that running the discovery on mdns only worked for one interface. As soon as I tried it on a multihomed device, such as my laptop with WiFi and Cable on different networks, I could not find it anymore.

The discovery has been documented on socket-2, which shows that while we can listen on multiple interfaces for the incoming packets, we need to do some gymnastics to send packets on multiple interfaces.

Goal

Create a single socket which listen to multicast packets on multiple interfaces, and can send packets on a multiple interfaces as well.

What we gonna do on the live stream?

The goal is to create a socket interacting with socket-2 that provides an API to multiple interfaces. This will require having Rust interact with C++/C structs and do C->Rust FFI (which I have no idea how to do that much.) Come learn with me.

Create a Multicast UDP socket that:

  • Listens for a specific multicast ip:port (eg: MDNS)
  • Join multicast group on multiple interfaces
  • Receive a message: (data, origin ip, origin interface)
  • Send a message: (data, destination ip, origin interface)
  • Send a message on all active interfaces: (data, destination ip, [all interfaces])

References

@bltavares
Copy link
Owner Author

bltavares commented Jul 1, 2020

Now that we have multicast-socket we can plan ahead to use it on our project.

TODO Next stream:

Livestream Details
Planned date Sunday 10am GMT-3 - 2020-07-05 in pt-br
Link https://twitch.tv/bltavares_codes
Timezone https://everytimezone.com/s/f2f1d2af
  • Use Multicast Socket on colmeia-hyperswarm-mdns

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

Successfully merging a pull request may close this issue.

1 participant