opnsense-src/usr.bin/netstat
Lexi Winter 6b86b8f0f6 netstat: increase width of Netif column
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.

Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223

(cherry picked from commit d33b87e8cf91a6bcb5eac0ecc0371c1041c61050)

netstat: for -W, use IFNAMSIZ

If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.

(cherry picked from commit ae9c0ba8ef2f540f9030909cf07e3c59f876fd23)
2024-10-08 12:02:24 +08:00
..
bpf.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
common.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
common.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
if.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
inet.c tcp: improve SEG.ACK validation 2024-08-04 01:05:13 +02:00
inet6.c netstat: fix missing tab in icmp6 output 2023-11-19 20:29:50 +01:00
ipsec.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
main.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mbuf.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
mroute.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
mroute6.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
netgraph.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
netisr.c Remove $FreeBSD$: two-line .c pattern 2023-08-16 11:54:34 -06:00
netstat.1 Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
netstat.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
nhgrp.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
nhops.c netstat: increase width of Netif column 2024-10-08 12:02:24 +08:00
nlist_symbols Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pfkey.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
route.c netstat: increase width of Netif column 2024-10-08 12:02:24 +08:00
route_netlink.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sctp.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
unix.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00