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