HomeFreeBSD

netstat: increase width of Netif column

Description

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)

Details

Provenance
lexi_le-fay.orgAuthored on May 8 2024, 9:44 AM
zleiCommitted on Oct 8 2024, 4:02 AM
Parents
rG80b19c315004: ObsoleteFiles.inc: Update after libpcap upgrade from 1.10.4 to 1.10.5
Branches
Unknown
Tags
Unknown