Page MenuHomeFreeBSD

netstat -i: do not truncate interface names
ClosedPublic

Authored by karels on Jul 3 2022, 8:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 27 2024, 3:20 AM
Unknown Object (File)
Feb 6 2024, 4:37 AM
Unknown Object (File)
Dec 20 2023, 7:51 AM
Unknown Object (File)
Dec 18 2023, 3:20 PM
Unknown Object (File)
Dec 12 2023, 10:48 AM
Unknown Object (File)
Nov 10 2023, 4:43 PM
Unknown Object (File)
Nov 10 2023, 2:06 AM
Unknown Object (File)
Nov 8 2023, 2:01 AM
Subscribers

Details

Summary

The field for interface names for netstat -i was 5 characters by
default, which is no longer sufficient with names like "vlan1234"
and "vtnet0". netstat -iW computed the necessary field width, but
also enlarged the name field by a lot (especially with IPv6 enabled).
Make netstat -i compute the field width for interface names with or
without -W. Note that the existing default output does not fit in
80 columns in any case. Update the man page accordingly, documenting
the remaining effect of -W with -i. Also add -W to the list of
General Options, as there are numerous pointers to this.

Test Plan

tested on systems with longer interface names, including vtnet0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable