GTP: add dissection of Extended End User Address
[metze/wireshark/wip.git] / ws80211_utils.h
1 /*
2  * Copyright 2012, Pontus Fuchs <pontus.fuchs@gmail.com>
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
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.
12  *
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.
17  *
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.
21  */
22
23 #ifndef __WS80211_UTILS_H__
24 #define __WS80211_UTILS_H__
25
26 enum ws80211_channel_type {
27         WS80211_CHAN_NO_HT,
28         WS80211_CHAN_HT20,
29         WS80211_CHAN_HT40MINUS,
30         WS80211_CHAN_HT40PLUS
31 };
32
33 #define CHAN_NO_HT      "NOHT"
34 #define CHAN_HT20       "HT20"
35 #define CHAN_HT40MINUS  "HT40-"
36 #define CHAN_HT40PLUS   "HT40+"
37
38 struct ws80211_interface
39 {
40         char *ifname;
41         gboolean can_set_freq;
42         GArray *frequencies;
43         int channel_types; /* Union for all bands */
44 };
45
46 struct ws80211_iface_info {
47         int current_freq;
48         enum ws80211_channel_type current_chan_type;
49 };
50
51
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);
60
61 #endif /* __WS80211_UTILS_H__ */