1 <html><head><title>adns - advanced, alternative, asynchronous resolver</title>
2 <link rev="made" href="mailto:adns-maint@chiark.greenend.org.uk">
3 <meta name="keywords" content="adns">
8 <strong>Advanced, easy to use, asynchronous-capable DNS client
9 library and utilities.</strong>
11 <!-- Note: this file must contain portable HTML ! -->
13 <!-- It is served on the GNU site and also from my own system, -->
14 <!-- under the URL http://www.chiark.greenend.org.uk/adns/ -->
15 <!-- Please ensure that all links continine to be correct -->
16 <!-- both for www.gnu.org and chiark. -->
18 <!-- $Id: README.html,v 1.10 2006/04/03 23:00:48 ian Exp $ -->
22 adns is a resolver library for C (and C++) programs, and a collection
23 of useful DNS resolver utilities.
28 In contrast with the standard interfaces, gethostbyname et al and
29 libresolv, it has the following features:
33 <li>It is reasonably easy to use for simple programs which just want
34 to translate names to addresses, look up MX records, etc.
36 <li>It can be used in an asynchronous, non-blocking, manner. Many
37 queries can be handled simultaneously.
39 <li>Responses are decoded automatically into a natural representation
40 for a C program - there is no need to deal with DNS packet formats.
42 <li>Sanity checking (eg, name syntax checking, reverse/forward
43 correspondence, CNAME pointing to CNAME) is performed automatically.
45 <li>Time-to-live, CNAME and other similar information is returned in
46 an easy-to-use form, without getting in the way.
48 <li>There is no global state in the library; resolver state is an
49 opaque data structure which the client creates explicitly. A program
50 can have several instances of the resolver.
52 <li>Errors are reported to the application in a way that distinguishes
53 the various causes of failure properly.
55 <li>Understands conventional resolv.conf, but this can overridden by
56 environment variables.
58 <li>Flexibility. For example, the application can tell adns to:
59 ignore environment variables (for setuid programs), disable hostname
60 syntax sanity checks to return arbitrary data, override or ignore
61 resolv.conf in favour of supplied configuration, etc.
63 <li>Believed to be correct ! For example, will correctly back off to
64 TCP in case of long replies or queries, or to other nameservers if
65 several are available. It has sensible handling of bad responses etc.
69 <h2>DNS utility programs</h2>
71 adns also comes with a number of utility programs for use from the
72 command line and in scripts:
76 <li><code>adnslogres</code> is a much faster version of Apache's
79 <li><code>adnsresfilter</code> is a filter which copies its input to
80 its output, replacing IP addresses by the corresponding names, without
81 unduly delaying the output. For example, you can usefully pipe the
82 output of netstat -n, tcpdump -ln, and the like, into it.
84 <li><code>adnshost</code> is a general-purpose DNS lookup utility
85 which can be used easily in from the command line and from shell
86 scripts to do simple lookups. In a more advanced mode it can be used
87 as a general-purpose DNS helper program for scripting languages which
88 can invoke and communicate with subprocesses. See the
89 <A href="http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt">adnshost
90 usage message</A> for a summary of its capabilities.
96 I hope that future versions may also have the following features:
100 <li>The library should be useable by threads in a multithreaded
101 program in a natural way. It should multiplex many threads' queries
102 through a single query socket.
106 <li>Some kind of awareness of DNSSEC.
108 <li>Possibly some very limited caching behaviour.
110 <li>There was, at one point, a draft native Perl interface from Tony Finch.
114 <h2>Documentation</h2>
116 I'm afraid there is no manual yet. However, competent C programmers
117 should be able to use the library based on the
118 <A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">commented
119 adns.h header file</A>, and the usage messages for the programs should
124 I'd be pleased if you would let me know if you're using my library in
125 your project, and what you think of it.
129 If you are subscribed to <code>adns-discuss</code> please send
130 feedback, including bug reports, there; otherwise send mail to
131 <code>adns-bugreports@chiark.greenend.org.uk</code>. If you'd prefer
132 that your message wasn't forwarded to the <code>adns-bugreports</code>
133 list, send it to <code>adns-maint@chiark.greenend.org.uk</code>.
135 <h2>Mailinglists</h2>
137 I have set up mailinglists <code>adns-announce</code> and
138 <code>adns-discuss</code>. The announcements list is moderated and
139 will contain only announcements of important bugs, new versions, etc.
140 The bug reports address mentioned above is also a mailing list; feel
141 free to subscribe to it.
146 <A href="http://www.chiark.greenend.org.uk/mailman/listinfo">archives
147 and subscription web pages</A>, or you can subscribe by sending mail
148 containing the word `subscribe' to
149 <code>adns-announce-REQUEST@chiark.greenend.org.uk</code> or
150 <code>adns-discuss-REQUEST@chiark.greenend.org.uk</code>.
154 Available for download from
155 <A href="http://www.chiark.greenend.org.uk/~ian/adns/">chiark.greenend.org.uk</A>
158 <li>The <A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz">current
159 release</A> as a gzipped tarfile.
160 <li><A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">adns.h</A>
161 API header file with comments, and
162 <A href="http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt">usage
163 message for adnshost</A> (currently there is no manual, sorry).
164 <li>All versions released so far are also available via
165 <A href="ftp://ftp.chiark.greenend.org.uk/users/ian/adns/">anonymous
166 FTP</A> and <A href="http://www.chiark.greenend.org.uk/~ian/adns/ftp/">HTTP</A>.
169 You can also access the project CVS repositories:
171 <li>A mirror of the source code repository is available via rsync from
172 <code>rsync.chiark.greenend.org.uk::ftp/users/ian/cvs-pub/adns</code>
173 (use FTP first to find your way around), or via
174 <A href="http://www.chiark.greenend.org.uk/ucgi/~ijackson/cvsweb/adns/">cvsweb</A>.
175 <li>This web page is maintained in
176 <A href="http://savannah.gnu.org/">Savannah</A>,
177 where you can browse the
178 <A href="http://savannah.gnu.org/cgi-bin/viewcvs/software/adns/?cvsroot=www.gnu.org">webpage CVS</A>.
181 adns is also available from the
182 <A href="http://www.gnu.org/">GNU Project</A> FTP servers and their
183 <A href="http://www.gnu.org/order/ftp.html">mirrors</A>.
185 <h2>Technical note</h2>
187 adns requires a real nameserver like
188 <A href="http://www.isc.org/view.cgi?/products/BIND/index.phtml">BIND</A>
190 <A href="http://www.dents.org/">Dents</A> running on
191 the same system or a nearby one, which must be willing to provide
192 `recursive service'. I.e., adns is a `stub resolver'. All properly
193 configured UN*X and GNU systems will already have such nameserver(s);
194 they are usually listed in /etc/resolv.conf.
196 <h2>References and related projects</h2>
198 * <a href="http://cryp.to/hsdns/">Haskell bindings</a>
200 * <a href="http://adns.jgaa.com/">port to MS Visual Studio 6 C++</a>
203 <h2>Copyright and licensing</h2>
205 <kbd>adns</kbd> is Copyright 1997-2005 Ian Jackson, Copyright
206 1999-2004 Tony Finch, and Copyright (C) 1991 Massachusetts Institute
211 <kbd>adns</kbd> is free software; you can redistribute it and/or modify
212 it under the terms of the GNU General Public License as published by
213 the Free Software Foundation; either version 2 of the License, or (at
214 your option) any later version.
218 This program and documentation is distributed in the hope that it will
219 be useful, but <em>without any warranty</em>; without even the implied
220 warranty of <em>merchantability</em> or <em>fitness for a particular
221 purpose</em>. See the
222 <A href="http://www.chiark.greenend.org.uk/~ian/COPYING.txt">GNU
223 General Public License</A> for more details.
227 You should have received a copy of the GNU General Public License
228 along with <kbd>adns</kbd>, or one should be available above; if not,
230 <A href="http://www.fsf.org/">Free Software Foundation</A>,
231 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
232 or email <code>adns-maint@chiark.greenend.org.uk</code>.
237 <A href="http://www.chiark.greenend.org.uk/">Ian Jackson</A> /
238 <A href="mailto:adns-maint@chiark.greenend.org.uk"><tt>adns-maint@chiark.greenend.org.uk</tt></A>;
239 more <A href="http://www.chiark.greenend.org.uk/~ian/software/">free
243 <A href="http://www.gnu.org/">GNU home page</A>;
244 <A href="http://www.chiark.greenend.org.uk/">chiark home page</A>;
245 <A href="/">site or mirror home page</A>
248 This web page is Copyright (C)1996-2005 Ian Jackson. See the
249 <A href="http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html">Copyright/acknowledgements</A>.
253 <A href="http://www.anybrowser.org/campaign/">Campaign for a non-browser-specific WWW</A>