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