extern "C" {
#endif /* __cplusplus */
+/* Attention:
+ for tshark, we're using a leading - in the optstring to prevent getopt()
+ from permuting the argv[] entries, in this case, unknown argv[] entries
+ will be returned as parameters to a dummy-option 1
+ in short: we must not use 1 here */
+
+/* this does not clash with tshark's -2 option which returns '2' */
+#define LONGOPT_NUM_CAP_COMMENT 2
+
+
#ifdef HAVE_PCAP_REMOTE
/* Type of capture source */
typedef enum {
Currently only used by dumpcap. */
GArray *all_ifaces;
guint num_selected;
+
+ /*
+ * Options to be applied to all interfaces.
+ *
+ * Some of these can be set from the GUI, others can't; setting
+ * the link-layer header type, for example, doesn't necessarily
+ * make sense, as different interfaces may support different sets
+ * of link-layer header types.
+ *
+ * Some that can't be set from the GUI can be set from the command
+ * line, by specifying them before any interface is specified.
+ * This includes the link-layer header type, so if somebody asks
+ * for a link-layer header type that an interface on which they're
+ * capturing doesn't support, we should report an error and fail
+ * to capture.
+ *
+ * These can be overridden per-interface.
+ */
interface_options default_options;
+
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 show_info; /**< show the info dialog */
gboolean quit_after_cap; /**< Makes a "capture only mode". Implies -k */
gboolean restart; /**< restart after closing is done */
+ gchar *orig_save_file; /**< the original capture file name (saved for a restart) */
/* multiple files (and ringbuffer) */
gboolean multi_files_on; /**< TRUE if ring buffer in use */
int autostop_packets; /**< Maximum packet count */
gboolean has_autostop_filesize; /**< TRUE if maximum capture file size
is specified */
- gint32 autostop_filesize; /**< Maximum capture file size */
+ guint32 autostop_filesize; /**< Maximum capture file size */
gboolean has_autostop_duration; /**< TRUE if maximum capture duration
is specified */
gint32 autostop_duration; /**< Maximum capture duration */
gchar *capture_comment; /** capture comment to write to the
output file */
-
+
/* internally used (don't touch from outside) */
gboolean output_to_pipe; /**< save_file is a pipe (named or stdout) */
- gboolean capture_child; /**< hidden option: Wireshark child mode */
+ gboolean capture_child; /**< hidden option: Wireshark child mode */
} capture_options;
/* initialize the capture_options with some reasonable values */