localHostAddress
John M McIntosh
johnmci at smalltalkconsulting.com
Sun Oct 7 16:49:15 UTC 2007
On Oct 6, 2007, at 11:42 PM, Jason Johnson wrote:
> I would have to see your /etc/hosts.conf but you are pinging
> "Otter.local" which does look like an external (i.e. not localhost)
> address. If you have more then one entry for Otter that points to
> different interfaces then this could happen.
[otter:~] johnmci% cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
[otter:~] johnmci% hostname
Otter.local
[otter:~] johnmci%
Well the computer name is set to otter, and os-x then cheerfully sets
the hostname to Otter.local using
Bonjour, formerly Rendezvous, aka zeroconf
See http://en.wikipedia.org/wiki/.local
later when squeak asks for the hostname via gethostname we get back
Otter.local
On a linux system without zeroconf the interaction would be different
and you would expect to get back an entry in the /etc/hosts
/* start a new network session */
sqInt sqNetworkInit(sqInt resolverSemaIndex)
{
if (0 != thisNetSession)
return 0; /* already initialised */
gethostname(localHostName, MAXHOSTNAMELEN);
localHostAddress= nameToAddr(localHostName);
thisNetSession= clock() + time(0);
if (0 == thisNetSession)
thisNetSession= 1; /* 0 => uninitialised */
resolverSema= resolverSemaIndex;
return 0;
}
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|