[Etoys] Re: Local host address
Ian Piumarta
piumarta at speakeasy.net
Wed Oct 18 12:09:59 EDT 2006
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
machine.
> 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).
FWIW, having the primary IP address set to 0.0.0.0 is usually
symptomatic of your interface having received no configuration
information from DHCP or BOOTP. In normal operation when connected
to a network you should never see a physical interface configured
with this address.
If you are convinced you need to send stuff to 0.0.0.0 then you might
consider implementing 'defaultNetworkAddress' next to
localHostAddress in the image (return #[0 0 0 0]) and replace sends
of the latter with sends of the former. 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.
Cheers,
Ian
More information about the Etoys
mailing list