Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Split out the prototypes for add/delete address into a s...



details:   https://anonhg.NetBSD.org/src/rev/e1f5c1e24dca
branches:  trunk
changeset: 999939:e1f5c1e24dca
user:      rjs <rjs%NetBSD.org@localhost>
date:      Tue Jun 25 15:33:55 2019 +0000

description:
Split out the prototypes for add/delete address into a separate header file.

diffstat:

 sys/kern/compat_stub.c      |   4 ++--
 sys/netinet/sctp_asconf.c   |   5 +++--
 sys/netinet/sctp_asconf.h   |  13 +------------
 sys/netinet/sctp_route.h    |  43 +++++++++++++++++++++++++++++++++++++++++++
 sys/netinet/sctp_usrreq.c   |   5 +++--
 sys/netinet6/sctp6_usrreq.c |   5 +++--
 6 files changed, 55 insertions(+), 20 deletions(-)

diffs (180 lines):

diff -r aa246bd78177 -r e1f5c1e24dca sys/kern/compat_stub.c
--- a/sys/kern/compat_stub.c    Tue Jun 25 14:52:55 2019 +0000
+++ b/sys/kern/compat_stub.c    Tue Jun 25 15:33:55 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.12 2019/05/17 07:37:12 msaitoh Exp $     */
+/* $NetBSD: compat_stub.c,v 1.13 2019/06/25 15:33:55 rjs Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
 #endif
 
 #ifdef SCTP
-#include <netinet/sctp_asconf.h>
+#include <netinet/sctp_route.h>
 #endif
 
 /*
diff -r aa246bd78177 -r e1f5c1e24dca sys/netinet/sctp_asconf.c
--- a/sys/netinet/sctp_asconf.c Tue Jun 25 14:52:55 2019 +0000
+++ b/sys/netinet/sctp_asconf.c Tue Jun 25 15:33:55 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sctp_asconf.c,v 1.11 2017/06/28 14:38:18 rjs Exp $ */
+/*     $NetBSD: sctp_asconf.c,v 1.12 2019/06/25 15:33:56 rjs Exp $ */
 /*     $KAME: sctp_asconf.c,v 1.25 2005/06/16 20:44:24 jinmei Exp $    */
 
 /*
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.11 2017/06/28 14:38:18 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.12 2019/06/25 15:33:56 rjs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -76,6 +76,7 @@
 #include <netinet/sctputil.h>
 #include <netinet/sctp_output.h>
 #include <netinet/sctp_asconf.h>
+#include <netinet/sctp_route.h>
 
 /*
  * debug flags:
diff -r aa246bd78177 -r e1f5c1e24dca sys/netinet/sctp_asconf.h
--- a/sys/netinet/sctp_asconf.h Tue Jun 25 14:52:55 2019 +0000
+++ b/sys/netinet/sctp_asconf.h Tue Jun 25 15:33:55 2019 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $     */
-/*     $NetBSD: sctp_asconf.h,v 1.3 2019/06/08 23:23:34 rjs Exp $ */
+/*     $NetBSD: sctp_asconf.h,v 1.4 2019/06/25 15:33:56 rjs Exp $ */
 
 #ifndef _NETINET_SCTP_ASCONF_H_
 #define _NETINET_SCTP_ASCONF_H_
@@ -36,13 +36,6 @@
 
 #if defined(_KERNEL)
 
-struct sctp_tcb;
-struct sctp_nets;
-struct sctp_asconf_chunk;
-struct sockaddr;
-struct sctp_inpcb;
-struct sctp_asconf_ack_chunk;
-
 void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *);
 
 struct mbuf *sctp_compose_asconf(struct sctp_tcb *);
@@ -56,10 +49,6 @@
 uint32_t sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *,
        uint16_t);
 
-void sctp_add_ip_address(struct ifaddr *);
-
-void sctp_delete_ip_address(struct ifaddr *);
-
 int32_t sctp_set_primary_ip_address_sa(struct sctp_tcb *,
        struct sockaddr *);
 
diff -r aa246bd78177 -r e1f5c1e24dca sys/netinet/sctp_route.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/netinet/sctp_route.h  Tue Jun 25 15:33:55 2019 +0000
@@ -0,0 +1,43 @@
+/*     $NetBSD: sctp_route.h,v 1.1 2019/06/25 15:33:56 rjs Exp $ */
+
+#ifndef _NETINET_SCTP_ROUTE_H_
+#define _NETINET_SCTP_ROUTE_H_
+
+/*
+ * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
+ * 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 CISCO SYSTEMS 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 CISCO SYSTEMS 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.
+ */
+
+#if defined(_KERNEL)
+
+void sctp_add_ip_address(struct ifaddr *);
+
+void sctp_delete_ip_address(struct ifaddr *);
+
+#endif /* _KERNEL */
+
+#endif /* !_NETINET_SCTP_ROUTE_H_ */
diff -r aa246bd78177 -r e1f5c1e24dca sys/netinet/sctp_usrreq.c
--- a/sys/netinet/sctp_usrreq.c Tue Jun 25 14:52:55 2019 +0000
+++ b/sys/netinet/sctp_usrreq.c Tue Jun 25 15:33:55 2019 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: sctp_usrreq.c,v 1.50 2005/06/16 20:45:29 jinmei Exp $    */
-/*     $NetBSD: sctp_usrreq.c,v 1.18 2019/02/25 06:49:44 maxv Exp $    */
+/*     $NetBSD: sctp_usrreq.c,v 1.19 2019/06/25 15:33:56 rjs Exp $     */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.18 2019/02/25 06:49:44 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.19 2019/06/25 15:33:56 rjs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -74,6 +74,7 @@
 #include <netinet/sctp_output.h>
 #include <netinet/sctp_uio.h>
 #include <netinet/sctp_asconf.h>
+#include <netinet/sctp_route.h>
 #include <netinet/sctputil.h>
 #include <netinet/sctp_indata.h>
 #include <netinet/sctp_asconf.h>
diff -r aa246bd78177 -r e1f5c1e24dca sys/netinet6/sctp6_usrreq.c
--- a/sys/netinet6/sctp6_usrreq.c       Tue Jun 25 14:52:55 2019 +0000
+++ b/sys/netinet6/sctp6_usrreq.c       Tue Jun 25 15:33:55 2019 +0000
@@ -1,5 +1,5 @@
 /* $KAME: sctp6_usrreq.c,v 1.38 2005/08/24 08:08:56 suz Exp $ */
-/* $NetBSD: sctp6_usrreq.c,v 1.19 2019/02/25 06:49:44 maxv Exp $ */
+/* $NetBSD: sctp6_usrreq.c,v 1.20 2019/06/25 15:33:56 rjs Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp6_usrreq.c,v 1.19 2019/02/25 06:49:44 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp6_usrreq.c,v 1.20 2019/06/25 15:33:56 rjs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -72,6 +72,7 @@
 #include <netinet/sctp_output.h>
 #include <netinet/sctp_input.h>
 #include <netinet/sctp_asconf.h>
+#include <netinet/sctp_route.h>
 #include <netinet6/ip6_var.h>
 #include <netinet6/scope6_var.h>
 #include <netinet/ip6.h>



Home | Main Index | Thread Index | Old Index