![Michael Tüxen](/assets/img/avatar_default.png)
test scripts are passed. Use a global list containing all interfaces and only change properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=40715
149 lines
3.8 KiB
C
149 lines
3.8 KiB
C
/* capture_dlg.h
|
|
* Definitions for packet capture windows
|
|
*
|
|
* $Id$
|
|
*
|
|
* Wireshark - Network traffic analyzer
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
* Copyright 1998 Gerald Combs
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __CAPTURE_DLG_H__
|
|
#define __CAPTURE_DLG_H__
|
|
|
|
/* extern GtkWidget* airpcap_tb; */
|
|
|
|
/** @file
|
|
* "Capture Options" dialog box.
|
|
* @ingroup dialog_group
|
|
*/
|
|
#include "capture_opts.h"
|
|
#include <gtk/gtk.h>
|
|
|
|
enum
|
|
{
|
|
CAPTURE = 0,
|
|
IFACE_HIDDEN_NAME,
|
|
INTERFACE,
|
|
LINK,
|
|
PMODE,
|
|
SNAPLEN,
|
|
#if defined(HAVE_PCAP_CREATE)
|
|
BUFFER,
|
|
MONITOR,
|
|
#elif defined(_WIN32) && !defined(HAVE_PCAP_CREATE)
|
|
BUFFER,
|
|
#endif
|
|
FILTER,
|
|
NUM_COLUMNS
|
|
};
|
|
|
|
/** Initialize background capture filter syntax checking
|
|
*/
|
|
void capture_filter_init(void);
|
|
|
|
/** User requested the "Capture Options" dialog box by menu or toolbar.
|
|
*
|
|
* @param widget parent widget (unused)
|
|
* @param data unused
|
|
*/
|
|
void capture_prep_cb(GtkWidget *widget, gpointer data);
|
|
|
|
/** User requested capture start by menu or toolbar.
|
|
*
|
|
* @param widget parent widget (unused)
|
|
* @param data unused
|
|
*/
|
|
void capture_start_cb(GtkWidget *widget, gpointer data);
|
|
|
|
/** User requested capture stop by menu or toolbar.
|
|
*
|
|
* @param widget parent widget (unused)
|
|
* @param data unused
|
|
*/
|
|
void capture_stop_cb(GtkWidget *widget, gpointer data);
|
|
|
|
/** User requested capture restart by menu or toolbar.
|
|
*
|
|
* @param widget parent widget (unused)
|
|
* @param data unused
|
|
*/
|
|
void capture_restart_cb(GtkWidget *widget, gpointer data);
|
|
|
|
/* capture start confirmed by "Save unsaved capture", so do it now */
|
|
void capture_start_confirmed(void);
|
|
|
|
/** User requested the "Capture Airpcap" dialog box by menu or toolbar.
|
|
*
|
|
* @param widget parent widget (unused)
|
|
* @param data unused
|
|
*/
|
|
void
|
|
capture_air_cb(GtkWidget *widget, gpointer data);
|
|
|
|
#if 0
|
|
/*
|
|
* We remember the capture settings for each interface when a capture
|
|
* is started on it; the next time we select that interface we start
|
|
* out with those settings.
|
|
*
|
|
* XXX - we currently only do that for monitor mode and the link-layer
|
|
* type; arguably we should do it for the snapshot length, and perhaps
|
|
* promiscuous mode.
|
|
*/
|
|
typedef struct {
|
|
gboolean monitor_mode;
|
|
int linktype;
|
|
} cap_settings_t;
|
|
|
|
/** Get capture settings for interface
|
|
*
|
|
* @param if_name interface name
|
|
*/
|
|
cap_settings_t
|
|
capture_get_cap_settings (gchar *if_name);
|
|
#endif
|
|
|
|
GtkTreeModel*
|
|
create_and_fill_model (GtkTreeView *view);
|
|
|
|
gboolean
|
|
query_tooltip_tree_view_cb (GtkWidget *widget,
|
|
gint x,
|
|
gint y,
|
|
gboolean keyboard_tip,
|
|
GtkTooltip *tooltip,
|
|
gpointer data);
|
|
|
|
void
|
|
activate_monitor (GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer,
|
|
GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
|
|
|
|
gboolean
|
|
dlg_window_present(void);
|
|
|
|
void
|
|
enable_selected_interface(gchar *name, gboolean selected);
|
|
|
|
void
|
|
options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column _U_, gpointer userdata);
|
|
|
|
void
|
|
update_all_rows(void);
|
|
|
|
#endif /* capture_dlg.h */
|