12#ifndef __WS80211_UTILS_H__
13#define __WS80211_UTILS_H__
41#define CHAN_NO_HT "NOHT"
43#define CHAN_HT20 "HT20"
45#define CHAN_HT40MINUS "HT40-"
47#define CHAN_HT40PLUS "HT40+"
49#define CHAN_HE40 "HE40"
51#define CHAN_VHT80 "VHT80"
53#define CHAN_VHT80P80 "VHT80+80"
55#define CHAN_VHT160 "VHT160"
57#define CHAN_EHT320 "EHT320"
134#define WS80211_ERROR_NOT_SUPPORTED 1
135#define WS80211_ERROR 2
197int ws80211_set_freq(
const char *name, uint32_t freq,
int chan_type, uint32_t _U_ center_freq, uint32_t _U_ center_freq2);
Describes the channel capabilities of a single RF band on a PHY.
Definition ws80211_utils.h:96
int channel_types
Definition ws80211_utils.h:99
GArray * frequencies
Definition ws80211_utils.h:97
Describes a single frequency and its channel-type constraints.
Definition ws80211_utils.h:85
int channel_mask
Definition ws80211_utils.h:87
uint32_t freq
Definition ws80211_utils.h:86
Snapshot of the current configuration of a wireless interface.
Definition ws80211_utils.h:120
enum ws80211_fcs_validation current_fcs_validation
Definition ws80211_utils.h:125
int current_center_freq1
Definition ws80211_utils.h:123
int current_center_freq2
Definition ws80211_utils.h:124
int current_freq
Definition ws80211_utils.h:121
enum ws80211_channel_type current_chan_type
Definition ws80211_utils.h:122
Represents a wireless network interface and its capture capabilities.
Definition ws80211_utils.h:107
GArray * bands
Definition ws80211_utils.h:111
char * ifname
Definition ws80211_utils.h:108
bool can_set_freq
Definition ws80211_utils.h:109
int cap_monitor
Definition ws80211_utils.h:114
bool can_check_fcs
Definition ws80211_utils.h:110
GArray * ws80211_find_interfaces(void)
Finds and returns a list of wireless network interfaces.
Definition ws80211_utils.c:1179
void ws80211_clear_band(struct ws80211_band *band)
Clear the frequencies array in a ws80211_band structure.
Definition ws80211_utils.c:1244
ws80211_band_type
Supported RF band identifiers (not equivalent to Linux NL80211_BAND_*).
Definition ws80211_utils.h:66
@ WS80211_BAND_6GHZ
Definition ws80211_utils.h:69
@ WS80211_BAND_5GHZ
Definition ws80211_utils.h:68
@ WS80211_BAND_2GHZ
Definition ws80211_utils.h:67
int ws80211_str_to_chan_type(const char *s)
Convert a string representation of a channel type to its corresponding enum value.
const char * ws80211_geterror(int error)
Definition ws80211_utils.c:1174
ws80211_channel_type
IEEE 802.11 channel width/type for monitor mode configuration.
Definition ws80211_utils.h:28
@ WS80211_CHAN_HE40
Definition ws80211_utils.h:33
@ WS80211_CHAN_HT40PLUS
Definition ws80211_utils.h:32
@ WS80211_CHAN_VHT80
Definition ws80211_utils.h:34
@ WS80211_CHAN_VHT160
Definition ws80211_utils.h:36
@ WS80211_CHAN_HT40MINUS
Definition ws80211_utils.h:31
@ WS80211_CHAN_VHT80P80
Definition ws80211_utils.h:35
@ WS80211_CHAN_EHT320
Definition ws80211_utils.h:37
@ WS80211_CHAN_NO_HT
Definition ws80211_utils.h:29
@ WS80211_CHAN_HT20
Definition ws80211_utils.h:30
ws80211_fcs_validation
FCS (Frame Check Sequence) capture filter policy.
Definition ws80211_utils.h:75
@ WS80211_FCS_VALID
Definition ws80211_utils.h:77
@ WS80211_FCS_INVALID
Definition ws80211_utils.h:78
@ WS80211_FCS_ALL
Definition ws80211_utils.h:76
int ws80211_set_freq(const char *name, uint32_t freq, int chan_type, uint32_t _U_ center_freq, uint32_t _U_ center_freq2)
Set the frequency and channel width for an interface.
int ws80211_set_fcs_validation(const char *name, enum ws80211_fcs_validation fcs_validation)
Set the FCS validation behavior for an interface.
int ws80211_init(void)
Definition ws80211_utils.c:1169
const char * ws80211_band_type_to_str(enum ws80211_band_type type)
Convert a Wi-Fi band type to its string representation.
Definition ws80211_utils.c:1204
const char * ws80211_get_helper_path(void)
Get the path to a helper application.
Definition ws80211_utils.c:1219
int ws80211_get_iface_info(const char *name, struct ws80211_iface_info *iface_info)
Get information about a wireless interface.
const char * ws80211_chan_type_to_str(enum ws80211_channel_type type)
Convert a Wi-Fi channel type to its string representation.
Definition ws80211_utils.c:1199
int ws80211_get_center_frequency(int control_frequency, enum ws80211_channel_type channel_type)
Return center frequency of an 80M/160M/320M channel.
Definition ws80211_utils.c:1251
void ws80211_free_interfaces(GArray *interfaces)
Free an interface list.
Definition ws80211_utils.c:1227
bool ws80211_has_fcs_filter(void)
Check to see if we have FCS filtering.
Definition ws80211_utils.c:1209