mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
b9d4d5f66anet: Use GetAdaptersAddresses to get local addresses on Windows (laanwj) Pull request description: Instead of a `gethostname` hack, which is not guaranteed to return all addresses, use the official way of calling `GetAdaptersAddresses` to get local network addresses on Windows. Do the same checks as the UNIX path: interface is up, interface is not loopback. Suggested by Ava Chow. Addiional changes: - Cleanup: move out `FromSockAddr` in `netif.cpp` from MacOS and use it everywhere appropriate. This avoids code duplication. ACKs for top commit: davidgumberg: utreACKb9d4d5f66aachow101: ACKb9d4d5f66aTree-SHA512: e9f0a7ec0c46f21c0377d5174e054a6569f858630727f94dac00c0cb7c241c56892d0b902706d6dd53880cc3b5ae1f2dba9caa1fec40e64cd4cf0d34493a49c1