Per Hedeland <>
Wed Apr 12 23:34:56 CEST 2006

Serge Aleynikov <> wrote:
>Moreover, the kernel/inet_parse.erl has the following comment for 
>%% 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
$ telnet 1.2

Though admittedly an old and not very useful standard... See the section
INTERNET ADDRESSES on e.g. 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