[Domain Name System] [RFCs?]
Jochen Loewer has written a pure-Tcl (client TCP) implementation.
Scotty knows DNS.
See also The DNS blocking problem.