Querying DNS from Haskell

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Tue Sep 16 17:26:32 EDT 2003


On Tue, Sep 16, 2003 at 03:59:10PM +0200, Peter Simons wrote:
> Hi,
> 
> is anyone aware of a library for Haskell, which allows to query domain
> name servers for MX, A, and PTR records in a non-blocking way?
> 
> My first guess was to create an Interface to ADNS [1], but I figured,
> maybe someone else has already solved this problem?

I have written such a library, but it is a bit incomplete now.

It is almost 100% pure Haskell (I had to use htonl/ntohl C functions in
one place because I prefer to keep IP addresses in host byte order and
Network.Socket.HostAddress uses network byte order).

The library contains a full DNS message parser and unparser.
I haven't yet implemented the full iterative query algorithm and CNAMEs
are not followed automatically.

I have used this library to concurrently resolve some millions of IP
addresses with performance of about 50 addresses per second.

If you are interested, I could clean it a bit and send you the library
with an example program.

> Peter

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links


More information about the Haskell-Cafe mailing list