aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-07 01:25:53 +0000
committerGuy Harris <guy@alum.mit.edu>2010-05-07 01:25:53 +0000
commit9a84de89320d381e22546989a0dca841e7ae10b8 (patch)
tree3a1006e16a993b63867fe027e08a0d714e3413fa /capture_opts.c
parent20cbf81d39b80cfc69651092d9079ee34eee3d45 (diff)
Handle -I in the options processing.
svn path=/trunk/; revision=32703
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;