https://bugs.winehq.org/show_bug.cgi?id=41753
--- Comment #14 from André H. nerv@dawncrow.de --- (In reply to Bruno Jesus from comment #13)
adapterAddressesFromIndex already fills the prefix length for you. And this functions is called by GetAdaptersAddresses. So you just need to find out where it is stuffing the information.
http://source.winehq.org/source/dlls/iphlpapi/iphlpapi_main.c#1450
Yes, thx. I've seen the prefix entries, but I'm confused how to check which entry belongs to the address I'm looking for. E.g. the Address might be 10.42.42.123, and the prefix entry says 10.42.42.0 has prefixlength 24
Is it something like following pseudocode?
uint32 mask = prefixlen2mask(prefix->PrefixLength) // 24 -> 255.255.255.0 if (IP & mask == prefix->Address) print "yeah!"