2001-01-08 16:51:55 +01:00
|
|
|
adns is a DNS resolver library and a collection of utilities that use the
|
|
|
|
library. The adns library has the following features:
|
|
|
|
* It is reasonably easy to use for simple programs which just want to
|
2003-05-06 19:40:18 +02:00
|
|
|
translate names to addresses, look up MX records, etc.
|
2001-01-08 16:51:55 +01:00
|
|
|
* It can be used in an asynchronous, non-blocking, manner. Many
|
2003-05-06 19:40:18 +02:00
|
|
|
queries can be handled simultaneously.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Responses are decoded automatically into a natural representation
|
2003-05-06 19:40:18 +02:00
|
|
|
for a C program - there is no need to deal with DNS packet formats.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Sanity checking (eg, name syntax checking, reverse/forward
|
2003-05-06 19:40:18 +02:00
|
|
|
correspondence, CNAME pointing to CNAME) is performed automatically.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Time-to-live, CNAME and other similar information is returned in an
|
2003-05-06 19:40:18 +02:00
|
|
|
easy-to-use form, without getting in the way.
|
2001-01-08 16:51:55 +01:00
|
|
|
* There is no global state in the library; resolver state is an
|
|
|
|
opaque data structure which the client creates explicitly. A
|
2003-05-06 19:40:18 +02:00
|
|
|
program can have several instances of the resolver.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Errors are reported to the application in a way that distinguishes
|
2003-05-06 19:40:18 +02:00
|
|
|
the various causes of failure properly.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Understands conventional resolv.conf, but this can overridden by
|
2003-05-06 19:40:18 +02:00
|
|
|
environment variables.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Flexibility. For example, the application can tell adns to: ignore
|
|
|
|
environment variables (for setuid programs), disable hostname
|
|
|
|
syntax sanity checks to return arbitrary data, override or ignore
|
2003-05-06 19:40:18 +02:00
|
|
|
resolv.conf in favour of supplied configuration, etc.
|
2001-01-08 16:51:55 +01:00
|
|
|
* Believed to be correct ! For example, will correctly back off to
|
|
|
|
TCP in case of long replies or queries, or to other nameservers if
|
2003-05-06 19:40:18 +02:00
|
|
|
several are available. It has sensible handling of bad responses etc.
|