tech-userlevel archive

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

Re: getaddrinfo(3) on numerical addresses



On Tue, Oct 24, 2017 at 03:19:29PM +0200, Edgar Fuß wrote:
> I've noticed[*] that on NetBSD, getaddrinfo(3) does a resolver lookup even 
> if presented a numerical address. Is this on purpose? Would it have a 
> drawback if it would first try to inet_pton() the address?
> On Linux, it seems to avoid the resolver lookup.

That's what AI_NUMERICHOST is for? It's not clear whether it should or
should not parse the behavior, see comments in the code.

Joerg


Home | Main Index | Thread Index | Old Index