inet:ip/1
Serge Aleynikov
serge@REDACTED
Wed Apr 12 20:59:39 CEST 2006
While playing with the inet:ip/1 function I noticed that it can take an
argument containing less than four octets. What's the meaning of such a
strange conversion like inet:ip("1.2.3")?
1> inet:ip("1.2.3.4").
{ok,{1,2,3,4}}
2> inet:ip("1.2.3").
{ok,{1,2,0,3}}
3> inet:ip("1.2").
{ok,{1,0,0,2}}
4> inet:ip("1").
{ok,{0,0,0,1}}
Serge
--
Serge Aleynikov
R&D Telecom, IDT Corp.
Tel: (973) 438-3436
Fax: (973) 438-1464
serge@REDACTED
More information about the erlang-questions
mailing list