1 adns is a DNS resolver library and a collection of utilities that use the
2 library. The adns library has the following features:
3 * It is reasonably easy to use for simple programs which just want to
4 translate names to addresses, look up MX records, etc.
5 * It can be used in an asynchronous, non-blocking, manner. Many
6 queries can be handled simultaneously.
7 * Responses are decoded automatically into a natural representation
8 for a C program - there is no need to deal with DNS packet formats.
9 * Sanity checking (eg, name syntax checking, reverse/forward
10 correspondence, CNAME pointing to CNAME) is performed automatically.
11 * Time-to-live, CNAME and other similar information is returned in an
12 easy-to-use form, without getting in the way.
13 * There is no global state in the library; resolver state is an
14 opaque data structure which the client creates explicitly. A
15 program can have several instances of the resolver.
16 * Errors are reported to the application in a way that distinguishes
17 the various causes of failure properly.
18 * Understands conventional resolv.conf, but this can overridden by
19 environment variables.
20 * Flexibility. For example, the application can tell adns to: ignore
21 environment variables (for setuid programs), disable hostname
22 syntax sanity checks to return arbitrary data, override or ignore
23 resolv.conf in favour of supplied configuration, etc.