Page MenuHomeFreeBSD

netstat -i: do not truncate interface names
ClosedPublic

Authored by karels on Jul 3 2022, 8:18 PM.
Tags
None
Referenced Files
F126848702: D35703.id107703.diff
Sun, Aug 24, 6:34 PM
F126844882: D35703.diff
Sun, Aug 24, 5:19 PM
F126844038: D35703.id107829.diff
Sun, Aug 24, 5:01 PM
F126842674: D35703.id.diff
Sun, Aug 24, 4:26 PM
Unknown Object (File)
Thu, Aug 14, 2:10 AM
Unknown Object (File)
Wed, Aug 13, 4:13 PM
Unknown Object (File)
Tue, Jul 29, 3:12 AM
Unknown Object (File)
Jul 25 2025, 6:55 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46240
Build 43129: arc lint + arc unit