CID 898: Remove a not really used variable
[obnox/wireshark/wip.git] / capture_opts.h
index fdf7672220bf22904c33c20194b338a5f6f5fde7..9cd688c32e8f71c79af11e638f5ef09bbf6e52f4 100644 (file)
@@ -36,6 +36,7 @@
 # include <sys/types.h>            /* for gid_t */
 #endif
 
+#include "capture_ifinfo.h"
 
 /* Current state of capture engine. XXX - differentiate states */
 typedef enum {
@@ -56,7 +57,7 @@ typedef enum {
     CAPTURE_AUTH_NULL,      /**< No authentication */
     CAPTURE_AUTH_PWD        /**< User/password authentication */
 } capture_auth;
-
+#endif
 #ifdef HAVE_PCAP_SETSAMPLING
 /**
  * Method of packet sampling (dropping some captured packets),
@@ -71,7 +72,6 @@ typedef enum {
                                  in N milliseconds */
 } capture_sampling;
 #endif
-#endif
 
 /** Capture options coming from user interface */
 typedef struct capture_options_tag {
@@ -80,17 +80,17 @@ typedef struct capture_options_tag {
     gboolean has_cfilter;           /**< TRUE if capture filter specified on command line */
     gchar    *cfilter;              /**< Capture filter string */
     gchar    *iface;                /**< the network interface to capture from */
-    gchar    *iface_descr;         /**< A human readable description of iface.
-                                     *< NOTE: capture_opts.c is not able to
-                                     *< set this field because doing so
-                                     *< requires too many dependencies.
-                                     *< Readers of this field should use
-                                     *< get_iface_description() from
-                                     *< "capture_ui_utils.h" to access it. */
+    gchar    *iface_descr;          /**< A human readable description of iface.
+                                      *< NOTE: capture_opts.c is not able to
+                                      *< set this field because doing so
+                                      *< requires too many dependencies.
+                                      *< Readers of this field should use
+                                      *< get_iface_description() from
+                                      *< "capture_ui_utils.h" to access it. */
 #ifdef HAVE_PCAP_REMOTE
     capture_source src_type;        /**< Capturing on remote interface */
     gchar    *remote_host;          /**< Host name or network address
-                                     *< for remote capturing */
+                                      *< for remote capturing */
     gchar    *remote_port;          /**< TCP port of remote RPCAP server */
 
     capture_auth  auth_type;
@@ -100,11 +100,11 @@ typedef struct capture_options_tag {
     gboolean datatx_udp;            /**< Whether to use UDP for data transfer */
     gboolean nocap_rpcap;           /**< Whether to capture RPCAP own traffic */
     gboolean nocap_local;           /**< TODO: Whether to capture local traffic */
+#endif
 #ifdef HAVE_PCAP_SETSAMPLING
     capture_sampling sampling_method; /**< PCAP packet sampling method */
     int sampling_param;             /**< PCAP packet sampling parameter */
 #endif
-#endif
 #if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
     int      buffer_size;           /**< the capture buffer size (MB) */
 #endif
@@ -114,11 +114,10 @@ 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 group_read_access;     /**< TRUE is group read permission needs to be set */
     gboolean use_pcapng;            /**< TRUE if file format is pcapng */
 
     /* GUI related */
@@ -152,6 +151,7 @@ typedef struct capture_options_tag {
 
     /* internally used (don't touch from outside) */
     int fork_child;                 /**< If not -1, in parent, process ID of child */
+    int fork_child_status;          /**< Child exit status */
 #ifdef _WIN32
     int signal_pipe_write_fd;       /**< the pipe to signal the child */
 #endif
@@ -175,9 +175,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