NAME
adnshost - Asynchronous-capable DNS client utilities
DESCRIPTION
usage: adnshost [global-opts] [query-opts] query-domain
-
[[query-opts] query-domain ...]
-
adnshost [global-opts] [query-opts] -f|--pipe
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:
- -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-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 --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-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.):
- -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-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
COPYRIGHT
Copyright Ian Jackson and contributors
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.