[Vm-dev] unix nameToAddr() function appears to not work on Raspbian?

tim Rowledge tim at rowledge.org
Wed Sep 16 23:40:17 UTC 2015


Somebody noticed that asking for the local address on a Pi vm returns 127.0.1.1 these days, whereas on my iMac it returns the actual machine IP. That’s a much more useful thing.

The Smalltalk code is in NetNameResolver class>>localHostAddress, using prim SocketPlugin.c->primitiveResolverLocalAddress() etc. Running this under gdb shows me that we are finding the machine’s local name ok (‘Pi-2’ in this case) but that sqResolverLocalAddress() is using nameToAddr() and being told “127.0.1.1” - well strictly speaking 0x7f000101 of course. I’ve tried `man nameToAddr` and googling nameToAddr and got.. nothing. I don’t even seem to find it listed in a header file out there.  Whah?

Puzzled in Qualicum...

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- An 8086 in a StrongARM environment.




More information about the Vm-dev mailing list