From 190e313e9d949a837a0b3c3fe027647b35c2f8be Mon Sep 17 00:00:00 2001 From: Hadriel Kaplan Date: Sat, 25 Jul 2015 09:24:48 -0400 Subject: DNS: move DNS name resolution pref to Name Resolution prefs Move the boolean flag for using captured DNS packet info for name resolution to the Name Resolution preferences settings, as it was rather surprising to disable Name Resolution preferences and still have names being resolved. Also disble them all if the '-n' command line switch is used, and re-enable it for a 'd' character in the '-N' option. Bug: 10337 Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917 Reviewed-on: https://code.wireshark.org/review/9786 Petri-Dish: Hadriel Kaplan Tested-by: Petri Dish Buildbot Reviewed-by: Hadriel Kaplan --- rawshark.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'rawshark.c') diff --git a/rawshark.c b/rawshark.c index 6981f6d3a5..c44bacef4b 100644 --- a/rawshark.c +++ b/rawshark.c @@ -201,7 +201,7 @@ print_usage(FILE *output) fprintf(output, " packet encapsulation or protocol\n"); fprintf(output, " -F field to display\n"); fprintf(output, " -n disable all name resolution (def: all enabled)\n"); - fprintf(output, " -N enable specific name resolution(s): \"mntC\"\n"); + fprintf(output, " -N enable specific name resolution(s): \"mnNtCd\"\n"); fprintf(output, " -p use the system's packet header format\n"); fprintf(output, " (which may have 64-bit timestamps)\n"); fprintf(output, " -R packet filter in Wireshark display filter syntax\n"); @@ -636,15 +636,12 @@ DIAG_ON(cast-qual) line_buffered = TRUE; break; case 'n': /* No name resolution */ - gbl_resolv_flags.mac_name = FALSE; - gbl_resolv_flags.network_name = FALSE; - gbl_resolv_flags.transport_name = FALSE; - gbl_resolv_flags.concurrent_dns = FALSE; + disable_name_resolution(); break; case 'N': /* Select what types of addresses/port #s to resolve */ badopt = string_to_name_resolve(optarg, &gbl_resolv_flags); if (badopt != '\0') { - cmdarg_err("-N specifies unknown resolving option '%c'; valid options are 'm', 'n', and 't'", + cmdarg_err("-N specifies unknown resolving option '%c'; valid options are 'C', 'd', m', 'n', 'N', and 't'", badopt); exit(1); } -- cgit v1.2.3