[MaraDNS list] duende changes

Sam Trenholme strenholme.usenet at gmail.com
Tue Jul 26 07:47:03 EDT 2011


> I hope MaraDNS2.0/Deadwood are included in this :-)

Yes, they are.  I plan on adding Nick's version of Duende to the next
MaraDNS release (with the name duende-debian) and I already have the
documentation for compiling MaraDNS 2.0 as well as Deadwood in
Windows:

http://agza.vk.tj http://agzb.vk.tj [1]

If you're looking for something that is simple that students can look
at, I recommend the 2.3 branch of Deadwood, which is a lot simpler
than Deadwood 3.0 (no messy recursion) and a lot cleaner than MaraDNS
2.0 (my C coding has gotten better over the years):

http://maradns.org/deadwood/tiny/

This code has a lot of things worth showing students:

* A simple finite state machine for parsing dwoodrc files

* Caching via a hashed one-dimensional "associative array" object
(keys and values are always strings)

* select() model to allow multiple simultaneous clients without messy
threading or inelegant fork()ing.

* Windows service code (included in the code because Windows basically
forces me to do so) as well as UNIX daemonization by Nick's favorite
MaraDNS/Deadwood program, Duende.  Allows you to compare and contrast
the two approaches.

* Cross-platform socket code.  Allows comparison between how a native
Windows application handles sockets compared to Linux and other UNIX
clones.

This code goes to an upstream DNS server, grabs a DNS record as-is
from that server and passes it on to the client requesting the DNS
record.  Caching is done via a LRU linked list (yes, like many
programmers, I independently re-invented the LRU) and it is possible
to store the cache in a file.

CERN (you know, the lab who helped invent the World Wide Web which I'm
using to write this email right now) uses this package, and it's very
good for people who don't need full recursion in a 32k binary (i386).

- Sam

[1] vk.tj is my own personal link shortening domain, so it can be
trusted.  If you want to preview a link, use a form like
http://preview.agza.vk.tj or http://agza.vk.tj/+ (these are the two
standard ways of previewing a shortened URL)


More information about the list mailing list