static void printusage(void) {
if (fputs
-("usage: adnshost [global-opts] [query-opts] query-type query-domain\n"
- " [[query-opts] [query-type] query-domain ...]\n"
+("usage: adnshost [global-opts] [query-opts] query-domain\n"
+ " [[query-opts] query-domain ...]\n"
" adnshost [global-opts] [query-opts] -f|--pipe\n"
"\n"
"global binary options:\n"
- " +e --no-env No not look at environment variables at all.\n"
+ " +e --no-env Do not look at environment variables at all.\n"
" -f --pipe Read queries on stdin instead of using args.\n"
- " -A --asynch Allow answers to be reordered.\n"
+ " -a --asynch Allow answers to be reordered.\n"
" -0 --null stdin items are delimited by nulls.\n"
"global verbosity level:\n"
- " -vq --quiet Do not print anything to stderr.\n"
- " -vn --no-quiet Report unexpected kinds of problem only.\n"
- " -vd --debug Debugging mode.\n"
+ " -Vq --quiet Do not print anything to stderr.\n"
+ " -Vn --no-quiet Report unexpected kinds of problem only. (default)\n"
+ " -Vd --debug Debugging mode.\n"
"other global options:\n"
" --help, --version Print usage or version information.\n"
"\n"
"per-query binary options:\n"
- " -R --search Use the search list.\n"
+ " -s --search Use the search list.\n"
" -Qq --qc-query Let query domains contain quote-requiring chars.\n"
" -Qa --qc-anshost Let hostnames in answers contain ...\n"
" +Qc --no-qc-cname Prevent CNAME target domains from containing ...\n"
" -u --tcp Force use of a virtual circuit.\n"
- " +fo --no-owner Do not display owner name in output.\n"
- " +ft --no-type Do not display RR type in output.\n"
- " +fc --no-show-cname Do not display CNAME target in output.\n"
+ " +Do --no-owner Do not display owner name in output.\n"
+ " +Dt --no-type Do not display RR type in output.\n"
+ " +Dc --no-show-cname Do not display CNAME target in output.\n"
"per-query TTL mode (NB TTL is minimum across whole query reply):\n"
" -Tt --ttl-ttl Show the TTL as a TTL.\n"
" -Ta --ttl-abs Show the TTL as a time_t when the data might expire.\n"
" -Tn --no-ttl Do not show the TTL (default).\n"
"per-query cname handling mode:\n"
- " -cf --cname-reject Call it an error if a CNAME is found.\n"
- " -cl --cname-loose Allow references to CNAMEs in other RRs.\n"
- " -cs --cname-ok CNAME ok for query domain, but not in RRs (default).\n"
+ " -Cf --cname-reject Call it an error if a CNAME is found.\n"
+ " -Cl --cname-loose Allow references to CNAMEs in other RRs.\n"
+ " -Cs --cname-ok CNAME ok for query domain, but not in RRs (default).\n"
+ "query type:\n"
+ " -t<type> } Set the query type (see below).\n"
+ " --type <type> } Default is addr. Not case-sensitive.\n"
"other per-query options:\n"
- " -I<id> ) Set the <id> to print in the output with --async.\n"
- " --asynch-id <id> ) Default is a sequence number in decimal starting at 0.\n"
+ " -i<id> } Set the <id> to print in the output with --async;\n"
+ " --asynch-id <id> } default is a sequence number in decimal starting at 0.\n"
+ " --cancel-id <id> Cancel the query with id <id>.\n"
+ " - <domain> Next argument is a domain, but more options may follow.\n"
"\n"
- "For binary options, --FOO and --no-FOO are opposites,\n"
- "as are -X and +X; in each case the default is the one not listed.\n"
+ "For binary options, --FOO and --no-FOO are opposites, as are\n"
+ "-X and +X. In each case the default is the one not listed.\n"
"Per query options stay set a particular way until they are reset,\n"
"whether they appear on the command line or on stdin.\n"
+ "All global options must preceed the first query domain.\n"
"\n"
"Output format is master file format without class or TTL by default:\n"
" [<owner>] [<ttl>] [<type>] <data>\n"
" 11 usage problems\n"
"\n"
"Query types (see adns.h):\n"
- " NS SOA PTR MX RP A - enhanced versions\n"
- " CNAME HINFO TXT - types with only one version\n"
- " A- NS- SOA- PTR- MX- RP- - _raw versions\n",
+ " ns soa ptr mx rp addr - enhanced versions\n"
+ " cname hinfo txt - types with only one version\n"
+ " a ns- soa- ptr- mx- rp- - _raw versions\n",
stdout) == EOF) sysfail("write usage message",errno);
}