git: ddf24a507c1a - main - netstat: cleanup

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Thu, 20 Apr 2023 22:06:28 UTC
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=ddf24a507c1a7509d9657e477e69f1e7d08c77a6

commit ddf24a507c1a7509d9657e477e69f1e7d08c77a6
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-04-20 21:52:19 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-04-20 21:52:19 +0000

    netstat: cleanup
    
    protopr does not support reading from a core anymore.
    So don't state that it can.
    
    Reviewed by:            glebius, rscheff, rrs
    MFC after:              1 week
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D39688
---
 usr.bin/netstat/main.c        | 22 +++++++++++-----------
 usr.bin/netstat/nlist_symbols |  4 ----
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 078d8cca3c61..f0db6409f1eb 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -88,9 +88,9 @@ static struct protox {
 	int	pr_usesysctl;		/* non-zero if we use sysctl, not kvm */
 	int	pr_protocol;
 } protox[] = {
-	{ N_TCBINFO,	N_TCPSTAT,	1,	protopr,
+	{ -1	,	N_TCPSTAT,	1,	protopr,
 	  tcp_stats,	NULL,		"tcp",	1,	IPPROTO_TCP },
-	{ N_UDBINFO,	N_UDPSTAT,	1,	protopr,
+	{ -1	,	N_UDPSTAT,	1,	protopr,
 	  udp_stats,	NULL,		"udp",	1,	IPPROTO_UDP },
 #ifdef SCTP
 	{ -1,		N_SCTPSTAT,	1,	sctp_protopr,
@@ -100,13 +100,13 @@ static struct protox {
 	{ -1,		-1,		1,	protopr,
 	 NULL,		NULL,		"sdp",	1,	IPPROTO_TCP },
 #endif
-	{ N_DIVCBINFO,	-1,		1,	protopr,
+	{ -1	,	-1,		1,	protopr,
 	  divert_stats,	NULL,		"divert", 1,	0 },
-	{ N_RIPCBINFO,	N_IPSTAT,	1,	protopr,
+	{ -1	,	N_IPSTAT,	1,	protopr,
 	  ip_stats,	NULL,		"ip",	1,	IPPROTO_RAW },
-	{ N_RIPCBINFO,	N_ICMPSTAT,	1,	protopr,
+	{ -1	,	N_ICMPSTAT,	1,	protopr,
 	  icmp_stats,	NULL,		"icmp",	1,	IPPROTO_ICMP },
-	{ N_RIPCBINFO,	N_IGMPSTAT,	1,	protopr,
+	{ -1	,	N_IGMPSTAT,	1,	protopr,
 	  igmp_stats,	NULL,		"igmp",	1,	IPPROTO_IGMP },
 #ifdef IPSEC
 	{ -1,		N_IPSEC4STAT,	1,	NULL,	/* keep as compat */
@@ -118,7 +118,7 @@ static struct protox {
 	{ -1,		N_IPCOMPSTAT,	1,	NULL,
 	  ipcomp_stats,	NULL,		"ipcomp", 1,	0},
 #endif
-	{ N_RIPCBINFO,	N_PIMSTAT,	1,	protopr,
+	{ -1	,	N_PIMSTAT,	1,	protopr,
 	  pim_stats,	NULL,		"pim",	1,	IPPROTO_PIM },
 	{ -1,		N_CARPSTATS,	1,	NULL,
 	  carp_stats,	NULL,		"carp",	1,	0 },
@@ -134,13 +134,13 @@ static struct protox {
 
 #ifdef INET6
 static struct protox ip6protox[] = {
-	{ N_TCBINFO,	N_TCPSTAT,	1,	protopr,
+	{ -1	,	N_TCPSTAT,	1,	protopr,
 	  tcp_stats,	NULL,		"tcp",	1,	IPPROTO_TCP },
-	{ N_UDBINFO,	N_UDPSTAT,	1,	protopr,
+	{ -1	,	N_UDPSTAT,	1,	protopr,
 	  udp_stats,	NULL,		"udp",	1,	IPPROTO_UDP },
-	{ N_RIPCBINFO,	N_IP6STAT,	1,	protopr,
+	{ -1	,	N_IP6STAT,	1,	protopr,
 	  ip6_stats,	ip6_ifstats,	"ip6",	1,	IPPROTO_RAW },
-	{ N_RIPCBINFO,	N_ICMP6STAT,	1,	protopr,
+	{ -1	,	N_ICMP6STAT,	1,	protopr,
 	  icmp6_stats,	icmp6_ifstats,	"icmp6", 1,	IPPROTO_ICMPV6 },
 #ifdef SDP
 	{ -1,		-1,		1,	protopr,
diff --git a/usr.bin/netstat/nlist_symbols b/usr.bin/netstat/nlist_symbols
index 1c09d81c0b98..3583887ad9d7 100644
--- a/usr.bin/netstat/nlist_symbols
+++ b/usr.bin/netstat/nlist_symbols
@@ -4,7 +4,6 @@
 all	_ahstat
 all	_arpstat
 all	_carpstats
-all	_divcbinfo
 all	_espstat
 all	_icmp6stat
 all	_icmpstat
@@ -36,15 +35,12 @@ all	_pfsyncstats
 all	_pim6stat
 all	_pimstat
 all	_rip6stat
-all	_ripcbinfo
 all	_rtree
 all	_rtstat
 all	_sctpstat
 all	_sfstat
-all	_tcbinfo
 all	_tcpstat
 all	_tcps_states
-all	_udbinfo
 all	_udpstat
 all	_unp_count
 all	_unp_dhead