[Libevent-users] [Patch] Third attempt: Add support for DNS servers
to evdns.c (This time with regression tests!)
Nick Mathewson
nickm at freehaven.net
Mon Jan 29 13:08:04 EST 2007
Hello again, and thank you for your patience. This the latest version
of my patch to add DNS server support to evdns.c. This time it
incorporates regression tests. While writing the tests, it proved
necessary to extend evdns_nameserver_ip_add to allow an IP:port
syntax. The tests also turned up a bug in evdns_resolve_reverse,
where the correct TTL would never be sent to the callback; this patch
also fixes that bug.
Summary:
This patch adds DNS server support to evdns.c. It provides an
external API for clients to register a dns server socket, and a
callback that will learn about DNS requests. After examining the
request, the caller should eventually drop it by calling
evdns_server_request_drop() or add answers with
evdns_Server_request_add_*_reply() and send the final result with
evdns_server_request_respond().
Extend evdns_nameserver_ip_add() to accept IP:Port syntax for
nameservers running on ports other than 53.
Fix handling of TTLs in reverse lookups.
This is a pretty big patch (~30K), so I'm not going to attach it here;
you can download it at:
http://freehaven.net/~nickm/libevent_server_patch/dns_server_v3.diff
yrs,
--
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070129/367ecb06/attachment.bin
More information about the Libevent-users
mailing list