Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11 #ifndef __WS80211_UTILS_H__
12 #define __WS80211_UTILS_H__
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17
18 #include "ws_attributes.h"
19
20 enum ws80211_channel_type {
21 WS80211_CHAN_NO_HT,
22 WS80211_CHAN_HT20,
23 WS80211_CHAN_HT40MINUS,
24 WS80211_CHAN_HT40PLUS,
25 WS80211_CHAN_VHT80,
26 WS80211_CHAN_VHT80P80,
27 WS80211_CHAN_VHT160
28 };
29
30 #define CHAN_NO_HT "NOHT"
31 #define CHAN_HT20 "HT20"
32 #define CHAN_HT40MINUS "HT40-"
33 #define CHAN_HT40PLUS "HT40+"
34 #define CHAN_VHT80 "VHT80"
35 #define CHAN_VHT80P80 "VHT80+80"
36 #define CHAN_VHT160 "VHT160"
37
38 /* XXX This doesn't match AirpcapValidationType. Should it? */
39 enum ws80211_fcs_validation {
40 WS80211_FCS_ALL,
41 WS80211_FCS_VALID,
42 WS80211_FCS_INVALID
43 };
44
45 struct ws80211_interface
46 {
47 char *ifname;
48 gboolean can_set_freq;
49 gboolean can_check_fcs;
50 GArray *frequencies; /* Array of guint32? */
51 int channel_types; /* Union for all bands */
52 int cap_monitor;
53 };
54
55 struct ws80211_iface_info {
56 int current_freq;
57 enum ws80211_channel_type current_chan_type;
58 int current_center_freq1;
59 int current_center_freq2;
60 enum ws80211_fcs_validation current_fcs_validation;
61 };
62
70 int ws80211_init(void);
71
76 /* XXX Should we make this an array of structs instead of an array of struct pointers?
77 * It'd save a bit of mallocing and freeing. */
78 GArray* ws80211_find_interfaces(void);
79
80 int ws80211_get_iface_info(const char *name, struct ws80211_iface_info *iface_info);
81
86 void ws80211_free_interfaces(GArray *interfaces);
87
97 int ws80211_set_freq(const char *name, guint32 freq, int chan_type, guint32 _U_ center_freq, guint32 _U_ center_freq2);
98
99 int ws80211_str_to_chan_type(const gchar *s);
100 const gchar *ws80211_chan_type_to_str(int type);
101
106 gboolean ws80211_has_fcs_filter(void);
107
114 int ws80211_set_fcs_validation(const char *name, enum ws80211_fcs_validation fcs_validation);
115
116
123 const char *ws80211_get_helper_path(void);
124
125 #ifdef __cplusplus
126 }
127 #endif /* __cplusplus */
128
129 #endif /* __WS80211_UTILS_H__ */
ws80211_interface
Definition: ws80211_utils.h:45
ws80211_iface_info
Definition: ws80211_utils.h:55