Clarify even more about various system-specific problems with getaddrinfo

svn:r1542
This commit is contained in:
Nick Mathewson 2009-11-17 18:29:44 +00:00
parent 9151d000e6
commit 201d8d0baf
2 changed files with 14 additions and 4 deletions

View File

@ -856,10 +856,16 @@ evutil_getaddrinfo(const char *nodename, const char *servname,
/* Enough operating systems handle enough common non-resolve /* Enough operating systems handle enough common non-resolve
* cases here weirdly enough that we are better off just * cases here weirdly enough that we are better off just
* overriding them. For example: * overriding them. For example:
* - Some believe that giving a numeric port as a servname is * - Some older BSDs used to believe that giving a numeric
* totally verboten. (I think this includes OpenBSD IIUC). * port without giving an ai_socktype was verboten.
* [XXXX we don't fix this case completely.] * (XXX we don't yet handle the general case of this.)
* - Windows is eccentric. *
* - Windows doesn't like to infer the protocol from the
* socket type, or fill in socket or protocol types much at
* all. It also seems to do its own broken implicit
* always-on version of AI_ADDRCONFIG that keeps it from
* ever resolving even a literal IPv6 address when
* ai_addrtype is PF_UNSPEC.
*/ */
{ {
int err, port; int err, port;

View File

@ -613,8 +613,12 @@ struct evdns_getaddrinfo_request;
* we pass the evutil_addrinfo structures we found (or NULL on error). We * we pass the evutil_addrinfo structures we found (or NULL on error). We
* pass 'arg' as the third argument. * pass 'arg' as the third argument.
* *
* Limitations:
*
* - The AI_V4MAPPED and AI_ALL flags are not currently implemented. * - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
* - We don't look at the /etc/hosts file. * - We don't look at the /etc/hosts file.
* - For ai_socktype, we only handle SOCKTYPE_STREAM, SOCKTYPE_UDP, and 0.
* - For ai_protocol, we only handle IPPROTO_TCP, IPPROTO_UDP, and 0.
*/ */
struct evdns_getaddrinfo_request *evdns_getaddrinfo( struct evdns_getaddrinfo_request *evdns_getaddrinfo(
struct evdns_base *dns_base, struct evdns_base *dns_base,