On Wed, Nov 25, 2015 at 04:45:28PM +0800, Bruno Jesus wrote:
On Wed, Nov 25, 2015 at 3:57 PM, Bruno Jesus 00cpxxx@gmail.com wrote:
On Wed, Nov 25, 2015 at 6:55 AM, Joachim Priesner joachim.priesner@web.de wrote:
It seems that this is the case -- gethostbyname(gethostname()) returned 127.0.0.1 as the only address in a VMware VM with network adapters removed.
I just confirmed this by disabling all network interfaces in XP, so it is something that we could implement too.
Interesting. Does GetAdaptersInfo return a non-null PIP_ADAPTER_INFO when there are no adapters on the (virtual) machine? How about GetIpAddrTable?
Does the list of addresses returned by gethostbyname(gethostname()) include the loopback address when there _are_ other adapters configured with IPv4 addresses? (And if there are multiple loopback adapters installed/configured then are all of their addresses included?)