2 * Declarations of utility routines for the "Airpcap" dialog widgets
6 * Giorgio Tino <giorgio.tino@cacetech.com>
7 * Copyright (c) CACE Technologies, LLC 2006
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #ifndef __AIRPCAP_GUI_UTILS_H__
29 #define __AIRPCAP_GUI_UTILS_H__
31 #define AIRPCAP_VALIDATION_TYPE_NAME_ALL "All Frames"
32 #define AIRPCAP_VALIDATION_TYPE_NAME_CORRECT "Valid Frames"
33 #define AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT "Invalid Frames"
34 #define AIRPCAP_VALIDATION_TYPE_NAME_UNKNOWN "Unknown"
36 #define AIRPCAP_LINK_TYPE_NAME_802_11_ONLY "802.11 Only"
37 #define AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO "802.11 + Radio"
38 #define AIRPCAP_LINK_TYPE_NAME_UNKNOWN "Unknown"
41 * set up the airpcap toolbar for the new capture interface
44 airpcap_set_toolbar_start_capture(airpcap_if_info_t* if_info);
47 * Set up the airpcap toolbar for the new capture interface
50 airpcap_set_toolbar_stop_capture(airpcap_if_info_t* if_info);
53 * Add a key (string) to the given list
56 airpcap_add_key_to_list(GtkWidget *keylist, gchar* s);
59 * Fill the list with the keys
62 airpcap_fill_key_list(GtkWidget *keylist,airpcap_if_info_t* if_info);
65 * Function used to retrieve the AirpcapValidationType given the string name.
68 airpcap_get_validation_type(const gchar* name);
71 * Function used to retrieve the string name given an AirpcapValidationType.
74 airpcap_get_validation_name(AirpcapValidationType vt);
77 * Returns the AirpcapLinkType corresponding to the given string name.
80 airpcap_get_link_type(const gchar* name);
83 * Returns the string name corresponding to the given AirpcapLinkType.
86 airpcap_get_link_name(AirpcapLinkType lt);
89 * Sets the entry of the link type combo using the AirpcapLinkType.
92 airpcap_link_type_combo_set_by_type(GtkWidget* c, AirpcapLinkType type);
95 * Retrieves the name in link type the combo entry.
98 airpcap_link_type_combo_get_type(GtkWidget* c);
101 * Sets the entry of the validation combo using the AirpcapValidationType.
104 airpcap_validation_type_combo_set_by_type(GtkWidget* c,AirpcapValidationType type);
107 * Retrieves the name in the validation combo entry.
109 AirpcapValidationType
110 airpcap_validation_type_combo_get_type(GtkWidget* c);
113 * Returns the string corresponding to the given UINT (1-14, for channel only)
116 airpcap_get_channel_number(const gchar* s);
119 * Retrieve the UINT corresponding to the given string (channel only, handle with care!)
122 airpcap_get_channel_name(UINT n);
125 * Set the combo box entry string given an UINT channel number
128 airpcap_channel_combo_set_by_number(GtkWidget* w,UINT channel);
131 * Returns '1' if this is the "Any" adapter, '0' otherwise
134 airpcap_if_is_any(airpcap_if_info_t* if_info);
137 * Update channel combo box. If the airpcap interface is "Any", the combo box will be disabled.
140 airpcap_update_channel_combo(GtkWidget* w, airpcap_if_info_t* if_info);