chiark / gitweb /
update DISTVERSION
[adns] / README.html
CommitLineData
eb448142 1<html><head><title>adns - advanced, alternative, asynchronous resolver</title>
54aca965 2<link rev="made" href="mailto:adns-maint@chiark.greenend.org.uk">
40180701 3<meta name="keywords" content="adns">
54aca965 4</head>
5<body>
6<h1>GNU adns</h1>
7
8<strong>Advanced, easy to use, asynchronous-capable DNS client
9library and utilities.</strong>
10
eb448142 11<!-- Note: this file must contain portable HTML ! -->
4b84c25d 12<!-- -->
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. -->
17<!-- -->
39f45e7e 18<!-- $Id: README.html,v 1.12 2006/04/08 14:36:57 ian Exp $ -->
4b84c25d 19
54aca965 20<p>
21
aa958273 22adns is a resolver library for C (and C++) programs, and a collection
4b84c25d 23of useful DNS resolver utilities.
24
25
26<h2>C library</h2>
27
28In contrast with the standard interfaces, gethostbyname et al and
29libresolv, it has the following features:
54aca965 30
31<ul>
32
33<li>It is reasonably easy to use for simple programs which just want
34to translate names to addresses, look up MX records, etc.
35
36<li>It can be used in an asynchronous, non-blocking, manner. Many
37queries can be handled simultaneously.
38
39<li>Responses are decoded automatically into a natural representation
40for a C program - there is no need to deal with DNS packet formats.
41
42<li>Sanity checking (eg, name syntax checking, reverse/forward
43correspondence, CNAME pointing to CNAME) is performed automatically.
44
45<li>Time-to-live, CNAME and other similar information is returned in
46an easy-to-use form, without getting in the way.
47
48<li>There is no global state in the library; resolver state is an
49opaque data structure which the client creates explicitly. A program
50can have several instances of the resolver.
51
52<li>Errors are reported to the application in a way that distinguishes
53the various causes of failure properly.
54
55<li>Understands conventional resolv.conf, but this can overridden by
56environment variables.
57
58<li>Flexibility. For example, the application can tell adns to:
aa958273 59ignore environment variables (for setuid programs), disable hostname
60syntax sanity checks to return arbitrary data, override or ignore
61resolv.conf in favour of supplied configuration, etc.
54aca965 62
63<li>Believed to be correct ! For example, will correctly back off to
64TCP in case of long replies or queries, or to other nameservers if
65several are available. It has sensible handling of bad responses etc.
66
67</ul>
68
aa958273 69<h2>DNS utility programs</h2>
70
54aca965 71adns also comes with a number of utility programs for use from the
72command line and in scripts:
73
74<ul>
75
76<li><code>adnslogres</code> is a much faster version of Apache's
77logresolv program.
78
79<li><code>adnsresfilter</code> is a filter which copies its input to
80its output, replacing IP addresses by the corresponding names, without
81unduly delaying the output. For example, you can usefully pipe the
82output of netstat -n, tcpdump -ln, and the like, into it.
83
84<li><code>adnshost</code> is a general-purpose DNS lookup utility
aa958273 85which can be used easily in from the command line and from shell
86scripts to do simple lookups. In a more advanced mode it can be used
87as a general-purpose DNS helper program for scripting languages which
88can invoke and communicate with subprocesses. See the
4b84c25d 89<A href="http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt">adnshost
90usage message</A> for a summary of its capabilities.
54aca965 91
92</ul>
93
eb448142 94<h2>Forthcoming:</h2>
95
96I hope that future versions may also have the following features:
97
98<ul>
99
100<li>The library should be useable by threads in a multithreaded
101program in a natural way. It should multiplex many threads' queries
102through a single query socket.
103
104<li>IPv6 support.
105
106<li>Some kind of awareness of DNSSEC.
107
108<li>Possibly some very limited caching behaviour.
109
110<li>There was, at one point, a draft native Perl interface from Tony Finch.
111
112</ul>
113
54aca965 114<h2>Documentation</h2>
115
116I'm afraid there is no manual yet. However, competent C programmers
117should be able to use the library based on the
118<A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">commented
aa958273 119adns.h header file</A>, and the usage messages for the programs should
120be sufficient.
54aca965 121
122<h2>Feedback</h2>
123
124I'd be pleased if you would let me know if you're using my library in
125your project, and what you think of it.
126
127<p>
128
129If you are subscribed to <code>adns-discuss</code> please send
130feedback, including bug reports, there; otherwise send mail to
131<code>adns-bugreports@chiark.greenend.org.uk</code>. If you'd prefer
132that your message wasn't forwarded to the <code>adns-bugreports</code>
133list, send it to <code>adns-maint@chiark.greenend.org.uk</code>.
134
135<h2>Mailinglists</h2>
136
137I have set up mailinglists <code>adns-announce</code> and
138<code>adns-discuss</code>. The announcements list is moderated and
4b84c25d 139will contain only announcements of important bugs, new versions, etc.
54aca965 140The bug reports address mentioned above is also a mailing list; feel
141free to subscribe to it.
142
143<p>
144
145There are
146<A href="http://www.chiark.greenend.org.uk/mailman/listinfo">archives
147and subscription web pages</A>, or you can subscribe by sending mail
148containing 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>.
151
152<h2>Download</h2>
153
154Available for download from
155<A href="http://www.chiark.greenend.org.uk/~ian/adns/">chiark.greenend.org.uk</A>
156are:
157<ul>
4b84c25d 158<li>The <A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz">current
159 release</A> as a gzipped tarfile.
54aca965 160<li><A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">adns.h</A>
4b84c25d 161 API header file with comments, and
8a5e5147 162 <A href="http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt">usage
4b84c25d 163 message for adnshost</A> (currently there is no manual, sorry).
54aca965 164<li>All versions released so far are also available via
165 <A href="ftp://ftp.chiark.greenend.org.uk/users/ian/adns/">anonymous
40180701 166 FTP</A> and <A href="http://www.chiark.greenend.org.uk/~ian/adns/ftp/">HTTP</A>.
54aca965 167</ul>
168
eb448142 169You can also access the project CVS repositories:
170<ul>
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>.
179</ul>
180
54aca965 181adns 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>.
184
4b84c25d 185<h2>Technical note</h2>
186
187adns requires a real nameserver like
188<A href="http://www.isc.org/view.cgi?/products/BIND/index.phtml">BIND</A>
189or
190<A href="http://www.dents.org/">Dents</A> running on
191the same system or a nearby one, which must be willing to provide
192`recursive service'. I.e., adns is a `stub resolver'. All properly
193configured UN*X and GNU systems will already have such nameserver(s);
194they are usually listed in /etc/resolv.conf.
195
dd8cb6ac 196<h2>References and related projects</h2>
197
b8ebc098 198<ul>
199<li><a href="http://dustman.net/andy/python/adns-python">Python bindings</a>
200 by Andy Dustman.
201<li><a href="http://cryp.to/hsdns/">Haskell bindings</a>
c050daf2 202 by Peter Simons.
b8ebc098 203<li><a href="http://liboop.ofb.net/ref">liboop event loop library</a>
204 (by Dan Egnor) has a built-in binding for adns.
205<li><a href="http://adns.jgaa.com/">port to MS Visual Studio 6 C++</a>
c050daf2 206 by Jarle Aase.
b8ebc098 207</ul>
dd8cb6ac 208
54aca965 209<h2>Copyright and licensing</h2>
210
39f45e7e 211<kbd>adns</kbd> is Copyright 1997-2000,2003,2006 Ian Jackson,
212Copyright 1999-2000,2003,2006 Tony Finch, and Copyright (C) 1991
213Massachusetts Institute of Technology.
54aca965 214
215<p>
216
217<kbd>adns</kbd> is free software; you can redistribute it and/or modify
218it under the terms of the GNU General Public License as published by
219the Free Software Foundation; either version 2 of the License, or (at
220your option) any later version.
221
222<p>
223
224This program and documentation is distributed in the hope that it will
225be useful, but <em>without any warranty</em>; without even the implied
226warranty of <em>merchantability</em> or <em>fitness for a particular
227purpose</em>. See the
228<A href="http://www.chiark.greenend.org.uk/~ian/COPYING.txt">GNU
229General Public License</A> for more details.
230
231<p>
232
233You should have received a copy of the GNU General Public License
234along with <kbd>adns</kbd>, or one should be available above; if not,
235write to the
236<A href="http://www.fsf.org/">Free Software Foundation</A>,
23759 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
238or email <code>adns-maint@chiark.greenend.org.uk</code>.
239
240<p>
241
242<hr>
243<A href="http://www.chiark.greenend.org.uk/">Ian Jackson</A> /
244<A href="mailto:adns-maint@chiark.greenend.org.uk"><tt>adns-maint@chiark.greenend.org.uk</tt></A>;
245more <A href="http://www.chiark.greenend.org.uk/~ian/software/">free
246software</A> by me.
247<p>
248
249<A href="http://www.gnu.org/">GNU home page</A>;
250<A href="http://www.chiark.greenend.org.uk/">chiark home page</A>;
251<A href="/">site or mirror home page</A>
252<p>
253
e1bae008 254This web page is Copyright (C)1996-2005 Ian Jackson. See the
54aca965 255<A href="http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html">Copyright/acknowledgements</A>.
256<p>
257
258Use any browser -
259<A href="http://www.anybrowser.org/campaign/">Campaign for a non-browser-specific WWW</A>
260
261</body>
262</html>