Closed njeisecke closed 2 years ago
Thanks for this lighweight cross-platform interface enumeration library.
fixed the clippy hint.
Hi @njeisecke thanks for opening this PR!
I think you are working on retrieving the local IP address, am I correct?. If that's the case perhaps you could visit this crate https://github.com/EstebanBorai/local-ip-address where the main goal is to retrieve the local IP address. So perhaps your improvements belong to such crate instead?
If I'm not accurate to your proposal, please let me know perhaps I'm just confused!
Hi @EstebanBorai,
I think you are working on retrieving the local IP address, am I correct?.
No, I want to get the interface's IPv4 broadcast address. This is implemented for both linux and macos but was missing for Windows. It's the fourth argument to NetworkInterface::new_afinet
.
Nils
Hi @EstebanBorai,
I think you are working on retrieving the local IP address, am I correct?.
No, I want to get the interface's IPv4 broadcast address. This is implemented for both linux and macos but was missing for Windows. It's the fourth argument to
NetworkInterface::new_afinet
.Nils
You are right! Thanks for clarifying!
@EstebanBorai, thank you for accepting the patch! Kindly awaiting a new release ;-)
@EstebanBorai, thank you for accepting the patch! Kindly awaiting a new release ;-)
To you! Release is now available here: https://crates.io/crates/network-interface! Please let me know any issues you find!
Thanks!
Windows also reports a broadcast address for localhost. Not sure if that actually makes sense. AFAIK you cannot broadcast to localhost (on macOS and Linux).