From 9a84de89320d381e22546989a0dca841e7ae10b8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 7 May 2010 01:25:53 +0000 Subject: [PATCH] Handle -I in the options processing. svn path=/trunk/; revision=32703 --- capture_opts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/capture_opts.c b/capture_opts.c index d060810234..60bccf06de 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -104,6 +104,9 @@ capture_opts_init(capture_options *capture_opts, void *cf) capture_opts->snaplen = WTAP_MAX_PACKET_SIZE; /* snapshot length - default is infinite, in effect */ capture_opts->promisc_mode = TRUE; /* promiscuous mode is the default */ +#ifdef HAVE_PCAP_CREATE + capture_opts->monitor_mode = FALSE; +#endif capture_opts->linktype = -1; /* the default linktype */ capture_opts->saving_to_file = FALSE; capture_opts->save_file = NULL; @@ -491,6 +494,11 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_ return status; } break; +#ifdef HAVE_PCAP_CREATE + case 'I': /* Capture in monitor mode */ + capture_opts->monitor_mode = TRUE; + break; +#endif case 'k': /* Start capture immediately */ *start_capture = TRUE; break;