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
|
/* 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;
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user