Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys remove pr_generic from struct pr_usrreqs and all impleme...
details: https://anonhg.NetBSD.org/src/rev/37e642f2582a
branches: trunk
changeset: 337768:37e642f2582a
user: rtr <rtr%NetBSD.org@localhost>
date: Sun Apr 26 21:40:48 2015 +0000
description:
remove pr_generic from struct pr_usrreqs and all implementations of
pr_generic in protocols.
bump to 7.99.13
approved by rmind@
diffstat:
sys/kern/uipc_usrreq.c | 40 +-------------------
sys/net/link_proto.c | 34 +----------------
sys/net/rtsock.c | 38 +------------------
sys/netatalk/ddp_usrreq.c | 62 +------------------------------
sys/netbt/hci_socket.c | 72 +-----------------------------------
sys/netbt/l2cap_socket.c | 70 +----------------------------------
sys/netbt/rfcomm_socket.c | 70 +----------------------------------
sys/netbt/sco_socket.c | 71 +-----------------------------------
sys/netinet/dccp_usrreq.c | 40 +-------------------
sys/netinet/raw_ip.c | 40 +-------------------
sys/netinet/tcp_usrreq.c | 42 +--------------------
sys/netinet/udp_usrreq.c | 40 +-------------------
sys/netinet6/dccp6_usrreq.c | 57 +----------------------------
sys/netinet6/raw_ip6.c | 34 +----------------
sys/netinet6/udp6_usrreq.c | 57 +----------------------------
sys/netipsec/keysock.c | 44 +---------------------
sys/netmpls/mpls_proto.c | 33 +---------------
sys/netnatm/natm.c | 63 +-------------------------------
sys/rump/net/lib/libsockin/sockin.c | 34 +----------------
sys/sys/param.h | 4 +-
sys/sys/protosw.h | 15 +-------
21 files changed, 41 insertions(+), 919 deletions(-)
diffs (truncated from 1624 to 300 lines):
diff -r abbce8a4caf7 -r 37e642f2582a sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Sun Apr 26 21:37:22 2015 +0000
+++ b/sys/kern/uipc_usrreq.c Sun Apr 26 21:40:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.177 2015/04/24 22:32:37 rtr Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.178 2015/04/26 21:40:48 rtr Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.177 2015/04/24 22:32:37 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.178 2015/04/26 21:40:48 rtr Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -547,41 +547,6 @@
return EOPNOTSUPP;
}
-static int
-unp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
- struct mbuf *control, struct lwp *l)
-{
-
- KASSERT(req != PRU_ATTACH);
- KASSERT(req != PRU_DETACH);
- KASSERT(req != PRU_ACCEPT);
- KASSERT(req != PRU_BIND);
- KASSERT(req != PRU_LISTEN);
- KASSERT(req != PRU_CONNECT);
- KASSERT(req != PRU_CONNECT2);
- KASSERT(req != PRU_DISCONNECT);
- KASSERT(req != PRU_SHUTDOWN);
- KASSERT(req != PRU_ABORT);
- KASSERT(req != PRU_CONTROL);
- KASSERT(req != PRU_SENSE);
- KASSERT(req != PRU_PEERADDR);
- KASSERT(req != PRU_SOCKADDR);
- KASSERT(req != PRU_RCVD);
- KASSERT(req != PRU_RCVOOB);
- KASSERT(req != PRU_SEND);
- KASSERT(req != PRU_SENDOOB);
- KASSERT(req != PRU_PURGEIF);
-
- KASSERT(solocked(so));
-
- if (sotounpcb(so) == NULL)
- return EINVAL;
-
- panic("piusrreq");
-
- return 0;
-}
-
/*
* Unix domain socket option processing.
*/
@@ -1997,5 +1962,4 @@
.pr_recvoob = unp_recvoob,
.pr_send = unp_send,
.pr_sendoob = unp_sendoob,
- .pr_generic = unp_usrreq,
};
diff -r abbce8a4caf7 -r 37e642f2582a sys/net/link_proto.c
--- a/sys/net/link_proto.c Sun Apr 26 21:37:22 2015 +0000
+++ b/sys/net/link_proto.c Sun Apr 26 21:40:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: link_proto.c,v 1.26 2015/04/24 22:32:37 rtr Exp $ */
+/* $NetBSD: link_proto.c,v 1.27 2015/04/26 21:40:48 rtr Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.26 2015/04/24 22:32:37 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.27 2015/04/26 21:40:48 rtr Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -68,8 +68,6 @@
struct mbuf *, struct lwp *);
static int link_sendoob(struct socket *, struct mbuf *, struct mbuf *);
static int link_purgeif(struct socket *, struct ifnet *);
-static int link_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
- struct mbuf *, struct lwp *);
static void link_init(void);
/*
@@ -98,7 +96,6 @@
.pr_send = link_send,
.pr_sendoob = link_sendoob,
.pr_purgeif = link_purgeif,
- .pr_generic = link_usrreq,
};
const struct protosw linksw[] = {
@@ -399,33 +396,6 @@
return EOPNOTSUPP;
}
-static int
-link_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
- struct mbuf *control, struct lwp *l)
-{
- KASSERT(req != PRU_ATTACH);
- KASSERT(req != PRU_DETACH);
- KASSERT(req != PRU_ACCEPT);
- KASSERT(req != PRU_BIND);
- KASSERT(req != PRU_LISTEN);
- KASSERT(req != PRU_CONNECT);
- KASSERT(req != PRU_CONNECT2);
- KASSERT(req != PRU_DISCONNECT);
- KASSERT(req != PRU_SHUTDOWN);
- KASSERT(req != PRU_ABORT);
- KASSERT(req != PRU_CONTROL);
- KASSERT(req != PRU_SENSE);
- KASSERT(req != PRU_PEERADDR);
- KASSERT(req != PRU_SOCKADDR);
- KASSERT(req != PRU_RCVD);
- KASSERT(req != PRU_RCVOOB);
- KASSERT(req != PRU_SEND);
- KASSERT(req != PRU_SENDOOB);
- KASSERT(req != PRU_PURGEIF);
-
- return EOPNOTSUPP;
-}
-
/* Compare the field at byte offsets [fieldstart, fieldend) in
* two memory regions, [l, l + llen) and [r, r + llen).
*/
diff -r abbce8a4caf7 -r 37e642f2582a sys/net/rtsock.c
--- a/sys/net/rtsock.c Sun Apr 26 21:37:22 2015 +0000
+++ b/sys/net/rtsock.c Sun Apr 26 21:40:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.169 2015/04/24 22:32:37 rtr Exp $ */
+/* $NetBSD: rtsock.c,v 1.170 2015/04/26 21:40:48 rtr 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.169 2015/04/24 22:32:37 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.170 2015/04/26 21:40:48 rtr Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -412,39 +412,6 @@
return EOPNOTSUPP;
}
-static int
-COMPATNAME(route_usrreq)(struct socket *so, int req, struct mbuf *m,
- struct mbuf *nam, struct mbuf *control, struct lwp *l)
-{
- int s, error = 0;
-
- KASSERT(req != PRU_ATTACH);
- KASSERT(req != PRU_DETACH);
- KASSERT(req != PRU_ACCEPT);
- KASSERT(req != PRU_BIND);
- KASSERT(req != PRU_LISTEN);
- KASSERT(req != PRU_CONNECT);
- KASSERT(req != PRU_CONNECT2);
- KASSERT(req != PRU_DISCONNECT);
- KASSERT(req != PRU_SHUTDOWN);
- KASSERT(req != PRU_ABORT);
- KASSERT(req != PRU_CONTROL);
- KASSERT(req != PRU_SENSE);
- KASSERT(req != PRU_PEERADDR);
- KASSERT(req != PRU_SOCKADDR);
- KASSERT(req != PRU_RCVD);
- KASSERT(req != PRU_RCVOOB);
- KASSERT(req != PRU_SEND);
- KASSERT(req != PRU_SENDOOB);
- KASSERT(req != PRU_PURGEIF);
-
- s = splsoftnet();
- error = raw_usrreq(so, req, m, nam, control, l);
- splx(s);
-
- return error;
-}
-
/*ARGSUSED*/
int
COMPATNAME(route_output)(struct mbuf *m, ...)
@@ -1547,7 +1514,6 @@
.pr_send = COMPATNAME(route_send_wrapper),
.pr_sendoob = COMPATNAME(route_sendoob_wrapper),
.pr_purgeif = COMPATNAME(route_purgeif_wrapper),
- .pr_generic = COMPATNAME(route_usrreq_wrapper),
};
static const struct protosw COMPATNAME(route_protosw)[] = {
diff -r abbce8a4caf7 -r 37e642f2582a sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Sun Apr 26 21:37:22 2015 +0000
+++ b/sys/netatalk/ddp_usrreq.c Sun Apr 26 21:40:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ddp_usrreq.c,v 1.66 2015/04/24 23:36:48 rtr Exp $ */
+/* $NetBSD: ddp_usrreq.c,v 1.67 2015/04/26 21:40:49 rtr Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.66 2015/04/24 23:36:48 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.67 2015/04/26 21:40:49 rtr Exp $");
#include "opt_mbuftrace.h"
@@ -75,62 +75,6 @@
struct mowner atalk_tx_mowner = MOWNER_INIT("atalk", "tx");
#endif
-static int
-ddp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
- struct mbuf *rights, struct lwp *l)
-{
- struct ddpcb *ddp;
- int error = 0;
-
- KASSERT(req != PRU_ATTACH);
- KASSERT(req != PRU_DETACH);
- KASSERT(req != PRU_ACCEPT);
- KASSERT(req != PRU_BIND);
- KASSERT(req != PRU_LISTEN);
- KASSERT(req != PRU_CONNECT);
- KASSERT(req != PRU_CONNECT2);
- KASSERT(req != PRU_DISCONNECT);
- KASSERT(req != PRU_SHUTDOWN);
- KASSERT(req != PRU_ABORT);
- KASSERT(req != PRU_CONTROL);
- KASSERT(req != PRU_SENSE);
- KASSERT(req != PRU_PEERADDR);
- KASSERT(req != PRU_SOCKADDR);
- KASSERT(req != PRU_RCVD);
- KASSERT(req != PRU_RCVOOB);
- KASSERT(req != PRU_SEND);
- KASSERT(req != PRU_SENDOOB);
- KASSERT(req != PRU_PURGEIF);
-
- ddp = sotoddpcb(so);
-
- if (rights && rights->m_len) {
- error = EINVAL;
- goto release;
- }
- if (ddp == NULL) {
- error = EINVAL;
- goto release;
- }
- switch (req) {
- case PRU_FASTTIMO:
- case PRU_SLOWTIMO:
- case PRU_PROTORCV:
- case PRU_PROTOSEND:
- error = EOPNOTSUPP;
- break;
-
- default:
- error = EOPNOTSUPP;
- }
-
-release:
- if (m != NULL) {
- m_freem(m);
- }
- return (error);
-}
-
static void
at_sockaddr(struct ddpcb *ddp, struct sockaddr_at *addr)
{
@@ -683,7 +627,6 @@
#define ddp_send ddp_send_wrapper
#define ddp_sendoob ddp_sendoob_wrapper
#define ddp_purgeif ddp_purgeif_wrapper
-#define ddp_usrreq ddp_usrreq_wrapper
const struct pr_usrreqs ddp_usrreqs = {
.pr_attach = ddp_attach,
@@ -705,7 +648,6 @@
.pr_send = ddp_send,
.pr_sendoob = ddp_sendoob,
.pr_purgeif = ddp_purgeif,
- .pr_generic = ddp_usrreq,
};
static int
diff -r abbce8a4caf7 -r 37e642f2582a sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c Sun Apr 26 21:37:22 2015 +0000
Home |
Main Index |
Thread Index |
Old Index