From 1c18115bd3e8a0b1a56ab8effcf5843240bde0c6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 13 May 2010 17:37:39 +0000 Subject: Fetch an indication of whether the interface supports capturing in monitor mode at the same time that we fetch its list of link-layer types. Support fetching that list in monitor mode, as the list may be different in regular and monitor mode. If the interface supports monitor mode, when printing the list of link-layer types, indicate whether they're fetched in monitor mode or not, as tcpdump 4.1.x does. svn path=/trunk/; revision=32789 --- capture_opts.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'capture_opts.h') diff --git a/capture_opts.h b/capture_opts.h index fdf7672220..34709fce04 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -36,6 +36,7 @@ # include /* for gid_t */ #endif +#include "capture_ifinfo.h" /* Current state of capture engine. XXX - differentiate states */ typedef enum { @@ -114,9 +115,7 @@ typedef struct capture_options_tag { gboolean promisc_mode; /**< Capture in promiscuous mode */ int linktype; /**< Data link type to use, or -1 for "use default" */ -#ifdef HAVE_PCAP_CREATE gboolean monitor_mode; /**< Capture in monitor mode, if available */ -#endif gboolean saving_to_file; /**< TRUE if capture is writing to a file */ gchar *save_file; /**< the capture file name */ gboolean use_pcapng; /**< TRUE if file format is pcapng */ @@ -175,9 +174,10 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg, extern void capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_options *capture_opts); -/* print list of link layer types */ +/* print interface capabilities, including link layer types */ extern void -capture_opts_print_link_layer_types(GList *lt_list); +capture_opts_print_if_capabilities(if_capabilities_t *caps, + gboolean monitor_mode); /* print list of interfaces */ extern void -- cgit v1.2.1