K 10 svn:author V 6 karels K 8 svn:date V 27 2023-08-03T12:52:08.240957Z K 7 svn:log V 1297 netstat -i: compute most field widths dynamically The network and address fields were sometimes truncated for netstat -i without -W, and often much too wide for netstat -i with the -W option. Fields such as normal packet counts often overflowed. As a result, columns didn't line up, and large white spaces made it harder to follow a line across the display. Change the code to compute the required field sizes for network, address, and various packet counts. Hoist the code to format network and address into a subroutine that can be called twice, once to measure the required field widths, and once to emit the values. Use separate field widths for input and output packets, byte counts, and error and drop counters. These are left at defaults (the preceding values) with the -h option, in which case the fields have a limited total width. An extra space is included between the Network and Address, which otherwise seemed too close. Change the mention of -W with -i in the man page to say that most field widths are computed dynamically in this case. Reviewed by: sjg, glebius Differential Revision: https://reviews.freebsd.org/D41160 (cherry picked from commit 372e3d561d82aba7a66fcd4ecb49a4d0a9f69345) Git Hash: 193f782e525ed56939c97852f07244b587ab529d Git Author: karels@FreeBSD.org END