Page MenuHomeFreeBSD

D52725.id162802.diff
No OneTemporary

D52725.id162802.diff

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,10 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20250925: Rename wlanstats to wlanstat
+OLD_FILES+=usr/sbin/wlanstats
+OLD_FILES+=usr/share/man/man8/wlanstats.8.gz
+
# 20250917: Remove a miscapitalized manual
OLD_FILES+=usr/share/man/man9/vnet.9.gz
OLD_FILES+=usr/share/man/man9/vimage.9.gz
diff --git a/lib/libbsdstat/bsdstat.h b/lib/libbsdstat/bsdstat.h
--- a/lib/libbsdstat/bsdstat.h
+++ b/lib/libbsdstat/bsdstat.h
@@ -76,7 +76,7 @@
* classes derived from it are useful.
*/
struct bsdstat {
- const char *name; /* statistics name, e.g. wlanstats */
+ const char *name; /* statistics name, e.g. wlanstat */
const struct fmt *stats; /* statistics in class */
int nstats; /* number of stats */
#define FMTS_IS_STAT 0x80 /* the following two bytes are the stat id */
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1013,7 +1013,7 @@
* Debugging facilities compiled in when IEEE80211_DEBUG is defined.
*
* The intent is that any problem in the net80211 layer can be
- * diagnosed by inspecting the statistics (dumped by the wlanstats
+ * diagnosed by inspecting the statistics (dumped by the wlanstat
* program) and/or the msgs generated by net80211. Messages are
* broken into functional classes and can be controlled with the
* wlandebug program. Certain of these msg groups are for facilities
diff --git a/tools/tools/net80211/Makefile b/tools/tools/net80211/Makefile
--- a/tools/tools/net80211/Makefile
+++ b/tools/tools/net80211/Makefile
@@ -1,3 +1,3 @@
-SUBDIR= stumbler w00t wesside wlaninject wlanstats wlantxtime wlanwatch wlanwds
+SUBDIR= stumbler w00t wesside wlaninject wlanstat wlantxtime wlanwatch wlanwds
.include <bsd.subdir.mk>
diff --git a/tools/tools/net80211/README b/tools/tools/net80211/README
--- a/tools/tools/net80211/README
+++ b/tools/tools/net80211/README
@@ -8,7 +8,7 @@
w00t variety of programs that use the raw packet interface
wesside WEP frag attack tool using raw packet interface
wlaninject inject 802.11 packets using the raw packet interface
-wlanstats dump net80211 statistics
+wlanstat dump net80211 statistics
wlanwatch monitor net80211 events via the routing socket
wlanwds handling of WDS dynamic links using vaps
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -209,7 +209,7 @@
SUBDIR.${MK_UTMPX}+= lastlogin
SUBDIR.${MK_UTMPX}+= utx
SUBDIR.${MK_WIRELESS}+= wlandebug
-SUBDIR.${MK_WIRELESS}+= wlanstats
+SUBDIR.${MK_WIRELESS}+= wlanstat
SUBDIR.${MK_WIRELESS}+= wpa
SUBDIR.${MK_TESTS}+= tests
diff --git a/usr.sbin/wlanstats/Makefile b/usr.sbin/wlanstat/Makefile
rename from usr.sbin/wlanstats/Makefile
rename to usr.sbin/wlanstat/Makefile
--- a/usr.sbin/wlanstats/Makefile
+++ b/usr.sbin/wlanstat/Makefile
@@ -1,13 +1,13 @@
.include <bsd.compiler.mk>
-PROG= wlanstats
-MAN= wlanstats.8
+PROG= wlanstat
+MAN= wlanstat.8
CFLAGS= -I${SRCTOP}/lib/libbsdstat
LIBADD= bsdstat
SRCS= main.c \
- wlanstats.c
+ wlanstat.c
CFLAGS.clang+= -fbracket-depth=512 -Wno-cast-align
diff --git a/usr.sbin/wlanstats/main.c b/usr.sbin/wlanstat/main.c
rename from usr.sbin/wlanstats/main.c
rename to usr.sbin/wlanstat/main.c
--- a/usr.sbin/wlanstats/main.c
+++ b/usr.sbin/wlanstat/main.c
@@ -28,7 +28,7 @@
*/
/*
- * wlanstats [-i interface]
+ * wlanstat [-i interface]
* (default interface is wlan0).
*/
@@ -45,7 +45,7 @@
#include <strings.h>
#include <unistd.h>
-#include "wlanstats.h"
+#include "wlanstat.h"
static struct {
const char *tag;
@@ -158,7 +158,7 @@
usage(void)
{
- printf("wlanstats: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n");
+ printf("wlanstat: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n");
}
int
@@ -176,7 +176,7 @@
ifname = getenv("WLAN");
if (ifname == NULL)
ifname = "wlan0";
- wf = wlanstats_new(ifname, getfmt("default"));
+ wf = wlanstat_new(ifname, getfmt("default"));
#if 0
while ((c = getopt(argc, argv, "ahi:lm:o:")) != -1) {
#else
diff --git a/usr.sbin/wlanstats/wlanstats.h b/usr.sbin/wlanstat/wlanstat.h
rename from usr.sbin/wlanstats/wlanstats.h
rename to usr.sbin/wlanstat/wlanstat.h
--- a/usr.sbin/wlanstats/wlanstats.h
+++ b/usr.sbin/wlanstat/wlanstat.h
@@ -27,8 +27,8 @@
* THE POSSIBILITY OF SUCH DAMAGES.
*/
-#ifndef _WLANSTATS_H_
-#define _WLANSTATS_H_
+#ifndef _WLANSTAT_H_
+#define _WLANSTAT_H_
#include "bsdstat.h"
@@ -50,5 +50,5 @@
void (*setstamac)(struct wlanstatfoo *, const uint8_t mac[]);
};
-struct wlanstatfoo *wlanstats_new(const char *ifname, const char *fmtstring);
-#endif /* _WLANSTATS_H_ */
+struct wlanstatfoo *wlanstat_new(const char *ifname, const char *fmtstring);
+#endif /* _WLANSTAT_H_ */
diff --git a/usr.sbin/wlanstats/wlanstats.8 b/usr.sbin/wlanstat/wlanstat.8
rename from usr.sbin/wlanstats/wlanstats.8
rename to usr.sbin/wlanstat/wlanstat.8
--- a/usr.sbin/wlanstats/wlanstats.8
+++ b/usr.sbin/wlanstat/wlanstat.8
@@ -7,10 +7,10 @@
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.Dd March 14, 2025
-.Dt WLANSTATS 8
+.Dt WLANSTAT 8
.Os
.Sh NAME
-.Nm wlanstats
+.Nm wlanstat
.Nd query 802.11 wireless network statistics
.Sh SYNOPSIS
.Nm
diff --git a/usr.sbin/wlanstats/wlanstats.c b/usr.sbin/wlanstat/wlanstat.c
rename from usr.sbin/wlanstats/wlanstats.c
rename to usr.sbin/wlanstat/wlanstat.c
--- a/usr.sbin/wlanstats/wlanstats.c
+++ b/usr.sbin/wlanstat/wlanstat.c
@@ -52,7 +52,7 @@
#include "../../sys/net80211/ieee80211_ioctl.h"
-#include "wlanstats.h"
+#include "wlanstat.h"
#ifndef IEEE80211_ADDR_COPY
#define IEEE80211_ADDR_COPY(dst, src) memcpy(dst, src, IEEE80211_ADDR_LEN)
@@ -61,7 +61,7 @@
#define AFTER(prev) ((prev)+1)
-static const struct fmt wlanstats[] = {
+static const struct fmt wlanstat[] = {
#define S_RX_BADVERSION 0
{ 5, "rx_badversion", "bvers", "rx frame with bad version" },
#define S_RX_TOOSHORT AFTER(S_RX_BADVERSION)
@@ -1032,14 +1032,14 @@
BSDSTAT_DEFINE_BOUNCE(wlanstatfoo)
struct wlanstatfoo *
-wlanstats_new(const char *ifname, const char *fmtstring)
+wlanstat_new(const char *ifname, const char *fmtstring)
{
struct wlanstatfoo_p *wf;
wf = calloc(1, sizeof(struct wlanstatfoo_p));
if (wf != NULL) {
- bsdstat_init(&wf->base.base, "wlanstats", wlanstats,
- nitems(wlanstats));
+ bsdstat_init(&wf->base.base, "wlanstat", wlanstat,
+ nitems(wlanstat));
/* override base methods */
wf->base.base.collect_cur = wlan_collect_cur;
wf->base.base.collect_tot = wlan_collect_tot;

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 22, 9:10 PM (6 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27162170
Default Alt Text
D52725.id162802.diff (6 KB)

Event Timeline