2 * Copyright 2012, Pontus Fuchs <pontus.fuchs@gmail.com>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __WS80211_UTILS_H__
26 #define __WS80211_UTILS_H__
30 enum ws80211_channel_type {
33 WS80211_CHAN_HT40MINUS,
37 #define CHAN_NO_HT "NOHT"
38 #define CHAN_HT20 "HT20"
39 #define CHAN_HT40MINUS "HT40-"
40 #define CHAN_HT40PLUS "HT40+"
42 struct ws80211_interface
45 gboolean can_set_freq;
47 int channel_types; /* Union for all bands */
50 struct ws80211_iface_info {
52 enum ws80211_channel_type current_chan_type;
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);
65 #endif /* __WS80211_UTILS_H__ */