Thanks for the thorough explanation, Holger!

But, how can I solve my problem? I want to know my internet IP address,
how do I get it from Rebol?

TIA,

Rachid

----- Original Message -----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 20, 2000 15:14
Subject: [REBOL] IP reading enhancement, WAS: Searchable archive/ tcp/ip
questions Re:(6)


On Thu, 20 Apr 2000, you wrote:

> Yep, exactly! I'm on the internet (dial-up networking, Win98), and
Rebol
> prints my network IP address instead of the internet IP number...
> winipcfg does give me the correct number, but Rebol doesn't.
>
> But it's probably a windows thing, because when I synchronise my
> computer over the network, and then attempt to go online, IE5 just
keeps
> telling me I have to connect (when I have 'connect when there is no
> network present' checked), so I figure it's a windows thing.
>
> BUT, since winipcfg CAN read the correct address, perhaps Rebol should
> be more perceptive in this case? Perhaps a refinement that reads out
the
> PPP-adapter's IP address, instead of the primary IP address?

REBOL gets the IP address from the host name, using DNS lookup, and this
is arguably the correct thing to do.

The problem is that some programs use IP addresses for all kinds of
things,
and this easily causes problems on multi-homed hosts because a program
has no way of knowing which IP address is correct. As a rule, a program
ideally should never use local IP addresses for anything other than
printing
debugging/diagnostic information. Local IP addresses should definitely
never be
used in a protocol in any way.

Because of that, adding refinements to extend the current IP address API
in
REBOL would only make things worse, because it would require scripts to
be
changed by every user so the refinements match the configuration of the
machine
they are running on -- a bad idea.

Unfortunately in REBOL/Core 2.2 the FTP implementation uses local IP
addresses
in such an incorrect way, which is causing problems for some users. The
correct
thing is not to change the way REBOL determines the local IP address,
but rather
to fix the protocols so they do not need to know local IP addresses at
all :-).
FTP in REBOL/View does it correctly, and the fix will also be in the
next /Core
release.

--
Holger Kruse
[EMAIL PROTECTED]

Reply via email to