From nobody Tue Oct 04 03:57:30 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MhP6g1JjLz4dlHf; Tue, 4 Oct 2022 03:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MhP6g0YrFz3sCc; Tue, 4 Oct 2022 03:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664855851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tKwiId0YK1fV4exBZm3iUhc9IV0xTPorJB6JgF0EQY=; b=einBGVHAc5L1Y+ayyf7MnYD6i8rvx7QVFdOyWJ+EgbavtSRT6vfefKXA1S7C5WEyq5oA9G sd9BDzBHmKLJNNcWJ0uUIZPady/IwjAZTOKJb8m3BcW3674GUZLcoN9/EOR9jC1f7yju+D LIAypL6gRIDcsXHcsgmyfXC/eSBnewKRT5NqI9+LuipFK9YJBwWCHLrE7CLj0gF/vx9R7h v4IEjGNFtmJuCLnH02QVXZwORapcMSRMhBMRTpno0AfQKge8QuyaIriP9Cjs4QixXRQLxo UjDdPUPNseI/TGBha59rttNLvpnwDtUMvDC4CcDPo5j0zl4lKV75Cwpw6xD3hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MhP6f6dc1zQxt; Tue, 4 Oct 2022 03:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2943vUTR015275; Tue, 4 Oct 2022 03:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2943vUh0015274; Tue, 4 Oct 2022 03:57:30 GMT (envelope-from git) Date: Tue, 4 Oct 2022 03:57:30 GMT Message-Id: <202210040357.2943vUh0015274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 46ddeb6be8e8 - main - netinet6: retire ip6protosw.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46ddeb6be8e839d4e404c98c230fe1b57a9ea32f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664855851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tKwiId0YK1fV4exBZm3iUhc9IV0xTPorJB6JgF0EQY=; b=eYrffMWCfJfucJgg3xW+vOb120QGo2D3saieHUvZv/T5lzlBbJX3mY1IhXyLRI372yI2Tz Z8d9W72ScpDHeP0T6WW64R9yObgDeUxwv6tU6gTdyLv0Mx6hM7fzstOBQzWenuRAKPbDfn wzd/KOummFZDUohaYRkP85IY03puvwKnGQam2kG6waSbwneLc0hq29iP/lqfyq0tEkcFKt F8Lt0LMdeQJ94kj+MgEZE/KiTy62TSdj/VKwPAWaWUmC1HMaUXMcDl6hda/MQrg/zRAGs9 PekcuorlheFbsx/TPusIbEILzrcGMKPl9by+0IjJ3aRrk5TLgEKeK/r+wb4N9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664855851; a=rsa-sha256; cv=none; b=gZVOv4oo6tXYHiO62hyZqCaYHCZSpvOz3h6uoliSfTnpythRRYAAVCb+LCoKFRUdCGUp2v 5R/rCJXnvUaQ5BafI11MNUfbOOlRXWB9OUOolX57R1ZzKdyOWGnk+1yUkS3/HaE0pUUJP5 nbN+9dg9I7Tg0iaAp+PS9fD/Wwnx61xTPK0DfS3GjC0yLfMlb2lntDpGeWJwd2iCi8bhj2 p5FKsR3/3TBLbnud6/PyALV3Pu3nVTA3vhUGSnQE0IsRCndhwtUEbwpxKi6/wdod4bVutN zMWQv1yDOkRBWahhJf6aSKR1CqLjWxSZ6qqskF0c5GDD3eST3MB5O7c2A4N34w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=46ddeb6be8e839d4e404c98c230fe1b57a9ea32f commit 46ddeb6be8e839d4e404c98c230fe1b57a9ea32f Author: Gleb Smirnoff AuthorDate: 2022-10-04 03:53:04 +0000 Commit: Gleb Smirnoff CommitDate: 2022-10-04 03:53:04 +0000 netinet6: retire ip6protosw.h The netinet/ipprotosw.h and netinet6/ip6protosw.h were KAME relics, with the former removed in f0ffb944d25 in 2001 and the latter survived until today. It has been reduced down to only one useful declaration that moves to ip6_var.h Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36726 --- ObsoleteFiles.inc | 3 ++ sys/netinet/sctp_os_bsd.h | 1 - sys/netinet/tcp_subr.c | 3 -- sys/netinet/tcp_timewait.c | 3 -- sys/netinet6/icmp6.c | 1 - sys/netinet6/in6_proto.c | 2 - sys/netinet6/ip6_input.c | 2 - sys/netinet6/ip6_output.c | 1 - sys/netinet6/ip6_var.h | 29 +++++++++++ sys/netinet6/ip6protosw.h | 119 --------------------------------------------- sys/netinet6/raw_ip6.c | 1 - sys/netinet6/udp6_usrreq.c | 1 - sys/netipsec/ipsec_input.c | 1 - 13 files changed, 32 insertions(+), 135 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 3d9e7d4c6dd4..6cccea90c74f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20221003: ip6protosw.h removed +OLD_FILES+=usr/include/netinet6/ip6protosw.h + # 20221001: deorbit opie OLD_FILES+=etc/opieaccess OLD_FILES+=etc/opiekeys diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index 8240fca64c48..d9b5c140f14c 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #endif /* INET6 */ diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 9b3525815f73..b9c5be5592f5 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -120,9 +120,6 @@ __FBSDID("$FreeBSD$"); #ifdef TCPDEBUG #include #endif -#ifdef INET6 -#include -#endif #ifdef TCP_OFFLOAD #include #endif diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index ad183aa2e18f..5cac0af946a9 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -86,9 +86,6 @@ __FBSDID("$FreeBSD$"); #ifdef TCPDEBUG #include #endif -#ifdef INET6 -#include -#endif #include #include diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 6b81c7a6b000..0d8786907716 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 688702e17e34..da15e6e2d13d 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -119,8 +119,6 @@ __FBSDID("$FreeBSD$"); #include #endif /* SCTP */ -#include - /* netinet6/raw_ip6.c */ extern struct protosw rip6_protosw; /* netinet6/udp6_usrreq.c */ diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 5c802beae2ee..31a3170475cb 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -129,8 +129,6 @@ __FBSDID("$FreeBSD$"); #include -#include - ip6proto_input_t *ip6_protox[IPPROTO_MAX] = { [0 ... IPPROTO_MAX - 1] = rip6_input }; ip6proto_ctlinput_t *ip6_ctlprotox[IPPROTO_MAX] = { diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 617271f96407..b976b0583515 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -121,7 +121,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include #include extern int in6_mcast_loop; diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 69ed33bd8e70..2b15443fc4d6 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -414,6 +414,35 @@ u_int32_t ip6_randomid(void); u_int32_t ip6_randomflowlabel(void); void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); +/* + * Argument type for the last arg of ip6proto_ctlinput_t(). + * + * IPv6 ICMP IPv6 [exthdrs] finalhdr payload + * ^ ^ ^ ^ + * | | ip6c_ip6 ip6c_off + * | ip6c_icmp6 + * ip6c_m + * + * ip6c_finaldst usually points to ip6c_ip6->ip6_dst. if the original + * (internal) packet carries a routing header, it may point the final + * destination address in the routing header. + * + * ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6 + * (beware of flowlabel, if you try to compare it against others) + * ip6c_dst: ip6c_finaldst + scope info + */ +struct ip6ctlparam { + struct mbuf *ip6c_m; /* start of mbuf chain */ + struct icmp6_hdr *ip6c_icmp6; /* icmp6 header of target packet */ + struct ip6_hdr *ip6c_ip6; /* ip6 header of target packet */ + int ip6c_off; /* offset of the target proto header */ + struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */ + struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */ + struct in6_addr *ip6c_finaldst; /* final destination address */ + void *ip6c_cmdarg; /* control command dependent data */ + u_int8_t ip6c_nxt; /* final next header field */ +}; + typedef int ip6proto_input_t(struct mbuf **, int *, int); typedef void ip6proto_ctlinput_t(int, struct sockaddr *, void *); int ip6proto_register(uint8_t, ip6proto_input_t, ip6proto_ctlinput_t); diff --git a/sys/netinet6/ip6protosw.h b/sys/netinet6/ip6protosw.h deleted file mode 100644 index d978e33042b9..000000000000 --- a/sys/netinet6/ip6protosw.h +++ /dev/null @@ -1,119 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $KAME: ip6protosw.h,v 1.25 2001/09/26 06:13:03 keiichi Exp $ - */ - -/*- - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)protosw.h 8.1 (Berkeley) 6/2/93 - * BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp - * $FreeBSD$ - */ - -#ifndef _NETINET6_IP6PROTOSW_H_ -#define _NETINET6_IP6PROTOSW_H_ - -/* - * Protocol switch table for IPv6. - * All other definitions should refer to sys/protosw.h - */ - -struct mbuf; -struct sockaddr; -struct socket; -struct domain; -struct thread; -struct ip6_hdr; -struct icmp6_hdr; -struct in6_addr; -struct pr_usrreqs; - -/* - * argument type for the last arg of pr_ctlinput(). - * should be consulted only with AF_INET6 family. - * - * IPv6 ICMP IPv6 [exthdrs] finalhdr payload - * ^ ^ ^ ^ - * | | ip6c_ip6 ip6c_off - * | ip6c_icmp6 - * ip6c_m - * - * ip6c_finaldst usually points to ip6c_ip6->ip6_dst. if the original - * (internal) packet carries a routing header, it may point the final - * destination address in the routing header. - * - * ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6 - * (beware of flowlabel, if you try to compare it against others) - * ip6c_dst: ip6c_finaldst + scope info - */ -struct ip6ctlparam { - struct mbuf *ip6c_m; /* start of mbuf chain */ - struct icmp6_hdr *ip6c_icmp6; /* icmp6 header of target packet */ - struct ip6_hdr *ip6c_ip6; /* ip6 header of target packet */ - int ip6c_off; /* offset of the target proto header */ - struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */ - struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */ - struct in6_addr *ip6c_finaldst; /* final destination address */ - void *ip6c_cmdarg; /* control command dependent data */ - u_int8_t ip6c_nxt; /* final next header field */ -}; - -#ifdef _KERNEL -extern struct protosw inet6sw[]; -#endif - -#endif /* !_NETINET6_IP6PROTOSW_H_ */ diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 0a5d343f3725..b1cf9fc68a59 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -98,7 +98,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index c8e65f640842..4c06e5ea9433 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -114,7 +114,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c index ca6c6592dfa4..7effed48121a 100644 --- a/sys/netipsec/ipsec_input.c +++ b/sys/netipsec/ipsec_input.c @@ -95,7 +95,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include