Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
Macros | Functions
frequency-utils.h File Reference
#include "ws_symbol_export.h"

Go to the source code of this file.

Macros

#define FREQ_IS_BG(freq)   (freq <= 2484)
 

Functions

WS_DLL_PUBLIC gint ieee80211_mhz_to_chan (guint freq)
 
WS_DLL_PUBLIC guint ieee80211_chan_to_mhz (gint chan, gboolean is_bg)
 
WS_DLL_PUBLIC gchar * ieee80211_mhz_to_str (guint freq)
 

Detailed Description

Frequency and channel conversion utilities.

Function Documentation

WS_DLL_PUBLIC guint ieee80211_chan_to_mhz ( gint  chan,
gboolean  is_bg 
)

Given a channel number and a band type, return a center frequency.

Parameters
chanChannel number
is_bgTRUE if the channel is a b/g channel, FALSE otherwise.
Returns
The equivalent frequency or 0 if no match is found.
WS_DLL_PUBLIC gint ieee80211_mhz_to_chan ( guint  freq)

Given a center frequency in MHz, return a channel number.

Parameters
freqFrequency in MHz.
Returns
The equivalent channel or -1 if no match is found.
WS_DLL_PUBLIC gchar* ieee80211_mhz_to_str ( guint  freq)

Given a frequency in MHz, return a string representation.

Parameters
freqFrequench in MHz.
Returns
A string showing the frequency, channel number, and type. The string must be freed with g_free() after use.