[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getaddrinfo() and AI_CANONNAME

On Tue, Oct 17, 2000 at 09:47:09AM +0900, itojun@iijlab.net wrote:

> 	ai_canonname has the same meaning as "h->h_name" and

Where it is defined?

> 	getaddrinfo must not do the reverse lookup (i.e. getnameinfo).

I don't quite understand. getaddrinfo() does not do a reverse lookup.

The problem is: I have a Linux and an AIX system. Both has FQDNs in /etc/hosts
and both are configured to use /etc/hosts first for lookups. On Linux,
getaddrinfo() returns an FQDN when asked for the canonical name of the local
host; AIX returns the unqualified hostname. Since the meaning of
"canonical name" is not defined in either RFC2133 or RFC2553 (and the POSIX
draft is neither final nor public), I must say that both Linux and AIX
comply to the mentioned RFCs.

> 	so i don't think your patch is right.

Then how to expand an unqualified name to a FQDN?


Gabor Gombas                                       Eotvos Lorand University
E-mail: gombasg@inf.elte.hu                        Hungary