On 26.08.2009, at 22:05, Philippe Marschall wrote:
2009/8/26 Andreas Raab andreas.raab@gmx.de:
Quick Unix question: How do I find out what the IP address for eth0/ eth1 is? I thought NetNameResolver>>localHostAddress was supposed to return this but it returns consistently 127.0.0.1 which is fine from a purity point of view but utterly useless from any practical perspective ;-)
I reported exactly this a while ago and was told that the problem is with me and not the code. Then I suggested that the code would be changed to directly return 127.0.0.1. That would achieve the same result more efficiently. Somehow that never got implemented though.
What got implemented though is a primitive to list all interfaces that are available. Hosts do not have IP addresses, interfaces do. And since hosts typically have multiple interfaces, it's not really up to the VM to pick one, but the application.
- Bert -