Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
ws80211_utils.h File Reference
#include <wireshark.h>

Go to the source code of this file.

Classes

struct  ws80211_interface
 
struct  ws80211_iface_info
 

Macros

#define CHAN_NO_HT   "NOHT"
 
#define CHAN_HT20   "HT20"
 
#define CHAN_HT40MINUS   "HT40-"
 
#define CHAN_HT40PLUS   "HT40+"
 
#define CHAN_VHT80   "VHT80"
 
#define CHAN_VHT80P80   "VHT80+80"
 
#define CHAN_VHT160   "VHT160"
 
#define WS80211_INIT_OK   0
 
#define WS80211_INIT_NOT_SUPPORTED   1
 

Enumerations

enum  ws80211_channel_type {
  WS80211_CHAN_NO_HT , WS80211_CHAN_HT20 , WS80211_CHAN_HT40MINUS , WS80211_CHAN_HT40PLUS ,
  WS80211_CHAN_VHT80 , WS80211_CHAN_VHT80P80 , WS80211_CHAN_VHT160
}
 
enum  ws80211_fcs_validation { WS80211_FCS_ALL , WS80211_FCS_VALID , WS80211_FCS_INVALID }
 

Functions

int ws80211_init (void)
 
GArray * ws80211_find_interfaces (void)
 
int ws80211_get_iface_info (const char *name, struct ws80211_iface_info *iface_info)
 
void ws80211_free_interfaces (GArray *interfaces)
 
int ws80211_set_freq (const char *name, uint32_t freq, int chan_type, uint32_t _U_ center_freq, uint32_t _U_ center_freq2)
 
int ws80211_str_to_chan_type (const char *s)
 
const char * ws80211_chan_type_to_str (int type)
 
bool ws80211_has_fcs_filter (void)
 
int ws80211_set_fcs_validation (const char *name, enum ws80211_fcs_validation fcs_validation)
 
const char * ws80211_get_helper_path (void)
 

Detailed Description

Copyright 2012, Pontus Fuchs pontu.nosp@m.s.fu.nosp@m.chs@g.nosp@m.mail.nosp@m..com

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Macro Definition Documentation

◆ WS80211_INIT_OK

#define WS80211_INIT_OK   0

Initialize the 802.11 environment. On Linux this initializes an nl80211_state struct.

Returns
WS80211_INIT_OK on success, WS80211_INIT_NOT_SUPPORTED if the 802.11 environment isn't supported, or the negative of an errno value on failure.

Function Documentation

◆ ws80211_find_interfaces()

GArray * ws80211_find_interfaces ( void  )

Build a list of 802.11 interfaces.

Returns
A GArray of pointers to struct ws80211_interface on success, NULL on failure.

◆ ws80211_free_interfaces()

void ws80211_free_interfaces ( GArray *  interfaces)

Free an interface list.

Parameters
interfacesA list of interfaces created with ws80211_find_interfaces().

◆ ws80211_get_helper_path()

const char * ws80211_get_helper_path ( void  )

Get the path to a helper application. Return the path to a separate 802.11 helper application, e.g. the GNOME Network Manager.

Returns
The path to the helper on success, NULL on failure.

◆ ws80211_has_fcs_filter()

bool ws80211_has_fcs_filter ( void  )

Check to see if we have FCS filtering.

Returns
true if FCS filtering is supported on this platform.

◆ ws80211_set_fcs_validation()

int ws80211_set_fcs_validation ( const char *  name,
enum ws80211_fcs_validation  fcs_validation 
)

Set the FCS validation behavior for an interface.

Parameters
nameThe interface name.
fcs_validationThe desired validation behavior.
Returns
Zero on success, nonzero on failure.

◆ ws80211_set_freq()

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.

Parameters
nameThe interface name.
freqThe frequency in MHz.
chan_typeThe HT channel type (no, 20Mhz, 40Mhz...).
center_freqThe center frequency in MHz (if 80MHz, 80+80MHz or 160MHz).
center_freq2The 2nd center frequency in MHz (if 80+80MHz).
Returns
Zero on success, nonzero on failure.