chiark / gitweb /
SERVFAIL is definitely not conclusive. Eg, recursive server is supposedly slave...
[adns] / README
CommitLineData
44d8654a 1
88eae90a 2 GNU adns
b1098573 3
2e036093 4 Advanced, easy to use, asynchronous-capable DNS client library and
5 utilities.
b1098573 6
aa958273 7 adns is a resolver library for C (and C++) programs, and a collection
4b84c25d 8 of useful DNS resolver utilities.
b1098573 9
4b84c25d 10C library
11
12 In contrast with the standard interfaces, gethostbyname et al and
13 libresolv, it has the following features:
44d8654a 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
4f3f9880 25 an easy-to-use form, without getting in the way.
44d8654a 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
aa958273 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.
44d8654a 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.
b1098573 41
aa958273 42DNS utility programs
43
2e036093 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
aa958273 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
9a42a2c4 55 can invoke and communicate with subprocesses. See the [1]adnshost
56 usage message for a summary of its capabilities.
b1098573 57
40180701 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.
69
a2638561 70Documentation
71
72 I'm afraid there is no manual yet. However, competent C programmers
9a42a2c4 73 should be able to use the library based on the [2]commented adns.h
aa958273 74 header file, and the usage messages for the programs should be
75 sufficient.
b1098573 76
4f3f9880 77Feedback
78
0db612f3 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.
b1098573 81
0db612f3 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
aa958273 86 adns-maint@chiark.greenend.org.uk.
b1098573 87
4f3f9880 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
9a42a2c4 92 important bugs, new versions, etc. The bug reports address mentioned
4f3f9880 93 above is also a mailing list; feel free to subscribe to it.
b1098573 94
9a42a2c4 95 There are [3]archives and subscription web pages, or you can subscribe
4f3f9880 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.
b1098573 99
4f3f9880 100Download
101
9a42a2c4 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
4b84c25d 105 adnshost (currently there is no manual, sorry).
9a42a2c4 106 * All versions released so far are also available via [8]anonymous
40180701 107 FTP and [9]HTTP.
108
109 You can also access the project CVS repositories:
110 * A mirror of the source code repository is available via rsync from
88eae90a 111 rsync.chiark.greenend.org.uk::ftp/users/ian/cvs-pub/adns (use FTP
9a42a2c4 112 first to find your way around), or via [10]cvsweb.
40180701 113 * This web page is maintained in [11]Savannah, where you can browse
114 the [12]webpage CVS.
b1098573 115
40180701 116 adns is also available from the [13]GNU Project FTP servers and their
117 [14]mirrors.
b1098573 118
9a42a2c4 119Technical note
120
40180701 121 adns requires a real nameserver like [15]BIND or [16]Dents running on
9a42a2c4 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.
b1098573 126
127References and related projects
128
c050daf2 129 * [17]Haskell bindings by Peter Simons. * [18]port to MS Visual Studio
130 6 C++ by Jarle Aase.
b1098573 131
4f3f9880 132Copyright and licensing
133
e1bae008 134 adns is Copyright 1997-2005 Ian Jackson, Copyright 1999-2004 Tony
4b84c25d 135 Finch, and Copyright (C) 1991 Massachusetts Institute of Technology.
b1098573 136
4f3f9880 137 adns is free software; you can redistribute it and/or modify it under
138 the terms of the GNU General Public License as published by the Free
139 Software Foundation; either version 2 of the License, or (at your
140 option) any later version.
b1098573 141
4f3f9880 142 This program and documentation is distributed in the hope that it will
143 be useful, but without any warranty; without even the implied warranty
a2638561 144 of merchantability or fitness for a particular purpose. See the
c050daf2 145 [19]GNU General Public License for more details.
b1098573 146
4f3f9880 147 You should have received a copy of the GNU General Public License
148 along with adns, or one should be available above; if not, write to
c050daf2 149 the [20]Free Software Foundation, 59 Temple Place - Suite 330, Boston,
4f3f9880 150 MA 02111-1307, USA, or email adns-maint@chiark.greenend.org.uk.
151 _________________________________________________________________
b1098573 152
c050daf2 153 [21]Ian Jackson / [22]adns-maint@chiark.greenend.org.uk; more [23]free
4f3f9880 154 software by me.
b1098573 155
c050daf2 156 [24]GNU home page; [25]chiark home page; [26]site or mirror home page
b1098573 157
e1bae008 158 This web page is Copyright (C)1996-2005 Ian Jackson. See the
c050daf2 159 [27]Copyright/acknowledgements.
b1098573 160
c050daf2 161 Use any browser - [28]Campaign for a non-browser-specific WWW
4f3f9880 162
163References
164
9a42a2c4 165 1. http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt
166 2. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt
167 3. http://www.chiark.greenend.org.uk/mailman/listinfo
168 4. http://www.chiark.greenend.org.uk/~ian/adns/
169 5. http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz
170 6. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt
8a5e5147 171 7. http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt
9a42a2c4 172 8. ftp://ftp.chiark.greenend.org.uk/users/ian/adns/
abf5f52c 173 9. http://www.chiark.greenend.org.uk/~ian/adns/ftp/
9a42a2c4 174 10. http://www.chiark.greenend.org.uk/ucgi/~ijackson/cvsweb/adns/
40180701 175 11. http://savannah.gnu.org/
176 12. http://savannah.gnu.org/cgi-bin/viewcvs/software/adns/?cvsroot=www.gnu.org
177 13. http://www.gnu.org/
178 14. http://www.gnu.org/order/ftp.html
179 15. http://www.isc.org/view.cgi?/products/BIND/index.phtml
180 16. http://www.dents.org/
c050daf2 181 17. http://cryp.to/hsdns/
182 18. http://adns.jgaa.com/
183 19. http://www.chiark.greenend.org.uk/~ian/COPYING.txt
184 20. http://www.fsf.org/
185 21. http://www.chiark.greenend.org.uk/
186 22. mailto:adns-maint@chiark.greenend.org.uk
187 23. http://www.chiark.greenend.org.uk/~ian/software/
188 24. http://www.gnu.org/
189 25. http://www.chiark.greenend.org.uk/
190 26. file://localhost/
191 27. http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html
192 28. http://www.anybrowser.org/campaign/