inet:ip/1
Per Hedeland
hedeland@REDACTED
Wed Apr 12 23:34:56 CEST 2006
Serge Aleynikov <serge@REDACTED> wrote:
>
>Moreover, the kernel/inet_parse.erl has the following comment for
>ipv4_address/1:
>
>%% Parse IPv4 address:
>%% d1.d2.d3.d4
>%% d1.d2.d4
>%% d1.d4
>%% d4
>%%
>%% Return {ok, IP} | {error, einval}
>
>I wonder what it was that authors were trying to accomplish.
It's the standard, is what it is:
$ telnet 1.2.3
Trying 1.2.0.3...
^C
$ telnet 1.2
Trying 1.0.0.2...
Though admittedly an old and not very useful standard... See the section
INTERNET ADDRESSES on e.g.
http://www.freebsd.org/cgi/man.cgi?query=inet_aton for a description of
the logic, such as it is (feel free to ignore the part about the VAX:-).
The above commands are from a Linux box, i.e. it's not (Free)BSD-
specific, but of course the logic is not described in Linux man pages.
--Per Hedeland
More information about the erlang-questions
mailing list