IPv6 incorrect setup (or resolver bug? or http client bug?)

Ingela Anderton ingela@REDACTED
Tue Nov 2 09:07:13 CET 2004


Matthias Lang wrote:
> 
>  Matthias> Is 172.16.2.2 an ip6 address?
> 
>  Ingela> No, it is a ipv4 address.
> 
> I've read up a little on IP6 addressing since Friday. To satisfy my
> curiosity, can someone tell me what
> 
>  inet:getaddr("172.16.2.2", inet6)

$ erl
Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll]

Eshell V5.4.1  (abort with ^G)
1>  inet:getaddr("172.16.2.2", inet6).
{ok,{0,0,0,0,0,65535,44048,514}}
 
> returns in R10B on a machine which supports IP6. (I'm expecting an
> error, or ::172.16.2.2, or an encoded version of ::172.16.2.2).
> 
> Come to think of it, what does
> 
>  inet:getaddr("localhost", inet6)
> 
> return?
2>  inet:getaddr("localhost", inet6).
{ok,{0,0,0,0,0,65535,32512,1}}
3> inet:getaddr("localhost", inet). 
{ok,{127,0,0,1}}

-- 
/m.v.h Ingela

Ericsson AB - OTP team









More information about the erlang-questions mailing list