Download raw body.
netstat nits and options
On Thu, Jul 16, 2026 at 12:53:02PM +0200, Alexander Bluhm wrote:
> Hi,
>
> Claudio tricked me to have a closer look at the netstat man page.
> Fix some nits and options.
>
> - Use NULL for pointer.
> - The if_errs->count() has the additinal space indent in other places.
> - Add -v to usage where long IPv6 addresses are not truncated.
> - Only IPv6 multicast routes used -l for not truncating. Use -v for
> that features everywhere. It is documented in general at -v,
> remove the long explanation at -l.
> - I don't understand "(interfaces statically configured into a
> system but not located at boot-time are not shown)". Just delete
> the sentence.
> - Option -w wait picks the first egress interface. Document
> it, otherwise the sentence and behavior is confusing.
>
> ok?
>
> Index: usr.bin/netstat/main.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/usr.bin/netstat/main.c,v
> diff -u -p -r1.125 main.c
> --- usr.bin/netstat/main.c 21 Jun 2025 22:08:44 -0000 1.125
> +++ usr.bin/netstat/main.c 16 Jul 2026 08:57:10 -0000
> @@ -476,15 +476,17 @@ static void
> usage(void)
> {
> (void)fprintf(stderr,
> - "usage: netstat [-AaBln] [-M core] [-N system] [-p protocol] [-T rtable]\n"
> + "usage: netstat [-AaBlnv] [-M core] [-N system] [-p protocol] "
> + "[-T rtable]\n"
> " netstat -W interface\n"
> " netstat -m\n"
> - " netstat -I interface | -i [-bdehnq]\n"
> + " netstat -I interface | -i [-bdehnqv]\n"
Isn't here g missing the the alphabet soup at the end?
> " netstat -w wait [-bdehnq] [-c count] [-I interface]\n"
And here as well?
> " netstat -s [-gru] [-f address_family] [-p protocol]\n"
> - " netstat -g [-lnu] [-f address_family]\n"
> + " netstat -g [-nuv] [-f address_family]\n"
> " netstat -R\n"
> - " netstat -r [-AFu] [-f address_family] [-M core] [-N system] [-T rtable]\n"
> + " netstat -r [-AFuv] [-f address_family] [-M core] "
> + "[-N system] [-T rtable]\n"
> " netstat -P pcbaddr [-v] [-M core] [-N system]\n");
> exit(1);
> }
> Index: usr.bin/netstat/netstat.1
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/usr.bin/netstat/netstat.1,v
> diff -u -p -r1.99 netstat.1
> --- usr.bin/netstat/netstat.1 16 Jul 2026 08:16:36 -0000 1.99
> +++ usr.bin/netstat/netstat.1 16 Jul 2026 09:03:45 -0000
> @@ -38,7 +38,7 @@
> .Nd show network status
> .Sh SYNOPSIS
> .Nm
> -.Op Fl AaBln
> +.Op Fl AaBlnv
> .Op Fl M Ar core
> .Op Fl N Ar system
> .Op Fl p Ar protocol
> @@ -49,7 +49,7 @@
> .Fl m
> .Nm
> .Fl I Ar interface | Fl i
> -.Op Fl bdehnq
> +.Op Fl bdehnqv
> .Nm
> .Fl w Ar wait
> .Op Fl bdehnq
I think 'g' needs to be added here as well.
> @@ -62,13 +62,13 @@
> .Op Fl p Ar protocol
> .Nm
> .Fl g
> -.Op Fl lnu
> +.Op Fl nuv
> .Op Fl f Ar address_family
> .Nm
> .Fl R
> .Nm
> .Fl r
> -.Op Fl AFu
> +.Op Fl AFuv
> .Op Fl f Ar address_family
> .Op Fl M Ar core
> .Op Fl N Ar system
Rest looks reasonable. OK claudio@
--
:wq Claudio
netstat nits and options