-
Nirbheek Chauhan authored
nice_interfaces_get_local_interfaces() was returning the hardware device names of interfaces that have been seen in the past or could be connected. It had no relation to the actual interfaces present on the device. Perhaps this worked back in the XP days, but it is returning garbage today. Use GetAdapterAddresses(), and return the adapter friendly names as the interface names. At the same time, update nice_interfaces_get_ip_for_interface() to match. Coincidentally, this also fixes UWP compatibility since GetIfTable and GetIpAddrTable are not available when targeting UWP. They are only available for desktop apps: https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getiftable https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getipaddrtable
79dae65b