apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject Re: [Vote] Release APR 1.2.9/0.9.14 and apr-iconv 1.2.0
Date Wed, 06 Jun 2007 23:34:15 GMT
On Thu, Jun 07, 2007 at 02:06:49AM +0300, Lucian Adrian Grijincu wrote:
> <snip from=man getaddrinfo(3)>
>       If hints.ai_flags  contains  the
>       AI_NUMERICHOST flag then the node parameter must be a numerical 
>       network
>       address.  The AI_NUMERICHOST flag suppresses  any  potentially  
>       lengthy
>       network host address lookups.
> </snip>
> how does this work with string names like "localhost" too?

Eh, it doesn't, that's why it's got the word numeric in there ;-) But if
people want to translate literal IP addresses into addrinfo structures
regardless of connectivity - that's how to do it.

> As I understand the APR interface that's misbehaving now needs to
> support hostnames besides IPs represented as strings.

Very much so, that's the majority use-case by a long long way, it works
fine btw!

> Suppose that a this string is read from the commandline as a
> parameter. The app coder cannot pass this new APR_NUMERIC_ADDRESS
> flag, because he doesn't know if the string he received is a name for
> a link-local IP.

Firstly: I'm not sure what your point here is :-) That wouldn't be the

Secondly: It's incredibly trivial to tell if a string is a literal IP
address or not, they are programatically distinguishable from hostnames
with extreme ease. But it'd be a bad idea to do that, still not the

Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

View raw message