diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2014-12-15 12:14:41 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2014-12-15 12:14:41 +0000 |
commit | 4c9547cd12b5bb569f10b368eb6bb04d897d596f (patch) | |
tree | 025b1191fa4f9c03bf5345071dd2658f5d240b69 /bin/dig/host.c | |
parent | 989b3b2d6068ce5b525479b7754977baf6364a7d (diff) |
Notes
Diffstat (limited to 'bin/dig/host.c')
-rw-r--r-- | bin/dig/host.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/dig/host.c b/bin/dig/host.c index d1392fc8460b..08f89bf74c9e 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,8 +15,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: host.c,v 1.127 2011/03/11 06:11:20 marka Exp $ */ - /*! \file */ #include <config.h> @@ -166,7 +164,8 @@ show_usage(void) { " -W specifies how long to wait for a reply\n" " -4 use IPv4 query transport only\n" " -6 use IPv6 query transport only\n" -" -m set memory debugging flag (trace|record|usage)\n", stderr); +" -m set memory debugging flag (trace|record|usage)\n" +" -v print version number and exit\n", stderr); exit(1); } @@ -603,7 +602,13 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) { return (result); } -static const char * optstring = "46ac:dilnm:rst:vwCDN:R:TW:"; +static const char * optstring = "46ac:dilnm:rst:vVwCDN:R:TW:"; + +/*% version */ +static void +version(void) { + fputs("host " VERSION "\n", stderr); +} static void pre_parse_args(int argc, char **argv) { @@ -635,6 +640,10 @@ pre_parse_args(int argc, char **argv) { case 's': break; case 't': break; case 'v': break; + case 'V': + version(); + exit(0); + break; case 'w': break; case 'C': break; case 'D': @@ -756,6 +765,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) { if (!lookup->rdtypeset || lookup->rdtype != dns_rdatatype_axfr) lookup->rdtype = dns_rdatatype_any; +#ifdef WITH_IDN + idnoptions = 0; +#endif list_type = dns_rdatatype_any; list_addresses = ISC_FALSE; lookup->rdtypeset = ISC_TRUE; |