2005-12-03 19:32:54 +00:00
|
|
|
/* capture_opts.h
|
|
|
|
* Capture options (all parameters needed to do the actual capture)
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-12-03 19:32:54 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2005-12-03 19:32:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/** @file
|
2007-06-11 03:58:58 +00:00
|
|
|
*
|
2005-12-03 19:32:54 +00:00
|
|
|
* Capture options (all parameters needed to do the actual capture)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CAPTURE_OPTS_H__
|
|
|
|
#define __CAPTURE_OPTS_H__
|
|
|
|
|
2018-05-16 19:51:45 +00:00
|
|
|
#include <sys/types.h> /* for gid_t */
|
2008-06-24 03:38:15 +00:00
|
|
|
|
2014-07-04 07:24:02 +00:00
|
|
|
#include <caputils/capture_ifinfo.h>
|
2005-12-03 19:32:54 +00:00
|
|
|
|
2017-08-19 21:39:21 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
2011-12-29 00:08:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2014-06-20 19:18:48 +00:00
|
|
|
/*
|
|
|
|
* Long options.
|
|
|
|
* We do not currently have long options corresponding to all short
|
|
|
|
* options; we should probably pick appropriate option names for them.
|
|
|
|
*
|
|
|
|
* For long options with no corresponding short options, we define values
|
|
|
|
* outside the range of ASCII graphic characters, make that the last
|
|
|
|
* component of the entry for the long option, and have a case for that
|
|
|
|
* option in the switch statement.
|
|
|
|
*
|
2016-10-30 21:07:33 +00:00
|
|
|
* We also pick values < 4096, so as to leave values >= 4096 for
|
|
|
|
* other long options.
|
2016-10-24 09:19:50 +00:00
|
|
|
*
|
2014-06-20 19:18:48 +00:00
|
|
|
* NOTE:
|
|
|
|
* 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, which is another reason to use
|
|
|
|
* values outside the range of ASCII graphic characters.
|
|
|
|
*/
|
2017-08-07 14:38:52 +00:00
|
|
|
#define LONGOPT_NUM_CAP_COMMENT 128
|
|
|
|
#define LONGOPT_LIST_TSTAMP_TYPES 129
|
|
|
|
#define LONGOPT_SET_TSTAMP_TYPE 130
|
2013-08-01 20:57:47 +00:00
|
|
|
|
2014-06-20 20:59:45 +00:00
|
|
|
/*
|
2014-06-20 21:38:39 +00:00
|
|
|
* Options for capturing common to all capturing programs.
|
2014-06-20 20:59:45 +00:00
|
|
|
*/
|
2014-06-20 21:38:39 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
|
|
|
#define OPTSTRING_A "A:"
|
|
|
|
#else
|
|
|
|
#define OPTSTRING_A ""
|
|
|
|
#endif
|
|
|
|
|
2015-03-25 03:22:00 +00:00
|
|
|
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
|
2014-06-20 20:59:45 +00:00
|
|
|
#define LONGOPT_BUFFER_SIZE \
|
2015-11-21 23:48:27 +00:00
|
|
|
{"buffer-size", required_argument, NULL, 'B'},
|
2014-06-20 21:38:39 +00:00
|
|
|
#define OPTSTRING_B "B:"
|
2014-06-20 20:59:45 +00:00
|
|
|
#else
|
|
|
|
#define LONGOPT_BUFFER_SIZE
|
2014-06-20 21:38:39 +00:00
|
|
|
#define OPTSTRING_B ""
|
2014-06-20 20:59:45 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_PCAP_CREATE
|
2015-11-21 23:48:27 +00:00
|
|
|
#define LONGOPT_MONITOR_MODE {"monitor-mode", no_argument, NULL, 'I'},
|
2014-06-20 21:38:39 +00:00
|
|
|
#define OPTSTRING_I "I"
|
2014-06-20 20:59:45 +00:00
|
|
|
#else
|
|
|
|
#define LONGOPT_MONITOR_MODE
|
2014-06-20 21:38:39 +00:00
|
|
|
#define OPTSTRING_I ""
|
2014-06-20 20:59:45 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LONGOPT_CAPTURE_COMMON \
|
2017-08-07 14:38:52 +00:00
|
|
|
{"capture-comment", required_argument, NULL, LONGOPT_NUM_CAP_COMMENT}, \
|
|
|
|
{"autostop", required_argument, NULL, 'a'}, \
|
|
|
|
{"ring-buffer", required_argument, NULL, 'b'}, \
|
2014-10-12 18:56:12 +00:00
|
|
|
LONGOPT_BUFFER_SIZE \
|
2017-08-07 14:38:52 +00:00
|
|
|
{"list-interfaces", no_argument, NULL, 'D'}, \
|
|
|
|
{"interface", required_argument, NULL, 'i'}, \
|
2014-10-12 18:56:12 +00:00
|
|
|
LONGOPT_MONITOR_MODE \
|
2017-08-07 14:38:52 +00:00
|
|
|
{"list-data-link-types", no_argument, NULL, 'L'}, \
|
|
|
|
{"no-promiscuous-mode", no_argument, NULL, 'p'}, \
|
|
|
|
{"snapshot-length", required_argument, NULL, 's'}, \
|
|
|
|
{"linktype", required_argument, NULL, 'y'}, \
|
|
|
|
{"list-time-stamp-types", no_argument, NULL, LONGOPT_LIST_TSTAMP_TYPES}, \
|
|
|
|
{"time-stamp-type", required_argument, NULL, LONGOPT_SET_TSTAMP_TYPE},
|
|
|
|
|
2014-06-20 20:59:45 +00:00
|
|
|
|
|
|
|
#define OPTSTRING_CAPTURE_COMMON \
|
2014-10-12 18:56:12 +00:00
|
|
|
"a:" OPTSTRING_A "b:" OPTSTRING_B "c:Df:i:" OPTSTRING_I "Lps:y:"
|
2014-06-20 20:59:45 +00:00
|
|
|
|
2007-12-04 11:19:29 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
|
|
|
/* Type of capture source */
|
|
|
|
typedef enum {
|
|
|
|
CAPTURE_IFLOCAL, /**< Local network interface */
|
|
|
|
CAPTURE_IFREMOTE /**< Remote network interface */
|
|
|
|
} capture_source;
|
|
|
|
|
|
|
|
/* Type of RPCAPD Authentication */
|
|
|
|
typedef enum {
|
|
|
|
CAPTURE_AUTH_NULL, /**< No authentication */
|
|
|
|
CAPTURE_AUTH_PWD /**< User/password authentication */
|
|
|
|
} capture_auth;
|
2011-03-01 17:29:09 +00:00
|
|
|
#endif
|
2007-12-04 11:19:29 +00:00
|
|
|
#ifdef HAVE_PCAP_SETSAMPLING
|
|
|
|
/**
|
|
|
|
* Method of packet sampling (dropping some captured packets),
|
|
|
|
* may require additional integer parameter, marked here as N
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
CAPTURE_SAMP_NONE, /**< No sampling - capture all packets */
|
|
|
|
CAPTURE_SAMP_BY_COUNT, /**< Counter-based sampling -
|
|
|
|
capture 1 packet from every N */
|
|
|
|
CAPTURE_SAMP_BY_TIMER /**< Timer-based sampling -
|
|
|
|
capture no more than 1 packet
|
|
|
|
in N milliseconds */
|
|
|
|
} capture_sampling;
|
|
|
|
#endif
|
2005-12-03 19:32:54 +00:00
|
|
|
|
2012-01-25 13:04:32 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
2012-01-25 18:03:50 +00:00
|
|
|
struct remote_host_info {
|
2017-03-19 11:26:28 +00:00
|
|
|
gchar *remote_host; /**< Host name or network address for remote capturing */
|
|
|
|
gchar *remote_port; /**< TCP port of remote RPCAP server */
|
|
|
|
capture_auth auth_type; /**< Authentication type */
|
|
|
|
gchar *auth_username; /**< Remote authentication parameters */
|
|
|
|
gchar *auth_password; /**< Remote authentication parameters */
|
|
|
|
gboolean datatx_udp;
|
|
|
|
gboolean nocap_rpcap;
|
|
|
|
gboolean nocap_local;
|
2012-01-25 13:04:32 +00:00
|
|
|
};
|
|
|
|
|
2014-07-09 11:50:11 +00:00
|
|
|
struct remote_host {
|
2017-03-19 11:26:28 +00:00
|
|
|
gchar *r_host; /**< Host name or network address for remote capturing */
|
|
|
|
gchar *remote_port; /**< TCP port of remote RPCAP server */
|
|
|
|
capture_auth auth_type; /**< Authentication type */
|
|
|
|
gchar *auth_username; /**< Remote authentication parameters */
|
|
|
|
gchar *auth_password; /**< Remote authentication parameters */
|
2014-07-09 11:50:11 +00:00
|
|
|
};
|
|
|
|
|
2012-01-25 13:04:32 +00:00
|
|
|
typedef struct remote_options_tag {
|
|
|
|
capture_source src_type;
|
2012-01-25 18:03:50 +00:00
|
|
|
struct remote_host_info remote_host_opts;
|
2012-01-25 13:04:32 +00:00
|
|
|
#ifdef HAVE_PCAP_SETSAMPLING
|
|
|
|
capture_sampling sampling_method;
|
|
|
|
int sampling_param;
|
|
|
|
#endif
|
|
|
|
} remote_options;
|
|
|
|
#endif /* HAVE_PCAP_REMOTE */
|
|
|
|
|
|
|
|
typedef struct interface_tag {
|
2014-10-12 18:56:12 +00:00
|
|
|
gchar *name;
|
|
|
|
gchar *display_name;
|
|
|
|
gchar *friendly_name;
|
|
|
|
guint type;
|
|
|
|
gchar *addresses;
|
|
|
|
gint no_addresses;
|
|
|
|
gchar *cfilter;
|
|
|
|
GList *links;
|
|
|
|
gint active_dlt;
|
|
|
|
gboolean pmode;
|
|
|
|
gboolean has_snaplen;
|
2015-03-19 06:38:12 +00:00
|
|
|
int snaplen;
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean local;
|
2015-03-25 03:22:00 +00:00
|
|
|
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
|
2014-10-12 18:56:12 +00:00
|
|
|
gint buffer;
|
2012-01-25 19:40:22 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_PCAP_CREATE
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean monitor_mode_enabled;
|
|
|
|
gboolean monitor_mode_supported;
|
2012-01-25 13:04:32 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
2014-10-12 18:56:12 +00:00
|
|
|
remote_options remote_opts;
|
2012-01-25 13:04:32 +00:00
|
|
|
#endif
|
2014-10-12 18:56:12 +00:00
|
|
|
guint32 last_packets;
|
|
|
|
guint32 packet_diff;
|
|
|
|
if_info_t if_info;
|
|
|
|
gboolean selected;
|
|
|
|
gboolean hidden;
|
2014-02-25 13:05:11 +00:00
|
|
|
/* External capture cached data */
|
2014-10-12 18:56:12 +00:00
|
|
|
GHashTable *external_cap_args_settings;
|
2017-08-22 09:00:28 +00:00
|
|
|
gchar *timestamp_type;
|
2012-01-25 13:04:32 +00:00
|
|
|
} interface_t;
|
|
|
|
|
|
|
|
typedef struct link_row_tag {
|
|
|
|
gchar *name;
|
|
|
|
gint dlt;
|
|
|
|
} link_row;
|
|
|
|
|
2011-05-12 16:54:16 +00:00
|
|
|
typedef struct interface_options_tag {
|
2018-08-13 03:32:01 +00:00
|
|
|
gchar *name; /* the name of the interface supplied to libpcap/WinPcap/Npcap to specify the interface */
|
|
|
|
gchar *descr; /* a more user-friendly description of the interface; may be NULL if none */
|
|
|
|
gchar *display_name; /* the name displayed in the console and title bar */
|
2014-10-12 18:56:12 +00:00
|
|
|
gchar *cfilter;
|
|
|
|
gboolean has_snaplen;
|
|
|
|
int snaplen;
|
|
|
|
int linktype;
|
|
|
|
gboolean promisc_mode;
|
|
|
|
interface_type if_type;
|
|
|
|
gchar *extcap;
|
|
|
|
gchar *extcap_fifo;
|
|
|
|
GHashTable *extcap_args;
|
2018-03-02 17:11:31 +00:00
|
|
|
GPid extcap_pid; /* pid of running process or WS_INVALID_PID */
|
2018-03-01 23:31:45 +00:00
|
|
|
gpointer extcap_pipedata;
|
2014-10-12 18:56:12 +00:00
|
|
|
guint extcap_child_watch;
|
2017-08-19 21:39:21 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
HANDLE extcap_pipe_h;
|
2017-08-25 09:28:34 +00:00
|
|
|
HANDLE extcap_control_in_h;
|
|
|
|
HANDLE extcap_control_out_h;
|
2017-08-19 21:39:21 +00:00
|
|
|
#endif
|
2017-04-15 21:30:30 +00:00
|
|
|
gchar *extcap_control_in;
|
|
|
|
gchar *extcap_control_out;
|
2015-03-25 03:22:00 +00:00
|
|
|
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
|
2014-10-12 18:56:12 +00:00
|
|
|
int buffer_size;
|
2011-05-12 16:54:16 +00:00
|
|
|
#endif
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean monitor_mode;
|
2011-05-16 15:19:54 +00:00
|
|
|
#ifdef HAVE_PCAP_REMOTE
|
2014-10-12 18:56:12 +00:00
|
|
|
capture_source src_type;
|
|
|
|
gchar *remote_host;
|
|
|
|
gchar *remote_port;
|
|
|
|
capture_auth auth_type;
|
|
|
|
gchar *auth_username;
|
|
|
|
gchar *auth_password;
|
|
|
|
gboolean datatx_udp;
|
|
|
|
gboolean nocap_rpcap;
|
|
|
|
gboolean nocap_local;
|
2011-05-16 15:19:54 +00:00
|
|
|
#endif
|
2011-05-16 14:12:35 +00:00
|
|
|
#ifdef HAVE_PCAP_SETSAMPLING
|
2014-10-12 18:56:12 +00:00
|
|
|
capture_sampling sampling_method;
|
|
|
|
int sampling_param;
|
2011-05-16 14:12:35 +00:00
|
|
|
#endif
|
2017-08-07 14:38:52 +00:00
|
|
|
gchar *timestamp_type; /* requested timestamp as string */
|
|
|
|
int timestamp_type_id; /* Timestamp type to pass to pcap_set_tstamp_type.
|
|
|
|
only valid if timestamp_type != NULL */
|
2011-05-12 16:54:16 +00:00
|
|
|
} interface_options;
|
|
|
|
|
2005-12-03 19:32:54 +00:00
|
|
|
/** Capture options coming from user interface */
|
|
|
|
typedef struct capture_options_tag {
|
|
|
|
/* general */
|
2014-10-12 18:56:12 +00:00
|
|
|
GArray *ifaces; /**< the interfaces to use for the
|
|
|
|
next capture, entries are of
|
|
|
|
type interface_options */
|
|
|
|
GArray *all_ifaces; /**< all interfaces, entries are
|
|
|
|
of type interface_t */
|
|
|
|
int ifaces_err; /**< if all_ifaces is null, the error
|
|
|
|
when it was fetched, if any */
|
|
|
|
gchar *ifaces_err_info; /**< error string for that error */
|
|
|
|
guint num_selected;
|
2013-11-26 02:25:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2014-10-12 18:56:12 +00:00
|
|
|
interface_options default_options;
|
2013-11-26 02:25:20 +00:00
|
|
|
|
2014-10-12 18:56:12 +00:00
|
|
|
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 */
|
2005-12-03 19:32:54 +00:00
|
|
|
|
|
|
|
/* GUI related */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean real_time_mode; /**< Update list of packets in real time */
|
2018-05-16 04:31:12 +00:00
|
|
|
gboolean show_info; /**< show the info dialog. */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean restart; /**< restart after closing is done */
|
|
|
|
gchar *orig_save_file; /**< the original capture file name (saved for a restart) */
|
2005-12-03 19:32:54 +00:00
|
|
|
|
|
|
|
/* multiple files (and ringbuffer) */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean multi_files_on; /**< TRUE if ring buffer in use */
|
2005-12-03 19:32:54 +00:00
|
|
|
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean has_file_duration; /**< TRUE if ring duration specified */
|
2018-10-31 10:34:35 +00:00
|
|
|
gdouble file_duration; /**< Switch file after n seconds */
|
2017-06-27 20:04:33 +00:00
|
|
|
gboolean has_file_interval; /**< TRUE if ring interval specified */
|
|
|
|
gint32 file_interval; /**< Create time intervals of n seconds */
|
2018-10-31 09:03:04 +00:00
|
|
|
gboolean has_file_packets; /**< TRUE if ring packet count is
|
|
|
|
specified */
|
|
|
|
int file_packets; /**< Switch file after n packets */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean has_ring_num_files; /**< TRUE if ring num_files specified */
|
|
|
|
guint32 ring_num_files; /**< Number of multiple buffer files */
|
2005-12-03 19:32:54 +00:00
|
|
|
|
|
|
|
/* autostop conditions */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean has_autostop_files; /**< TRUE if maximum number of capture files
|
|
|
|
are specified */
|
2018-10-31 09:03:04 +00:00
|
|
|
int autostop_files; /**< Maximum number of capture files */
|
2014-10-12 18:56:12 +00:00
|
|
|
|
|
|
|
gboolean has_autostop_packets; /**< TRUE if maximum packet count is
|
|
|
|
specified */
|
|
|
|
int autostop_packets; /**< Maximum packet count */
|
|
|
|
gboolean has_autostop_filesize; /**< TRUE if maximum capture file size
|
|
|
|
is specified */
|
2018-10-31 10:34:35 +00:00
|
|
|
guint32 autostop_filesize; /**< Maximum capture file size in kB */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean has_autostop_duration; /**< TRUE if maximum capture duration
|
|
|
|
is specified */
|
2018-10-31 10:34:35 +00:00
|
|
|
gdouble autostop_duration; /**< Maximum capture duration */
|
2014-10-12 18:56:12 +00:00
|
|
|
|
|
|
|
gchar *capture_comment; /** capture comment to write to the
|
|
|
|
output file */
|
2013-08-29 18:15:13 +00:00
|
|
|
|
2005-12-03 19:32:54 +00:00
|
|
|
/* internally used (don't touch from outside) */
|
2014-10-12 18:56:12 +00:00
|
|
|
gboolean output_to_pipe; /**< save_file is a pipe (named or stdout) */
|
|
|
|
gboolean capture_child; /**< hidden option: Wireshark child mode */
|
2005-12-03 19:32:54 +00:00
|
|
|
} capture_options;
|
|
|
|
|
|
|
|
/* initialize the capture_options with some reasonable values */
|
|
|
|
extern void
|
2013-05-22 07:44:28 +00:00
|
|
|
capture_opts_init(capture_options *capture_opts);
|
2005-12-03 19:32:54 +00:00
|
|
|
|
2017-01-25 09:16:35 +00:00
|
|
|
/* clean internal structures */
|
|
|
|
extern void
|
|
|
|
capture_opts_cleanup(capture_options *capture_opts);
|
|
|
|
|
2005-12-05 21:26:01 +00:00
|
|
|
/* set a command line option value */
|
2006-02-10 02:05:30 +00:00
|
|
|
extern int
|
2005-12-03 19:32:54 +00:00
|
|
|
capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg, gboolean *start_capture);
|
|
|
|
|
|
|
|
/* log content of capture_opts */
|
|
|
|
extern void
|
|
|
|
capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_options *capture_opts);
|
|
|
|
|
2017-08-07 14:38:52 +00:00
|
|
|
enum caps_query {
|
|
|
|
CAPS_MONITOR_MODE = 0x1,
|
|
|
|
CAPS_QUERY_LINK_TYPES = 0x2,
|
|
|
|
CAPS_QUERY_TIMESTAMP_TYPES = 0x4
|
|
|
|
};
|
|
|
|
|
2010-05-13 17:37:39 +00:00
|
|
|
/* print interface capabilities, including link layer types */
|
2010-05-07 08:06:25 +00:00
|
|
|
extern void
|
2017-08-07 14:38:52 +00:00
|
|
|
capture_opts_print_if_capabilities(if_capabilities_t *caps, char *name, int queries);
|
2005-12-13 22:48:58 +00:00
|
|
|
|
2010-05-07 19:24:32 +00:00
|
|
|
/* print list of interfaces */
|
|
|
|
extern void
|
|
|
|
capture_opts_print_interfaces(GList *if_list);
|
2005-12-13 22:48:58 +00:00
|
|
|
|
|
|
|
/* trim the snaplen entry */
|
2007-06-11 03:58:58 +00:00
|
|
|
extern void
|
2005-12-13 22:48:58 +00:00
|
|
|
capture_opts_trim_snaplen(capture_options *capture_opts, int snaplen_min);
|
|
|
|
|
|
|
|
/* trim the ring_num_files entry */
|
2007-06-11 03:58:58 +00:00
|
|
|
extern void
|
2005-12-13 22:48:58 +00:00
|
|
|
capture_opts_trim_ring_num_files(capture_options *capture_opts);
|
|
|
|
|
2013-05-22 04:49:31 +00:00
|
|
|
/* pick default interface if none was specified */
|
2012-11-21 17:14:54 +00:00
|
|
|
extern int
|
2013-05-22 04:49:31 +00:00
|
|
|
capture_opts_default_iface_if_necessary(capture_options *capture_opts,
|
|
|
|
const char *capture_device);
|
2005-12-03 19:32:54 +00:00
|
|
|
|
2014-07-04 22:18:07 +00:00
|
|
|
extern void
|
2014-07-14 14:22:53 +00:00
|
|
|
capture_opts_del_iface(capture_options *capture_opts, guint if_index);
|
2014-07-04 22:18:07 +00:00
|
|
|
|
2012-01-25 13:04:32 +00:00
|
|
|
extern void
|
|
|
|
collect_ifaces(capture_options *capture_opts);
|
|
|
|
|
2015-11-26 08:27:51 +00:00
|
|
|
extern void
|
|
|
|
capture_opts_free_interface_t(interface_t *device);
|
|
|
|
|
2013-02-28 15:27:56 +00:00
|
|
|
/* Default capture buffer size in Mbytes. */
|
|
|
|
#define DEFAULT_CAPTURE_BUFFER_SIZE 2
|
|
|
|
|
2011-12-29 00:08:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2014-10-14 19:58:21 +00:00
|
|
|
#endif /* capture_opts.h */
|
|
|
|
|
2014-10-12 18:56:12 +00:00
|
|
|
/*
|
2019-07-26 18:43:17 +00:00
|
|
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2014-10-12 18:56:12 +00:00
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|