usage: adnshost [global-opts] [query-opts] query-domain
[[query-opts] query-domain ...]
adnshost [global-opts] [query-opts] -f|--pipe
globalbinaryoptions:
+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/erroroutputformatanddestination(seebelow):-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)
globalverbositylevel:-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
otherglobaloptions:--config <<config-text>>
Configuration to use instead of /etc/resolv.conf--version
Print version number
--help Print usage information
per-queryoptions:-t<type> / --type <type>
Query type (see below)
-i<addr> / --ptr <addr>
Do reverse query (address -> name lookup)
--reverse <addr> <zone>
Lookup in in-addr-like `zone' (eg MAPS RBL)
per-querybinaryoptions:-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 --no-show-owner
Do not display owner name in output
+Dt --no-show-type
Do not display RR type in output
+Dc --no-show-cname
Do not display CNAME target in output
per-queryTTLmode(NBTTLisminimumacrossallinfoinreply):-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-queryaddressfamilyoptions(for`addr'etc.):-A4----addr-ipv4-only
Only return IPv4 addresses
-A6----addr-ipv6-only
Only return IPv6 addresses
-Aa----addr-all
Return all available addresses (default)
-Am----addr-ipv6-mapped
Return IPv4 addresses as IPv6-mapped
per-queryCNAMEhandlingmode:-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/pipemodeoptions:--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)
Escapingdomainswhichmightstartwith`-':
- <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).
OutputformatismasterfileformatwithoutclassorTTLbydefault:
[<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.
Exitstatus:
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
Querytypes(seeadns.h;defaultisaddr):
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