Projects / dns.c


dns.c is a recursive, re-entrant, non-blocking DNS resolver in a single .c file. It features a record-agnostic API, restartable record iterators, and smart queries which recursively follow out-of-bailiwick NS, MX, and SRV host references. It works just as well as a stub resolver, too. It also includes spf.c, a non-blocking SPF resolver with no threading, no forking, and no run-time dependencies.

Operating Systems

Recent releases

  •  06 Aug 2012 04:43

    Release Notes: This release fixes a FreeBSD regression, adds /etc/nsswitch.conf configuration support, and adds SIGPIPE suppression.

    •  21 Jun 2012 17:41

      Release Notes: This release adds a minor bugfix to some inet_pton() calls which improperly returned errno on malformed addresses, minor portability fixes for MinGW-w64, FreeBSD, NetBSD, and Solaris, and inlined GCC and clang pragma annotations to quiet erroneous warnings (no more warnings in GCC 4.7 or clang 3.1 with -Wall -Wextra).

      •  15 Jan 2011 19:53

        Release Notes: A bug where dns_srv_print() failed to NUL terminate was fixed.

        •  16 Aug 2010 00:16

          Release Notes: This release fixes a memory leak in the core resolver. A QoI fix sets ai_canonname to the IP address when a numeric host is specified to dns_ai_open(). The BSD Sockets wrapper, socket.c, has been added to the contrib directory. socket.c transparently and asynchronously handles DNS lookup, TCP connect(2) setup, and SSL negotiation; the application merely attempts logical reads and writes through the object.

          •  14 Jul 2010 21:51

            Release Notes: This release adds a query statistics interface. It makes domain truncation handling more consistent.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.