Example output of netstat -i -d --libxo json: {"statistics": {"interface: [{"name":"em0","flags":"0x8843","mtu":1500,"network":"<Link#1>","address":"xx:xx:xx:xx:xx:xx","received-packets":13445,"received-errors":0,"dropped-packets":0,"sent-packets":7580,"send-errors":0,"collisions":0,"dropped-packets":0}, etc. etc. "dropped-packets" is used twice. One is probably for "in" and the other for "out". Output without libxo: Name Mtu Network Address Ipkts Ierrs Idrop Opkts Oerrs Coll Drop em0 1500 <Link#1> xx:xx:xx:xx:xx:xx 14803 0 0 8191 0 0 0 etc.
Yes, this should be "dropped-packets-input" and "dropped-packets-output" to make this clear and useful. Thanks, Phil
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=94567c8641e235763b5b2926416d89d36654cde1 commit 94567c8641e235763b5b2926416d89d36654cde1 Author: Bram <bram@cbbg.nl> AuthorDate: 2024-07-23 08:57:42 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-09-20 15:06:26 +0000 netstat: Resolve duplicate "dropped-packets" key from libxo output The current libxo output uses the "dropped-packets" key for both incoming and outgoing packets. This commit distinguishes between the two by adding an "in" and "out" suffix. The original "dropped-packets" key is kept for backwards compatibility for now. PR: 244589 Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1331 usr.bin/netstat/if.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Thanks for resolving this issue!