aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2007-12-04 11:19:29 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2007-12-04 11:19:29 +0000
commit08bbd29c71b8068e419f95a7a8cb7332ef0a3a3d (patch)
treef0bdb59e0947e9cfeac882b6b58a4753af6511be /capture_opts.h
parent48537a7a6505e68faadbed9837a4159c2758d442 (diff)
Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)
- retrieving the list of remote PCAP interfaces - password authentication support - UDP data fransfer - packet sampling (available in WinPcap 4.x) etc. fix problem if non-default rpcap port is used svn path=/trunk/; revision=23750
Diffstat (limited to 'capture_opts.h')
-rw-r--r--capture_opts.h47
1 files changed, 46 insertions, 1 deletions
diff --git a/capture_opts.h b/capture_opts.h
index c47519329d..7b91c09473 100644
--- a/capture_opts.h
+++ b/capture_opts.h
@@ -40,6 +40,34 @@ typedef enum {
CAPTURE_RUNNING /**< capture child signalled ok, capture is running now */
} capture_state;
+#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;
+
+#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
+#endif
/** Capture options coming from user interface */
typedef struct capture_options_tag {
@@ -55,7 +83,24 @@ typedef struct capture_options_tag {
*< 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 */
+ gchar *remote_port; /**< TCP port of remote RPCAP server */
+
+ capture_auth auth_type;
+ gchar *auth_username;
+ gchar *auth_password; /**< Remote authentication parameters */
+
+ 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 */
+#ifdef HAVE_PCAP_SETSAMPLING
+ capture_sampling sampling_method; /**< PCAP packet sampling method */
+ int sampling_param; /**< PCAP packet sampling parameter */
+#endif
+#endif
#ifdef _WIN32
int buffer_size; /**< the capture buffer size (MB) */
#endif