apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: getaddrinfo on Ubuntu
Date Wed, 06 Jun 2007 23:15:49 GMT

On 06/06/2007, at 19:06, Davi Arnaut wrote:

> Joe Orton wrote:
>> On Wed, Jun 06, 2007 at 10:57:00PM +0300, Lucian Adrian Grijincu  
>> wrote:
>>> This is the output:
>>> getaddrinfo AF_UNSPEC/SOCK_STREAM/AI_ADDRCONFIG failed
>>> so, yes:     hints.ai_flags = AI_ADDRCONFIG; makes getaddrinfo fail.
>>
>> Just so I can understand the precise nuances of this, can you post  
>> the
>> output of:
>>
>> wget http://people.apache.org/~jorton/gai.c
>> make gai
>> ./gai ::1
>> ./gai ::1 null inet6
>> ./gai -a ::1
>> ./gai -a ::1 null inet6
>
>
> Ubuntu 7.04 (no ipv6 addresses -- other then loopback -- configured):
>
> davi@karmic:~/gai$ make gai
> cc     gai.c   -o gai
> davi@karmic:~/gai$ ./gai ::1
> getaddrinfo("::1", NULL, {.family=AF_UNSPEC, .hints=0}) = 0:
>  family=10, proto= 6 inet6: addr=::1, port=0, flowinfo=0
> davi@karmic:~/gai$ ./gai ::1 null inet6
> getaddrinfo("::1", NULL, {.family=AF_INET6, .hints=0}) = 0:
>  family=10, proto= 6 inet6: addr=::1, port=0, flowinfo=0
> davi@karmic:~/gai$ ./gai -a ::1
> getaddrinfo("::1", NULL, {.family=AF_UNSPEC, .hints=0| 
> AI_ADDRCONFIG}) = -1:
> error: Address family for hostname not supported
> davi@karmic:~/gai$ ./gai -a ::1 null inet6
> getaddrinfo("::1", NULL, {.family=AF_INET6, .hints=0| 
> AI_ADDRCONFIG}) = -1:
> error: Name or service not known
>

Same machine, now with -n:

davi@karmic:~/gai$ ./gai -n ::1
getaddrinfo("::1", NULL, {.family=AF_UNSPEC, .hints=0| 
AI_NUMERICHOST}) = 0:
family=10, proto= 6 inet6: addr=::1, port=0, flowinfo=0
davi@karmic:~/gai$ ./gai -n ::1 null inet6
getaddrinfo("::1", NULL, {.family=AF_INET6, .hints=0|AI_NUMERICHOST})  
= 0:
family=10, proto= 6 inet6: addr=::1, port=0, flowinfo=0
davi@karmic:~/gai$ ./gai -na ::1
getaddrinfo("::1", NULL, {.family=AF_UNSPEC, .hints=0|AI_ADDRCONFIG| 
AI_NUMERICHOST}) = -1:
error: Address family for hostname not supported
davi@karmic:~/gai$ ./gai -na ::1 null inet6
getaddrinfo("::1", NULL, {.family=AF_INET6, .hints=0|AI_ADDRCONFIG| 
AI_NUMERICHOST}) = -1:
error: Name or service not known




Mime
View raw message