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