+ * Documentation improved somewhat, including new GPL-vs-LGPL file.
[adns] / README.html
CommitLineData
630bf698 1<html><head><title>adns - advanced, alternative, asynchronous resolver</title>
2<!--
8e5a4960 3 Note: this file is maintained in Ian Jackson's private CVS.
630bf698 4
8e5a4960 5 It is served on the GNU site and also from my own system, under the
6 URL http://www.chiark.greenend.org.uk/adns/ Please ensure that all
7 links continine to be correct both for www.gnu.org and chiark.
630bf698 8
9 $Id$
10 -->
11<link rev="made" href="mailto:adns-maint@chiark.greenend.org.uk">
12</head>
13<body>
14<h1>GNU adns</h1>
15
16<strong>Advanced, easy to use, asynchronous-capable DNS client
17library and utilities.</strong>
18
19<p>
20
8e5a4960 21adns is a resolver library for C (and C++) programs, and a collection
22of useful DNS resolver utilities. In contrast with the existing
23interfaces, gethostbyname et al and libresolv, it has the following
24features:
630bf698 25
26<ul>
27
28<li>It is reasonably easy to use for simple programs which just want
29to translate names to addresses, look up MX records, etc.
30
31<li>It can be used in an asynchronous, non-blocking, manner. Many
32queries can be handled simultaneously.
33
34<li>Responses are decoded automatically into a natural representation
35for a C program - there is no need to deal with DNS packet formats.
36
37<li>Sanity checking (eg, name syntax checking, reverse/forward
38correspondence, CNAME pointing to CNAME) is performed automatically.
39
40<li>Time-to-live, CNAME and other similar information is returned in
41an easy-to-use form, without getting in the way.
42
43<li>There is no global state in the library; resolver state is an
44opaque data structure which the client creates explicitly. A program
45can have several instances of the resolver.
46
47<li>Errors are reported to the application in a way that distinguishes
48the various causes of failure properly.
49
50<li>Understands conventional resolv.conf, but this can overridden by
51environment variables.
52
53<li>Flexibility. For example, the application can tell adns to:
8e5a4960 54ignore environment variables (for setuid programs), disable hostname
55syntax sanity checks to return arbitrary data, override or ignore
56resolv.conf in favour of supplied configuration, etc.
630bf698 57
58<li>Believed to be correct ! For example, will correctly back off to
59TCP in case of long replies or queries, or to other nameservers if
60several are available. It has sensible handling of bad responses etc.
61
62</ul>
63
8e5a4960 64<h2>DNS utility programs</h2>
65
630bf698 66adns also comes with a number of utility programs for use from the
67command line and in scripts:
68
69<ul>
70
71<li><code>adnslogres</code> is a much faster version of Apache's
72logresolv program.
73
74<li><code>adnsresfilter</code> is a filter which copies its input to
75its output, replacing IP addresses by the corresponding names, without
76unduly delaying the output. For example, you can usefully pipe the
77output of netstat -n, tcpdump -ln, and the like, into it.
78
79<li><code>adnshost</code> is a general-purpose DNS lookup utility
8e5a4960 80which can be used easily in from the command line and from shell
81scripts to do simple lookups. In a more advanced mode it can be used
82as a general-purpose DNS helper program for scripting languages which
83can invoke and communicate with subprocesses. See the
84<A href="http://www.chiark.greenend.org.uk/~ian/adns/usage/adnsresfilter_usage.text">usage
85message</A> for a summary of its capabilities.
630bf698 86
87</ul>
88
8e5a4960 89<h2>Technical note</h2>
630bf698 90
8e5a4960 91adns requires a real nameserver like
630bf698 92<A href="http://www.isc.org/view.cgi?/products/BIND/index.phtml">BIND</A>
93or
94<A href="http://www.dents.org/">Dents</A> running on
95the same system or a nearby one, which must be willing to provide
96`recursive service'. I.e., adns is a `stub resolver'. All properly
97configured UN*X and GNU systems will already have such nameserver(s);
8e5a4960 98they are usually listed in /etc/resolv.conf.
630bf698 99
100<h2>Documentation</h2>
101
102I'm afraid there is no manual yet. However, competent C programmers
103should be able to use the library based on the
104<A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">commented
8e5a4960 105adns.h header file</A>, and the usage messages for the programs should
106be sufficient.
630bf698 107
108<h2>Feedback</h2>
109
110I'd be pleased if you would let me know if you're using my library in
111your project, and what you think of it.
112
113<p>
114
115If you are subscribed to <code>adns-discuss</code> please send
116feedback, including bug reports, there; otherwise send mail to
117<code>adns-bugreports@chiark.greenend.org.uk</code>. If you'd prefer
118that your message wasn't forwarded to the <code>adns-bugreports</code>
119list, send it to <code>adns-maint@chiark.greenend.org.uk</code>.
120
121<h2>Mailinglists</h2>
122
123I have set up mailinglists <code>adns-announce</code> and
124<code>adns-discuss</code>. The announcements list is moderated and
125will contain only announcements of important bugs, new versions, &c.
126The bug reports address mentioned above is also a mailing list; feel
127free to subscribe to it.
128
129<p>
130
131There are
132<A href="http://www.chiark.greenend.org.uk/mailman/listinfo">archives
133and subscription web pages</A>, or you can subscribe by sending mail
134containing the word `subscribe' to
135<code>adns-announce-REQUEST@chiark.greenend.org.uk</code> or
136<code>adns-discuss-REQUEST@chiark.greenend.org.uk</code>.
137
138<h2>Download</h2>
139
140Available for download from
141<A href="http://www.chiark.greenend.org.uk/~ian/adns/">chiark.greenend.org.uk</A>
142are:
143<ul>
144<li>The <A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz">current beta version</A>
145 as a gzipped tarfile.
146<li><A href="http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt">adns.h</A>
147 API header file with comments (currently there is no manual, sorry).
148<li>All versions released so far are also available via
149 <A href="ftp://ftp.chiark.greenend.org.uk/users/ian/adns/">anonymous
150 FTP</A>.
151<li>A mirror of my CVS repository is available via rsync from
152 <code>rsync.chiark.greenend.org.uk::ftp/users/ian/cvs-pub/adns</code>
153 (use FTP first to find your way around), or via
154 <A href="http://www.chiark.greenend.org.uk/ucgi/~ijackson/cvsweb/adns/">cvsweb</A>.
155</ul>
156
157adns is also available from the
158<A href="http://www.gnu.org/">GNU Project</A> FTP servers and their
159<A href="http://www.gnu.org/order/ftp.html">mirrors</A>.
160
161<h2>Copyright and licensing</h2>
162
163<kbd>adns</kbd> is Copyright 1997-2000 Ian Jackson, Copyright 1999
164Tony Finch, and Copyright (C) 1991 Massachusetts Institute of
165Technology.
166
167<p>
168
169<kbd>adns</kbd> is free software; you can redistribute it and/or modify
170it under the terms of the GNU General Public License as published by
171the Free Software Foundation; either version 2 of the License, or (at
172your option) any later version.
173
174<p>
175
176This program and documentation is distributed in the hope that it will
177be useful, but <em>without any warranty</em>; without even the implied
178warranty of <em>merchantability</em> or <em>fitness for a particular
179purpose</em>. See the
180<A href="http://www.chiark.greenend.org.uk/~ian/COPYING.txt">GNU
181General Public License</A> for more details.
182
183<p>
184
185You should have received a copy of the GNU General Public License
186along with <kbd>adns</kbd>, or one should be available above; if not,
187write to the
188<A href="http://www.fsf.org/">Free Software Foundation</A>,
18959 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
190or email <code>adns-maint@chiark.greenend.org.uk</code>.
191
192<p>
193
194<hr>
195<A href="http://www.chiark.greenend.org.uk/">Ian Jackson</A> /
196<A href="mailto:adns-maint@chiark.greenend.org.uk"><tt>adns-maint@chiark.greenend.org.uk</tt></A>;
197more <A href="http://www.chiark.greenend.org.uk/~ian/software/">free
198software</A> by me.
199<p>
200
201<A href="http://www.gnu.org/">GNU home page</A>;
202<A href="http://www.chiark.greenend.org.uk/">chiark home page</A>;
203<A href="/">site or mirror home page</A>
204<p>
205
206This web page is Copyright (C)1996-2000 Ian Jackson. See the
207<A href="http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html">Copyright/acknowledgements</A>.
208<p>
209
210Use any browser -
211<A href="http://www.anybrowser.org/campaign/">Campaign for a non-browser-specific WWW</A>
212
213</body>
214</html>