Resources for DNS Programmers


There are several alternatives for client-side DNS programming.

The most common application is to simply call the standard library routines gethostbyname() or getnameinfo() in a C or C++ program, or their equivalents provided by other programming language libraries.

When the functionality provided by gethostbyname() or getnameinfo() is not sufficient, a common approach is to reuse code from one of the freely distributable pieces of software (such as BIND), as long as the copyright terms are suitable. Several DNS servers are open source, and their code is often used as a basis by programmers. For these (including BIND and djbdns) please see the listing of DNS server software.

In a Windows environment, reportedly the DnsQuery() API is quite functional, including support for SRV records from Windows 2000 onwards. Please consult the vendor documentation for more information.

GNU adns
C/C++ library providing a stub resolver that can be used asynchronously (without blocking). Comes bundled with some example utilities that use the library. Free. (Version 1.1 released 20-Sep-2003, checked 17-Nov-2004)
Net::DNS
Perl module for performing DNS queries. More generally it provides a Perl interface to the DNS resolver. Free. (Version 0.60 released 21-Jun-2007, checked 03-Jul-2007)
RULI
Asynchronous stub resolver library, with support for SRV records and bindings for PHP, Perl, Guile/Scheme, Java and Lua. Free. (Version 0.32 released 26-Oct-2004, checked 17-Nov-2004)

[Back to DNSRD]
Copyright 1994-2007 by András Salamon <andras@dns.net>

Last updated 03-Jul-2007