A long-overdue rename of register_dfilter_stat() to
[metze/wireshark/wip.git] / ws80211_utils.h
1 /*
2  * Copyright 2012, Pontus Fuchs <pontus.fuchs@gmail.com>
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
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.
14  *
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.
19  *
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __WS80211_UTILS_H__
26 #define __WS80211_UTILS_H__
27
28 #include <config.h>
29
30 enum ws80211_channel_type {
31         WS80211_CHAN_NO_HT,
32         WS80211_CHAN_HT20,
33         WS80211_CHAN_HT40MINUS,
34         WS80211_CHAN_HT40PLUS
35 };
36
37 #define CHAN_NO_HT      "NOHT"
38 #define CHAN_HT20       "HT20"
39 #define CHAN_HT40MINUS  "HT40-"
40 #define CHAN_HT40PLUS   "HT40+"
41
42 struct ws80211_interface
43 {
44         char *ifname;
45         gboolean can_set_freq;
46         GArray *frequencies;
47         int channel_types; /* Union for all bands */
48 };
49
50 struct ws80211_iface_info {
51         int current_freq;
52         enum ws80211_channel_type current_chan_type;
53 };
54
55
56 int ws80211_init(void);
57 GArray* ws80211_find_interfaces(void);
58 int ws80211_get_iface_info(const char *name, struct ws80211_iface_info *iface_info);
59 void ws80211_free_interfaces(GArray *interfaces);
60 int ws80211_frequency_to_channel(int freq);
61 int ws80211_set_freq(const char *name, int freq, int chan_type);
62 int ws80211_str_to_chan_type(const gchar *s);
63 const gchar *ws80211_chan_type_to_str(int type);
64
65 #endif /* __WS80211_UTILS_H__ */