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