Scroll to navigation

ADNSHOST(1) User Commands ADNSHOST(1)

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
Read queries on stdin instead of using args
-a --asynch
Allow answers to be reordered

answer/error output format and destination (see below):

Answers to stdout, errors as messages to stderr (default)
Answers and errors both to stdout in parseable format
Fully-parseable output format (default for --asynch)

global verbosity level:

Do not print anything to stderr
Report unexpected kinds of problem only (default)
Debugging mode
Do not do for-developer consistency checks
Do for-developer consistency checks
Do for-developer consistency checks very often

other global options:

Configuration to use instead of /etc/resolv.conf
Print version number
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:

Use the search list
Let query domains contain quote-requiring chars
Let hostnames in answers contain ...
+Qc --no-qc-cname
Prevent CNAME target domains from containing ...
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):

Show the TTL as a TTL
Show the TTL as a time_t when the data might expire
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:

Call it an error if a CNAME is found
Allow references to CNAMEs in other RRs
CNAME ok for query domain, but not in RRs (default)

asynchronous/pipe mode options:

Set <id>, default is decimal sequence starting 0
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):

soa ptr mx rp srv addr - enhanced versions
hinfo txt - types with only one version
aaaa ns- soa- ptr- mx- rp- srv- - _raw versions
- `unknown' type, RFC3597

Default is addr, or ptr for -i/--ptr queries

COPYRIGHT

Copyright © 1997-2000,2003,2006,2014-2016,2020 Ian Jackson
Copyright © 2014 Mark Wooding
Copyright © 1999-2000,2003,2006 Tony Finch
Copyright © 1991 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

August 2020 GNU adns 1.6.0