adnshost1
Asynchronous-capable dns client utilities
Overview
usage: adnshost [global-opts] [query-opts] query-domain
|
[[query-opts] query-domain ...] |
|
|
adnshost [global-opts] [query-opts] |
global binary options:
- +e
--no-env -
Do not look at environment variables at all
-
-f --pipe -
Read queries on stdin instead of using args
-
-a --asynch -
Allow answers to be reordered
answer/error output format and destination (see below):
-
-Fs --fmt-simple -
Answers to stdout, errors as messages to stderr (default)
-
-Fi --fmt-inline -
Answers and errors both to stdout in parseable format
-
-Fa --fmt-asynch -
Fully-parseable output format (default for
--asynch)
global verbosity level:
-
-Vq --quiet -
Do not print anything to stderr
-
-Vn --no-quiet -
Report unexpected kinds of problem only (default)
-
-Vd --debug -
Debugging mode
-
--no-checkc -
Do not do for-developer consistency checks
-
--checkc -
Do for-developer consistency checks
-
--checkc-freq -
Do for-developer consistency checks very often
other global options:
-
--config <<config-text>> -
Configuration to use instead of /etc/resolv.conf
-
--version -
Print version number
-
--help -
Print usage information
per-query options:
|
Query type (see below) |
|---|---|
|
Do reverse query (address -> name lookup) |
|
Lookup in in-addr-like `zone' (eg MAPS RBL) |
per-query binary options:
-
-s --search -
Use the search list
-
-Qq --qc-query -
Let query domains contain quote-requiring chars
-
-Qa --qc-anshost -
Let hostnames in answers contain ...
- +Qc
--no-qc-cname -
Prevent CNAME target domains from containing ...
-
-u --tcp -
Force use of a virtual circuit
+Do
|
Do not display owner name in output |
|---|---|
+Dt
|
Do not display RR type in output |
+Dc
|
Do not display CNAME target in output |
per-query TTL mode (NB TTL is minimum across all info in reply):
-
-Tt --ttl-ttl -
Show the TTL as a TTL
-
-Ta --ttl-abs -
Show the TTL as a time_t when the data might expire
-
-Tn --no-ttl -
Do not show the TTL (default)
per-query address family options (for `addr' etc.):
|
Only return IPv4 addresses |
|---|---|
|
Only return IPv6 addresses |
|
Return all available addresses (default) |
|
Return IPv4 addresses as IPv6-mapped |
per-query CNAME handling mode:
-
-Cf --cname-reject -
Call it an error if a CNAME is found
-
-Cl --cname-loose -
Allow references to CNAMEs in other RRs
-
-Cs --cname-ok -
CNAME ok for query domain, but not in RRs (default)
asynchronous/pipe mode options:
-
--asynch-id <id> -
Set <id>, default is decimal sequence starting 0
-
--cancel-id <id> -
Cancel the query with id <id> (no error if not found)
Escaping domains which might start with `-':
- - <domain>
-
Next argument is a domain, but more options may follow
Query domains should always be quoted according to master file format.
For binary options, --FOO and --no-FOO are opposites, as are -X and +X. In each case the default is the one not listed. Per query options stay set a particular way until they are reset, whether they appear on the command line or on stdin. All global options must preceed the first query domain.
With -f, the input should be lines with either an option, possibly with a value argument (separated from the option by a space if it's a long option), or a domain (possibly preceded by a hyphen and a space to distinguish it from an option).
Output format is master file format without class or TTL by default:
-
[<owner>] [<ttl>] [<type>] <data>
or if the <owner> domain refers to a CNAME and --show-cname is on
-
[<owner>] [<ttl>] CNAME <cname> [<cname>] [<ttl>] <type> <data>
When a query fails you get an error message to stderr (with --fmt-simple). Specify --fmt-inline for lines like this (broken here for readability):
|
; failed <statustype> <statusnum> <statusabbrev> \ |
|
|
[<owner>] [<ttl>] [<cname>] "<status string>" |
If you use --fmt-asynch, which is the default for --asynch, each answer (success or failure) is preceded by a line
|
<id> <nrrs> <statustype> <statusnum> <statusabbrev> \ |
|
|
[<owner>] [<ttl>] [<cname>] "<status string>" |
where <nrrs> is the number of RRs that follow and <cname> will be `$' or the CNAME target; the CNAME indirection and error formats above are not used.
Exit status:
0
|
all went well |
|---|---|
1-6
|
at least one query failed with statustype: |
1
|
localfail ) |
2
|
remotefail ) temporary errors |
3
|
tempfail __)_________________ |
4
|
misconfig ) |
5
|
misquery ) permanent errors |
6
|
permfail ) |
10
|
system trouble |
11
|
usage problems |
Query types (see adns.h; default is addr):
ns
|
soa ptr mx rp srv addr - enhanced versions |
|---|---|
cname
|
hinfo txt - types with only one version |
a
|
aaaa ns- soa- ptr- mx- rp- srv- - _raw versions |
type<number>
|
- `unknown' type, RFC3597 |
Default is addr, or ptr for -i/--ptr queries
Releases
3 releases since Debian 11 (Bullseye); the text changed 1 time.