From b925d719678210b76adeb105f5f4b41550eb6bb4 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 7 May 2024 14:15:49 -0700 Subject: [PATCH] sockets: garbage collect PRCOREQUESTS and stale comment The code deleted predates FreeBSD history. The comment deleted is 99% outdated. Why KAME decided to use these constants instead of normal ones also lost in centuries. --- sys/netinet6/icmp6.c | 4 ++-- sys/sys/protosw.h | 24 ------------------------ 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index c5e3334eca6..e0f64254432 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2683,7 +2683,7 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt) } switch (op) { - case PRCO_SETOPT: + case SOPT_SET: switch (optname) { case ICMP6_FILTER: { @@ -2708,7 +2708,7 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt) } break; - case PRCO_GETOPT: + case SOPT_GET: switch (optname) { case ICMP6_FILTER: { diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 60d8ffc3136..1d691166929 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -163,30 +163,6 @@ struct protosw { #define PR_CAPATTACH 0x80 /* socket can attach in cap mode */ #define PR_SOCKBUF 0x100 /* private implementation of buffers */ -/* - * The arguments to ctloutput are: - * (*protosw[].pr_ctloutput)(req, so, level, optname, optval, p); - * req is one of the actions listed below, so is a (struct socket *), - * level is an indication of which protocol layer the option is intended. - * optname is a protocol dependent socket option request, - * optval is a pointer to a mbuf-chain pointer, for value-return results. - * The protocol is responsible for disposal of the mbuf chain *optval - * if supplied, - * the caller is responsible for any space held by *optval, when returned. - * A non-zero return from ctloutput gives an - * UNIX error number which should be passed to higher level software. - */ -#define PRCO_GETOPT 0 -#define PRCO_SETOPT 1 - -#define PRCO_NCMDS 2 - -#ifdef PRCOREQUESTS -char *prcorequests[] = { - "GETOPT", "SETOPT", -}; -#endif - #ifdef _KERNEL struct domain *pffinddomain(int family); struct protosw *pffindproto(int family, int type, int proto);