mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Clarify even more about various system-specific problems with getaddrinfo
svn:r1542
This commit is contained in:
parent
9151d000e6
commit
201d8d0baf
14
evutil.c
14
evutil.c
@ -856,10 +856,16 @@ evutil_getaddrinfo(const char *nodename, const char *servname,
|
||||
/* Enough operating systems handle enough common non-resolve
|
||||
* cases here weirdly enough that we are better off just
|
||||
* overriding them. For example:
|
||||
* - Some believe that giving a numeric port as a servname is
|
||||
* totally verboten. (I think this includes OpenBSD IIUC).
|
||||
* [XXXX we don't fix this case completely.]
|
||||
* - Windows is eccentric.
|
||||
* - Some older BSDs used to believe that giving a numeric
|
||||
* port without giving an ai_socktype was verboten.
|
||||
* (XXX we don't yet handle the general case of this.)
|
||||
*
|
||||
* - 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;
|
||||
|
@ -613,8 +613,12 @@ struct evdns_getaddrinfo_request;
|
||||
* we pass the evutil_addrinfo structures we found (or NULL on error). We
|
||||
* pass 'arg' as the third argument.
|
||||
*
|
||||
* Limitations:
|
||||
*
|
||||
* - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
|
||||
* - 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_base *dns_base,
|
||||
|
Loading…
x
Reference in New Issue
Block a user