]> granicus.if.org Git - libevent/commit
evdns_getaddrinfo() now supports the /etc/hosts file.
authorNick Mathewson <nickm@torproject.org>
Mon, 7 Dec 2009 22:21:41 +0000 (17:21 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 9 Jan 2010 00:36:37 +0000 (19:36 -0500)
commit72dd666777d4e341fc5c066cd7dc1975d0dd0090
tree83363ae13b095f9b3be2ea83be832336123efe26
parent0f7144fd8b05e95788ac2877caaf2b7c4688bf82
evdns_getaddrinfo() now supports the /etc/hosts file.

The regular blocking evutil_getaddrinfo() already supported /etc/hosts
by falling back to getaddrinfo() or gethostbyname().  But
evdns_getaddrinfo() had no such facility.  Now it does.

The data structure here isn't very clever.  I guess people with huge
/etc/hosts files will either need to get out of the 1980s, or submit a
patch to this code so that it uses a hashtable instead of a linked
list.

Includes basic unit tests.
evdns.c
include/event2/dns.h
test/regress_dns.c