From 25d44cde11ab1b80bb74e9655a2dd60b3780124d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 4 Mar 2021 15:41:00 -0800 Subject: [PATCH] wsutil: rename frequency-utils.[ch] to 802_11-utils.[ch]. It's 802.11-specific, and may include non-frequency/channel-related items in the future. --- caputils/airpcap_loader.c | 2 +- epan/dissectors/packet-ieee80211-netmon.c | 2 +- epan/dissectors/packet-ieee80211-radiotap.c | 2 +- epan/dissectors/packet-ieee80211-wlancap.c | 2 +- epan/dissectors/packet-ppi.c | 2 +- ui/qt/wireless_frame.cpp | 2 +- wiretap/commview.c | 2 +- wiretap/peektagged.c | 2 +- wsutil/{frequency-utils.c => 802_11-utils.c} | 6 +++--- wsutil/{frequency-utils.h => 802_11-utils.h} | 20 +++++++++++--------- wsutil/CMakeLists.txt | 4 ++-- 11 files changed, 24 insertions(+), 22 deletions(-) rename wsutil/{frequency-utils.c => 802_11-utils.c} (96%) rename wsutil/{frequency-utils.h => 802_11-utils.h} (76%) diff --git a/caputils/airpcap_loader.c b/caputils/airpcap_loader.c index c5c8bb867e..191e8a7e19 100644 --- a/caputils/airpcap_loader.c +++ b/caputils/airpcap_loader.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/epan/dissectors/packet-ieee80211-netmon.c b/epan/dissectors/packet-ieee80211-netmon.c index 92038381f4..da0708ef8b 100644 --- a/epan/dissectors/packet-ieee80211-netmon.c +++ b/epan/dissectors/packet-ieee80211-netmon.c @@ -15,7 +15,7 @@ #include -#include +#include void proto_register_netmon_802_11(void); void proto_reg_handoff_netmon_802_11(void); diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index c573b09ed6..4dd9aa81c6 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/epan/dissectors/packet-ieee80211-wlancap.c b/epan/dissectors/packet-ieee80211-wlancap.c index 6f11e900dc..411d0946b9 100644 --- a/epan/dissectors/packet-ieee80211-wlancap.c +++ b/epan/dissectors/packet-ieee80211-wlancap.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "packet-ieee80211.h" diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c index 732a189c51..741057c306 100644 --- a/epan/dissectors/packet-ppi.c +++ b/epan/dissectors/packet-ppi.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/ui/qt/wireless_frame.cpp b/ui/qt/wireless_frame.cpp index 0a5fb7b125..df47d78b14 100644 --- a/ui/qt/wireless_frame.cpp +++ b/ui/qt/wireless_frame.cpp @@ -21,7 +21,7 @@ #include "ui/ws_ui_util.h" #include -#include +#include #include "wireshark_application.h" #include diff --git a/wiretap/commview.c b/wiretap/commview.c index 55b25f94b5..b7ebcf3ae3 100644 --- a/wiretap/commview.c +++ b/wiretap/commview.c @@ -31,7 +31,7 @@ #include "file_wrappers.h" #include "commview.h" -#include +#include typedef struct commview_header { guint16 data_len; diff --git a/wiretap/peektagged.c b/wiretap/peektagged.c index 873d22e2c4..ed2bfd0eb7 100644 --- a/wiretap/peektagged.c +++ b/wiretap/peektagged.c @@ -25,7 +25,7 @@ #include "wtap-int.h" #include "file_wrappers.h" #include "peektagged.h" -#include +#include /* CREDITS * diff --git a/wsutil/frequency-utils.c b/wsutil/802_11-utils.c similarity index 96% rename from wsutil/frequency-utils.c rename to wsutil/802_11-utils.c index 3c6d157423..9900bcbd28 100644 --- a/wsutil/frequency-utils.c +++ b/wsutil/802_11-utils.c @@ -1,5 +1,5 @@ -/* frequency-utils.c - * Frequency conversion utility definitions +/* 802_11-utils.c + * 802.11 utility definitions * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -12,7 +12,7 @@ #include -#include "frequency-utils.h" +#include "802_11-utils.h" typedef struct freq_cvt_s { guint fmin; /* Minimum frequency in MHz */ diff --git a/wsutil/frequency-utils.h b/wsutil/802_11-utils.h similarity index 76% rename from wsutil/frequency-utils.h rename to wsutil/802_11-utils.h index e7367ee3cf..43db61248c 100644 --- a/wsutil/frequency-utils.h +++ b/wsutil/802_11-utils.h @@ -1,5 +1,5 @@ -/* frequency-utils.h - * Frequency conversion utility definitions +/* 802_11-utils.h + * 802.11 utility definitions * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -8,8 +8,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef __FREQUENCY_UTILS_H__ -#define __FREQUENCY_UTILS_H__ +#ifndef __802_11_UTILS_H__ +#define __802_11_UTILS_H__ #include "ws_symbol_export.h" @@ -18,7 +18,7 @@ extern "C" { #endif /* __cplusplus */ /** @file - * Frequency and channel conversion utilities. + * 802.11 utilities. */ /** @@ -31,7 +31,7 @@ gint ieee80211_mhz_to_chan(guint freq); /** - * Given a channel number and a band type, return a center frequency. + * Given an 802.11 channel number and a band type, return a center frequency. * @param chan Channel number * @param is_bg TRUE if the channel is a b/g channel, FALSE otherwise. * @return The equivalent frequency or 0 if no match is found. @@ -41,9 +41,11 @@ guint ieee80211_chan_to_mhz(gint chan, gboolean is_bg); /** - * Given a frequency in MHz, return a string representation. + * Given an 802.11 channel center frequency in MHz, return a string + * representation. * @param freq Frequench in MHz. - * @return A string showing the frequency, channel number, and type. The string must be freed with g_free() after use. + * @return A string showing the frequency, channel number, and type. + * The string must be freed with g_free() after use. */ WS_DLL_PUBLIC gchar* @@ -56,7 +58,7 @@ ieee80211_mhz_to_str(guint freq); } #endif /* __cplusplus */ -#endif /* __FREQUENCY_UTILS_H__ */ +#endif /* __802_11_UTILS_H__ */ /* * Editor modelines diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index ce53962803..207b1dce81 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -12,6 +12,7 @@ add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\ add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}\") set(WSUTIL_PUBLIC_HEADERS + 802_11-utils.h adler32.h base32.h bits_count_ones.h @@ -36,7 +37,6 @@ set(WSUTIL_PUBLIC_HEADERS eax.h epochs.h filesystem.h - frequency-utils.h g711.h inet_addr.h inet_ipv4.h @@ -75,6 +75,7 @@ set(WSUTIL_PUBLIC_HEADERS ) set(WSUTIL_COMMON_FILES + 802_11-utils.c adler32.c base32.c bitswap.c @@ -95,7 +96,6 @@ set(WSUTIL_COMMON_FILES dot11decrypt_wep.c eax.c filesystem.c - frequency-utils.c g711.c inet_addr.c interface.c