aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-07 01:25:53 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-07 01:25:53 +0000
commitdf5bd1bc0263e6afdbf27f0782d59bc4646acfb5 (patch)
tree3a1006e16a993b63867fe027e08a0d714e3413fa /capture_opts.c
parenta7fedbfcbc4e128ec06fd698f95f21a041b14bb3 (diff)
Handle -I in the options processing.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32703 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c8
1 files changed, 8 insertions, 0 deletions
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;