Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
frequency-utils.h
Go to the documentation of this file.
1 /* frequency-utils.h
2  * Frequency conversion utility definitions
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 2007 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef __FREQUENCY_UTILS_H__
12 #define __FREQUENCY_UTILS_H__
13 
14 #include "ws_symbol_export.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19 
29 WS_DLL_PUBLIC
30 gint
31 ieee80211_mhz_to_chan(guint freq);
32 
39 WS_DLL_PUBLIC
40 guint
41 ieee80211_chan_to_mhz(gint chan, gboolean is_bg);
42 
48 WS_DLL_PUBLIC
49 gchar*
50 ieee80211_mhz_to_str(guint freq);
51 
52 /* Should this be "(freq < 4920)", or something else? */
53 #define FREQ_IS_BG(freq) (freq <= 2484)
54 
55 #ifdef __cplusplus
56 }
57 #endif /* __cplusplus */
58 
59 #endif /* __FREQUENCY_UTILS_H__ */
60 
61 /*
62  * Editor modelines
63  *
64  * Local Variables:
65  * c-basic-offset: 4
66  * tab-width: 8
67  * indent-tabs-mode: nil
68  * End:
69  *
70  * vi: set shiftwidth=4 tabstop=8 expandtab:
71  * :indentSize=4:tabSize=8:noTabs=true:
72  */
WS_DLL_PUBLIC gchar * ieee80211_mhz_to_str(guint freq)
Definition: frequency-utils.c:94
WS_DLL_PUBLIC gint ieee80211_mhz_to_chan(guint freq)
Definition: frequency-utils.c:63
WS_DLL_PUBLIC guint ieee80211_chan_to_mhz(gint chan, gboolean is_bg)
Definition: frequency-utils.c:78