[Etoys] Re: Local host address
bert at freudenbergs.de
Wed Oct 18 13:47:05 EDT 2006
Am 18.10.2006 um 18:09 schrieb Ian Piumarta:
> On Oct 18, 2006, at 5:06 AM, Bert Freudenberg wrote:
>> ... answers 127.0.0.1 on the A-test board.
>> can we make this answer the address of the default interface?
> You mean the address of the default gateway? While in some
> situations it might be the same as the local host address, on the
> vast majority of machines in the world it's the address of a remote
>> The one marked default (dest addr = 0.0.0.0) in the routing table?
> That isn't even a valid host address; it's the address of an entire
> network (or the least restrictive wildcard address, depending what
> you're using it for).
I know. I meant return the IP address of the interface that packets
for any non-local address are routed through. That is the interface
connecting to the default gateway. If you do a "route -n" on Linux
it's the route marked with a 0.0.0.0 destination address, which
matches *any* address.
> Breaking the localHostAddress primitive for everyone who wants to
> restrict incoming connections to those originating on the primary
> interface of the local physical host seems completely the wrong
> thing to do.
Well, what's the "primary" interface? Isn't that pretty random? On
some linux machines the primitive actually does answer the external
interface's address (assuming there is just one). On the OLPC machine
it does not.
Answering 127.0.0.1 from the primitive is useless because I do no
need a primitive to tell me that this is my loopback address.
If I want to share my world I go to the help/telemorphic menu and let
it display my host address so others can connect to it. That won't
work if they try to connect to 127.0.0.1. So, ignoring everything I
said above, what should we do instead?
- Bert -
More information about the Etoys