Date: Mon, 18 Jun 2018 19:23:21 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 190281] netstat -s -i only shows ip6 statistics Message-ID: <bug-190281-227-taadBJa4vS@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-190281-227@https.bugs.freebsd.org/bugzilla/> References: <bug-190281-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D190281 Marie Helene Kvello-Aune <marieheleneka@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marieheleneka@gmail.com --- Comment #3 from Marie Helene Kvello-Aune <marieheleneka@gmail.com> --- I decided to look at this today, and to my surprise, I found that netstat doesn't implement per-interface statistics for IPv4 at all. In usr.bin/netstat/main.c, line 105-106: { N_RIPCBINFO, N_IPSTAT, 1, protopr, ip_stats, NULL, "ip", 1, IPPROTO_RAW }, The 6th argument is supposed to be the function which prints per-interface statistics. The equivelant lines for IPv6 (line 141-142): { N_RIPCBINFO, N_IP6STAT, 1, protopr, ip6_stats, ip6_ifstats, "ip6", 1, IPPROTO_RAW }, ip6_stats and ip6_ifstats are implemented in usr.bin/netstat/inet6.c. ip_stats (but no ip_ifstats) is implemented in usr.bin/netstat/inet.c. tl;dr: someone has to implement functions to print the IPv4 information as well. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-190281-227-taadBJa4vS>