diff --git a/CHANGES b/CHANGES index 4b4e411689..b6e48fac63 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,8 @@ 1370. [bug] dig '+[no]recurse' was incorrectly documented. +1263. [contrib] queryperf usage was incomplete. Add '-h' for help. + 1253. [contrib] queryperf now reports a summary of returned rcodes (-c), rcodes are printed in mnemonic form (-v). diff --git a/contrib/queryperf/queryperf.c b/contrib/queryperf/queryperf.c index 739edc5ddc..1092b12554 100644 --- a/contrib/queryperf/queryperf.c +++ b/contrib/queryperf/queryperf.c @@ -18,7 +18,7 @@ /*** *** DNS Query Performance Testing Tool (queryperf.c) *** - *** Version $Id: queryperf.c,v 1.1.1.2.2.3 2003/05/12 03:39:29 marka Exp $ + *** Version $Id: queryperf.c,v 1.1.1.2.2.4 2003/05/12 03:43:03 marka Exp $ *** *** Stephen Jacob ***/ @@ -180,7 +180,7 @@ void show_startup_info(void) { printf("\n" "DNS Query Performance Testing Tool\n" -"Version: $Id: queryperf.c,v 1.1.1.2.2.3 2003/05/12 03:39:29 marka Exp $\n" +"Version: $Id: queryperf.c,v 1.1.1.2.2.4 2003/05/12 03:43:03 marka Exp $\n" "\n"); } @@ -194,6 +194,7 @@ show_usage(void) { "\n" "Usage: queryperf [-d datafile] [-s server_addr] [-p port] [-q num_queries]\n" " [-b bufsize] [-t timeout] [-n] [-l limit] [-1]\n" +" [-e] [-D] [-c] [-v] [-h]\n" " -d specifies the input data file (default: stdin)\n" " -s sets the server to query (default: %s)\n" " -p sets the port on which to query the server (default: %u)\n" @@ -207,6 +208,7 @@ show_usage(void) { " -D set the DNSSEC OK bit (implies EDNS)\n" " -c print the number of packets with each rcode\n" " -v verbose: report the RCODE of each response on stdout\n" +" -h print this usage\n" "\n", DEF_SERVER_TO_QUERY, DEF_SERVER_PORT, DEF_MAX_QUERIES_OUTSTANDING, DEF_QUERY_TIMEOUT, @@ -423,7 +425,7 @@ parse_args(int argc, char **argv) { int c; unsigned int uint_arg_val; - while ((c = getopt(argc, argv, "q:t:nd:s:p:1l:b:eDcv")) != -1) { + while ((c = getopt(argc, argv, "q:t:nd:s:p:1l:b:eDcvh")) != -1) { switch (c) { case 'q': if (is_uint(optarg, &uint_arg_val) == TRUE) { @@ -523,7 +525,8 @@ parse_args(int argc, char **argv) { case 'v': verbose = 1; break; - + case 'h': + return (-1); default: fprintf(stderr, "Invalid option: -%c\n", optopt); return (-1);