2 * Definitions for packet capture windows
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef __CAPTURE_DLG_H__
26 #define __CAPTURE_DLG_H__
28 /* extern GtkWidget* airpcap_tb; */
31 * "Capture Options" dialog box.
32 * @ingroup dialog_group
34 #include "capture_opts.h"
36 #ifdef HAVE_PCAP_REMOTE
38 gchar *remote_host; /**< Host name or network address for remote capturing */
39 gchar *remote_port; /**< TCP port of remote RPCAP server */
40 gint auth_type; /**< Authentication type */
41 gchar *auth_username; /**< Remote authentication parameters */
42 gchar *auth_password; /**< Remote authentication parameters */
48 typedef struct remote_options_tag {
49 capture_source src_type;
50 struct remote_host remote_host_opts;
51 #ifdef HAVE_PCAP_SETSAMPLING
52 capture_sampling sampling_method;
56 #endif /* HAVE_PCAP_REMOTE */
58 typedef struct row_options_tag {
67 #ifdef HAVE_PCAP_CREATE
68 gboolean monitor_mode_enabled;
69 gboolean monitor_mode_supported;
73 #if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
76 #ifdef HAVE_PCAP_REMOTE
77 remote_options remote_opts;
81 typedef struct link_row_tag {
93 #if defined(HAVE_PCAP_CREATE)
96 #elif defined(_WIN32) && !defined(HAVE_PCAP_CREATE)
103 /** Initialize background capture filter syntax checking
105 void capture_filter_init(void);
107 /** User requested the "Capture Options" dialog box by menu or toolbar.
109 * @param widget parent widget (unused)
112 void capture_prep_cb(GtkWidget *widget, gpointer data);
114 /** User requested capture start by menu or toolbar.
116 * @param widget parent widget (unused)
119 void capture_start_cb(GtkWidget *widget, gpointer data);
121 /** User requested capture stop by menu or toolbar.
123 * @param widget parent widget (unused)
126 void capture_stop_cb(GtkWidget *widget, gpointer data);
128 /** User requested capture restart by menu or toolbar.
130 * @param widget parent widget (unused)
133 void capture_restart_cb(GtkWidget *widget, gpointer data);
135 /* capture start confirmed by "Save unsaved capture", so do it now */
136 void capture_start_confirmed(void);
138 /** User requested the "Capture Airpcap" dialog box by menu or toolbar.
140 * @param widget parent widget (unused)
144 capture_air_cb(GtkWidget *widget, gpointer data);
147 * We remember the capture settings for each interface when a capture
148 * is started on it; the next time we select that interface we start
149 * out with those settings.
151 * XXX - we currently only do that for monitor mode and the link-layer
152 * type; arguably we should do it for the snapshot length, and perhaps
156 gboolean monitor_mode;
160 /** Get capture settings for interface
162 * @param if_name interface name
165 capture_get_cap_settings (gchar *if_name);
168 create_and_fill_model (GtkTreeView *view);
171 query_tooltip_tree_view_cb (GtkWidget *widget,
174 gboolean keyboard_tip,
179 activate_monitor (GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer,
180 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
183 dlg_window_present(void);
186 enable_selected_interface(gchar *name, gboolean enable);
189 options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column _U_, gpointer userdata);
191 #endif /* capture_dlg.h */