Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Revert previous: ran cvs commit when I meant cvs diff. ...
details: https://anonhg.NetBSD.org/src/rev/e24563f3606f
branches: trunk
changeset: 343060:e24563f3606f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Jan 21 15:41:29 2016 +0000
description:
Revert previous: ran cvs commit when I meant cvs diff. Sorry!
Hit up-arrow one too few times.
diffstat:
sys/net/if.c | 12 +-
sys/net/link_proto.c | 8 +-
sys/net/rtsock.c | 9 +-
sys/netatalk/at_proto.c | 10 +-
sys/netbt/bt_proto.c | 16 ++--
sys/netinet/if_arp.c | 11 +-
sys/netinet/in_proto.c | 155 ++++++++++++-------------------------------
sys/netinet/in_proto.h | 9 +-
sys/netinet/ip_icmp.c | 8 +-
sys/netinet/ip_input.c | 28 ++-----
sys/netinet/raw_ip.c | 6 +-
sys/netinet6/icmp6.c | 7 +-
sys/netinet6/in6_proto.c | 154 ++++++++++++-------------------------------
sys/netinet6/ip6protosw.h | 30 +++++++-
sys/netinet6/sctp6_usrreq.c | 6 +-
sys/netipsec/ipsec_input.c | 8 +-
16 files changed, 177 insertions(+), 300 deletions(-)
diffs (truncated from 1234 to 300 lines):
diff -r 3c34820a10ef -r e24563f3606f sys/net/if.c
--- a/sys/net/if.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/net/if.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.321 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: if.c,v 1.322 2016/01/21 15:41:29 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.321 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.322 2016/01/21 15:41:29 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -745,8 +745,7 @@
#endif
struct domain *dp;
const struct protosw *pr;
- size_t i;
- int s, family, purged;
+ int s, i, family, purged;
uint64_t xc;
/*
@@ -829,9 +828,8 @@
* ifp->if_addrlist.
*/
purged = 0;
- for (i = 0; i < dp->dom_nprotosw; i++) {
- pr = dp->dom_protosw[i];
- KASSERT(pr != NULL);
+ for (pr = dp->dom_protosw;
+ pr < dp->dom_protoswNPROTOSW; pr++) {
so.so_proto = pr;
if (pr->pr_usrreqs) {
(void) (*pr->pr_usrreqs->pr_purgeif)(&so, ifp);
diff -r 3c34820a10ef -r e24563f3606f sys/net/link_proto.c
--- a/sys/net/link_proto.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/net/link_proto.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: link_proto.c,v 1.29 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: link_proto.c,v 1.30 2016/01/21 15:41:29 riastradh Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.29 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.30 2016/01/21 15:41:29 riastradh Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -98,7 +98,7 @@
.pr_purgeif = link_purgeif,
};
-const struct protosw *const linksw[] = {
+const struct protosw linksw[] = {
{ .pr_type = SOCK_DGRAM,
.pr_domain = &linkdomain,
.pr_protocol = 0, /* XXX */
@@ -117,7 +117,7 @@
.dom_externalize = NULL,
.dom_dispose = NULL,
.dom_protosw = linksw,
- .dom_nprotosw = __arraycount(linksw),
+ .dom_protoswNPROTOSW = &linksw[__arraycount(linksw)],
.dom_sockaddr_cmp = sockaddr_dl_cmp
};
diff -r 3c34820a10ef -r e24563f3606f sys/net/rtsock.c
--- a/sys/net/rtsock.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/net/rtsock.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.176 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: rtsock.c,v 1.177 2016/01/21 15:41:29 riastradh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.176 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.177 2016/01/21 15:41:29 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1532,7 +1532,7 @@
.pr_purgeif = COMPATNAME(route_purgeif_wrapper),
};
-static const struct protosw *const COMPATNAME(route_protosw)[] = {
+static const struct protosw COMPATNAME(route_protosw)[] = {
{
.pr_type = SOCK_RAW,
.pr_domain = &COMPATNAME(routedomain),
@@ -1549,7 +1549,8 @@
.dom_name = DOMAINNAME,
.dom_init = COMPATNAME(route_init),
.dom_protosw = COMPATNAME(route_protosw),
- .dom_nprotosw = __arraycount(COMPATNAME(route_protosw)),
+ .dom_protoswNPROTOSW =
+ &COMPATNAME(route_protosw)[__arraycount(COMPATNAME(route_protosw))],
};
static void
diff -r 3c34820a10ef -r e24563f3606f sys/netatalk/at_proto.c
--- a/sys/netatalk/at_proto.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/netatalk/at_proto.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: at_proto.c,v 1.20 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: at_proto.c,v 1.21 2016/01/21 15:41:30 riastradh Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at_proto.c,v 1.20 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at_proto.c,v 1.21 2016/01/21 15:41:30 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,8 +49,8 @@
DOMAIN_DEFINE(atalkdomain); /* forward declare and add to link set */
-const struct protosw *const atalksw[] = {
- &(const struct protosw) {
+const struct protosw atalksw[] = {
+ {
.pr_type = SOCK_DGRAM,
.pr_domain = &atalkdomain,
.pr_protocol = ATPROTO_DDP,
@@ -67,7 +67,7 @@
.dom_externalize = NULL,
.dom_dispose = NULL,
.dom_protosw = atalksw,
- .dom_nprotosw = __arraycount(atalksw),
+ .dom_protoswNPROTOSW = &atalksw[__arraycount(atalksw)],
.dom_rtattach = rt_inithead,
.dom_rtoffset = 32,
.dom_maxrtkey = sizeof(struct sockaddr_at),
diff -r 3c34820a10ef -r e24563f3606f sys/netbt/bt_proto.c
--- a/sys/netbt/bt_proto.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/netbt/bt_proto.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bt_proto.c,v 1.15 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: bt_proto.c,v 1.16 2016/01/21 15:41:30 riastradh Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bt_proto.c,v 1.15 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bt_proto.c,v 1.16 2016/01/21 15:41:30 riastradh Exp $");
#include <sys/param.h>
#include <sys/domain.h>
@@ -62,8 +62,8 @@
#define l2cap_ctloutput l2cap_ctloutput_wrapper
#define rfcomm_ctloutput rfcomm_ctloutput_wrapper
-static const struct protosw *const btsw[] = {
- &(const struct protosw) { /* raw HCI commands */
+static const struct protosw btsw[] = {
+ { /* raw HCI commands */
.pr_type = SOCK_RAW,
.pr_domain = &btdomain,
.pr_protocol = BTPROTO_HCI,
@@ -72,7 +72,7 @@
.pr_ctloutput = hci_ctloutput,
.pr_usrreqs = &hci_usrreqs,
},
- &(const struct protosw) { /* HCI SCO data (audio) */
+ { /* HCI SCO data (audio) */
.pr_type = SOCK_SEQPACKET,
.pr_domain = &btdomain,
.pr_protocol = BTPROTO_SCO,
@@ -80,7 +80,7 @@
.pr_ctloutput = sco_ctloutput,
.pr_usrreqs = &sco_usrreqs,
},
- &(const struct protosw) { /* L2CAP Connection Oriented */
+ { /* L2CAP Connection Oriented */
.pr_type = SOCK_SEQPACKET,
.pr_domain = &btdomain,
.pr_protocol = BTPROTO_L2CAP,
@@ -89,7 +89,7 @@
.pr_usrreqs = &l2cap_usrreqs,
.pr_init = l2cap_init,
},
- &(const struct protosw) { /* RFCOMM */
+ { /* RFCOMM */
.pr_type = SOCK_STREAM,
.pr_domain = &btdomain,
.pr_protocol = BTPROTO_RFCOMM,
@@ -105,7 +105,7 @@
.dom_name = "bluetooth",
.dom_init = bt_init,
.dom_protosw = btsw,
- .dom_nprotosw = __arraycount(btsw),
+ .dom_protoswNPROTOSW = &btsw[__arraycount(btsw)],
};
kmutex_t *bt_lock;
diff -r 3c34820a10ef -r e24563f3606f sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/netinet/if_arp.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.201 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: if_arp.c,v 1.202 2016/01/21 15:41:30 riastradh Exp $ */
/*-
* Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.201 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.202 2016/01/21 15:41:30 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -264,9 +264,8 @@
}
}
-const struct protosw *const arpsw[] = {
- &(const struct protosw) {
- .pr_type = 0,
+const struct protosw arpsw[] = {
+ { .pr_type = 0,
.pr_domain = &arpdomain,
.pr_protocol = 0,
.pr_flags = 0,
@@ -285,7 +284,7 @@
.dom_family = PF_ARP,
.dom_name = "arp",
.dom_protosw = arpsw,
- .dom_nprotosw = __arraycount(arpsw),
+ .dom_protoswNPROTOSW = &arpsw[__arraycount(arpsw)],
};
static void sysctl_net_inet_arp_setup(struct sysctllog **);
diff -r 3c34820a10ef -r e24563f3606f sys/netinet/in_proto.c
--- a/sys/netinet/in_proto.c Thu Jan 21 15:27:48 2016 +0000
+++ b/sys/netinet/in_proto.c Thu Jan 21 15:41:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in_proto.c,v 1.117 2016/01/21 15:27:48 riastradh Exp $ */
+/* $NetBSD: in_proto.c,v 1.118 2016/01/21 15:41:30 riastradh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.117 2016/01/21 15:27:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.118 2016/01/21 15:41:30 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_mrouting.h"
@@ -196,277 +196,214 @@
#define esp4_ctlinput esp4_ctlinput_wrapper
#endif
-const struct ipprotosw inetsw[] = {
-{
- .ippr_protosw = {
- .pr_domain = &inetdomain,
+const struct protosw inetsw[] = {
+{ .pr_domain = &inetdomain,
.pr_init = ip_init,
.pr_fasttimo = ip_fasttimo,
.pr_slowtimo = ip_slowtimo,
.pr_drain = ip_drainstub,
- },
},
-{
- .ippr_protosw = {
- .pr_type = SOCK_DGRAM,
+{ .pr_type = SOCK_DGRAM,
.pr_domain = &inetdomain,
.pr_protocol = IPPROTO_UDP,
.pr_flags = PR_ATOMIC|PR_ADDR|PR_PURGEIF,
+ .pr_input = udp_input,
.pr_ctlinput = udp_ctlinput,
.pr_ctloutput = udp_ctloutput,
.pr_usrreqs = &udp_usrreqs,
Home |
Main Index |
Thread Index |
Old Index