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__
28 enum ws80211_channel_type
{
31 WS80211_CHAN_HT40MINUS
,
35 #define CHAN_NO_HT "NOHT"
36 #define CHAN_HT20 "HT20"
37 #define CHAN_HT40MINUS "HT40-"
38 #define CHAN_HT40PLUS "HT40+"
40 struct ws80211_interface
43 gboolean can_set_freq
;
45 int channel_types
; /* Union for all bands */
48 struct ws80211_iface_info
{
50 enum ws80211_channel_type current_chan_type
;
54 int ws80211_init(void);
55 GArray
* ws80211_find_interfaces(void);
56 int ws80211_get_iface_info(const char *name
, struct ws80211_iface_info
*iface_info
);
57 void ws80211_free_interfaces(GArray
*interfaces
);
58 int ws80211_frequency_to_channel(int freq
);
59 int ws80211_set_freq(const char *name
, int freq
, int chan_type
);
60 int ws80211_str_to_chan_type(const gchar
*s
);
61 const gchar
*ws80211_chan_type_to_str(int type
);
63 #endif /* __WS80211_UTILS_H__ */