mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
wlanstat(8): Rename from wlanstats(8) to keep consistency
All the status and statistics utilties in base are ending with "stat", the only exception is mailstats(8) but that's from sendmail. Reviewed by: imp, adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52724
This commit is contained in:
7 files changed
+23
-19
No files matched your search
@@ -51,6 +51,10 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20250930: Rename wlanstats to wlanstat
|
||||
OLD_FILES+=usr/sbin/wlanstats
|
||||
OLD_FILES+=usr/share/man/man8/wlanstats.8.gz
|
||||
|
||||
# 20250929: Remove ftpd(8)
|
||||
OLD_FILES+=etc/rc.d/ftpd
|
||||
OLD_FILES+=usr/libexec/ftpd
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ SUBDIR.${MK_UTMPX}+= ac
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 @@ static void
|
||||
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 @@ main(int argc, char *argv[])
|
||||
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
|
||||
@@ -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
|
||||
@@ -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 @@ wlan_get_totstat(struct bsdstat *sf, int s, char b[], size_t bs)
|
||||
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;
|
||||
@@ -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 @@ struct wlanstatfoo {
|
||||
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_ */
|
||||
Reference in new issue
Block a user