Closed mrtnlrsn closed 11 months ago
Hi @mrtnlrsn thanks for opening this isssue!
I could invest some time on Windows debugging for this but it may take a little while due to the fact that I dont have access to a Windows PC anymore.
If you are willing to give a shot, I think you could follow your hypothesis and provide a couple tests that support it.
Most of the Windows based improvements in this crate has been introduced by more experienced Windows users to be honest, Im more on the Unix side.
Feel free to reach out anytime!
I don't have a hypothesis as such to try out, I just confirmed, that the data is available... I don't undestand the windows API good enought to understand why the code is as it is... And it is somewhat complex...
I have been given time at my work to fix this. So expect a pull request some time...
Given this Windows 10 Home Edition IP configuration (ipconfig selected lines)
cargo test "test::show_network_interface" -- --nocapture
reports (loopback interfaces omitted): Notice the broadcast address is identical for all IPs.I did a little debugging and I can see, that the correct broadcasst addresses are returned from windows'
GetAdaptersAddresses()
. Your functionwindows.rs:NetworkInterface:show()
has this breakif prefix_index_ipv4 == 2 {
. If that is removed it will iterate over the correct broadcast addresses also.It is however non-trivial for me to see, how to correctly incorporate that information... Hoping you are more experienced in understanding Windows' network API docs..