Closed shinypb closed 1 year ago
Thanks, there are some build/test failures though.
I see that! Thought cargo test
had my back 😅I need to spin up some test VMs; I’ll dig in on Monday 💪.
Hi @messense! I fixed the build errors and added an additional assertion in the test case; please let me know if there's anything else I can do on this PR. Thanks for your review! :bow:
Published in v0.10.0: https://crates.io/crates/if-addrs/0.10.0
Knowing the interface index (also known as the interface number) is required for setting some socket options, particularly around IPv6 multicasting (e.g. UdpSocket#join_multicast_v6).
This adds an idx field on Interface (an
Option<u32>
) and populates it on posix systems. Unfortunately, I am not a Windows programmer, so I'm leaving it unimplemented there; I would be delighted to see someone else pick up the torch and get it implemented on Windows as well.