2 * Copyright 2012, Pontus Fuchs <pontus.fuchs@gmail.com>
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __WS80211_UTILS_H__
24 #define __WS80211_UTILS_H__
26 enum ws80211_channel_type {
29 WS80211_CHAN_HT40MINUS,
33 #define CHAN_NO_HT "NOHT"
34 #define CHAN_HT20 "HT20"
35 #define CHAN_HT40MINUS "HT40-"
36 #define CHAN_HT40PLUS "HT40+"
38 struct ws80211_interface
41 gboolean can_set_freq;
43 int channel_types; /* Union for all bands */
46 struct ws80211_iface_info {
48 enum ws80211_channel_type current_chan_type;
52 int ws80211_init(void);
53 GArray* ws80211_find_interfaces(void);
54 int ws80211_get_iface_info(const char *name, struct ws80211_iface_info *iface_info);
55 void ws80211_free_interfaces(GArray *interfaces);
56 int ws80211_frequency_to_channel(int freq);
57 int ws80211_set_freq(const char *name, int freq, int chan_type);
58 int ws80211_str_to_chan_type(const gchar *s);
59 const gchar *ws80211_chan_type_to_str(int type);
61 #endif /* __WS80211_UTILS_H__ */