Module Name: src Committed By: rtr Date: Sun Apr 26 21:40:49 UTC 2015
Modified Files: src/sys/kern: uipc_usrreq.c src/sys/net: link_proto.c rtsock.c src/sys/netatalk: ddp_usrreq.c src/sys/netbt: hci_socket.c l2cap_socket.c rfcomm_socket.c sco_socket.c src/sys/netinet: dccp_usrreq.c raw_ip.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6: dccp6_usrreq.c raw_ip6.c udp6_usrreq.c src/sys/netipsec: keysock.c src/sys/netmpls: mpls_proto.c src/sys/netnatm: natm.c src/sys/rump/net/lib/libsockin: sockin.c src/sys/sys: param.h protosw.h Log Message: remove pr_generic from struct pr_usrreqs and all implementations of pr_generic in protocols. bump to 7.99.13 approved by rmind@ To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/kern/uipc_usrreq.c cvs rdiff -u -r1.26 -r1.27 src/sys/net/link_proto.c cvs rdiff -u -r1.169 -r1.170 src/sys/net/rtsock.c cvs rdiff -u -r1.66 -r1.67 src/sys/netatalk/ddp_usrreq.c cvs rdiff -u -r1.42 -r1.43 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.33 -r1.34 src/sys/netbt/l2cap_socket.c cvs rdiff -u -r1.35 -r1.36 src/sys/netbt/rfcomm_socket.c \ src/sys/netbt/sco_socket.c cvs rdiff -u -r1.3 -r1.4 src/sys/netinet/dccp_usrreq.c cvs rdiff -u -r1.149 -r1.150 src/sys/netinet/raw_ip.c cvs rdiff -u -r1.206 -r1.207 src/sys/netinet/tcp_usrreq.c cvs rdiff -u -r1.219 -r1.220 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.4 -r1.5 src/sys/netinet6/dccp6_usrreq.c cvs rdiff -u -r1.138 -r1.139 src/sys/netinet6/raw_ip6.c cvs rdiff -u -r1.118 -r1.119 src/sys/netinet6/udp6_usrreq.c cvs rdiff -u -r1.46 -r1.47 src/sys/netipsec/keysock.c cvs rdiff -u -r1.26 -r1.27 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.47 -r1.48 src/sys/netnatm/natm.c cvs rdiff -u -r1.60 -r1.61 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r1.474 -r1.475 src/sys/sys/param.h cvs rdiff -u -r1.62 -r1.63 src/sys/sys/protosw.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.177 src/sys/kern/uipc_usrreq.c:1.178 --- src/sys/kern/uipc_usrreq.c:1.177 Fri Apr 24 22:32:37 2015 +++ src/sys/kern/uipc_usrreq.c Sun Apr 26 21:40:48 2015 @@ -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 @@ unp_sendoob(struct socket *so, struct mb 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 @@ const struct pr_usrreqs unp_usrreqs = { .pr_recvoob = unp_recvoob, .pr_send = unp_send, .pr_sendoob = unp_sendoob, - .pr_generic = unp_usrreq, }; Index: src/sys/net/link_proto.c diff -u src/sys/net/link_proto.c:1.26 src/sys/net/link_proto.c:1.27 --- src/sys/net/link_proto.c:1.26 Fri Apr 24 22:32:37 2015 +++ src/sys/net/link_proto.c Sun Apr 26 21:40:48 2015 @@ -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 @@ static int link_send(struct socket *, st 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 @@ static const struct pr_usrreqs link_usrr .pr_send = link_send, .pr_sendoob = link_sendoob, .pr_purgeif = link_purgeif, - .pr_generic = link_usrreq, }; const struct protosw linksw[] = { @@ -399,33 +396,6 @@ link_purgeif(struct socket *so, struct i 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). */ Index: src/sys/net/rtsock.c diff -u src/sys/net/rtsock.c:1.169 src/sys/net/rtsock.c:1.170 --- src/sys/net/rtsock.c:1.169 Fri Apr 24 22:32:37 2015 +++ src/sys/net/rtsock.c Sun Apr 26 21:40:48 2015 @@ -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 @@ COMPATNAME(route_purgeif)(struct socket 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 @@ static const struct pr_usrreqs route_usr .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)[] = { Index: src/sys/netatalk/ddp_usrreq.c diff -u src/sys/netatalk/ddp_usrreq.c:1.66 src/sys/netatalk/ddp_usrreq.c:1.67 --- src/sys/netatalk/ddp_usrreq.c:1.66 Fri Apr 24 23:36:48 2015 +++ src/sys/netatalk/ddp_usrreq.c Sun Apr 26 21:40:49 2015 @@ -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_rx_mowner = MOWNER_I 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 @@ PR_WRAP_USRREQS(ddp) #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 @@ const struct pr_usrreqs ddp_usrreqs = { .pr_send = ddp_send, .pr_sendoob = ddp_sendoob, .pr_purgeif = ddp_purgeif, - .pr_generic = ddp_usrreq, }; static int Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.42 src/sys/netbt/hci_socket.c:1.43 --- src/sys/netbt/hci_socket.c:1.42 Fri Apr 24 22:32:37 2015 +++ src/sys/netbt/hci_socket.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.42 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: hci_socket.c,v 1.43 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.42 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.43 2015/04/26 21:40:49 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -723,72 +723,6 @@ hci_purgeif(struct socket *so, struct if } /* - * User Request. - * up is socket - * m is optional mbuf chain containing message - * nam is optional mbuf chain containing an address - * ctl is optional mbuf chain containing socket options - * l is pointer to process requesting action (if any) - * - * we are responsible for disposing of m and ctl - */ -static int -hci_usrreq(struct socket *up, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *ctl, struct lwp *l) -{ - struct hci_pcb *pcb = up->so_pcb; - int err = 0; - - DPRINTFN(2, "%s\n", prurequests[req]); - 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); - - /* anything after here *requires* a pcb */ - if (pcb == NULL) { - err = EINVAL; - goto release; - } - - switch(req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - err = EOPNOTSUPP; - break; - - default: - UNKNOWN(req); - err = EOPNOTSUPP; - break; - } - -release: - if (m) - m_freem(m); - if (ctl) - m_freem(ctl); - return err; -} - -/* * get/set socket options */ int @@ -1013,7 +947,6 @@ PR_WRAP_USRREQS(hci) #define hci_send hci_send_wrapper #define hci_sendoob hci_sendoob_wrapper #define hci_purgeif hci_purgeif_wrapper -#define hci_usrreq hci_usrreq_wrapper const struct pr_usrreqs hci_usrreqs = { .pr_attach = hci_attach, @@ -1035,5 +968,4 @@ const struct pr_usrreqs hci_usrreqs = { .pr_send = hci_send, .pr_sendoob = hci_sendoob, .pr_purgeif = hci_purgeif, - .pr_generic = hci_usrreq, }; Index: src/sys/netbt/l2cap_socket.c diff -u src/sys/netbt/l2cap_socket.c:1.33 src/sys/netbt/l2cap_socket.c:1.34 --- src/sys/netbt/l2cap_socket.c:1.33 Fri Apr 24 22:32:37 2015 +++ src/sys/netbt/l2cap_socket.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_socket.c,v 1.33 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: l2cap_socket.c,v 1.34 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.33 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.34 2015/04/26 21:40:49 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -355,70 +355,6 @@ l2cap_purgeif(struct socket *so, struct } /* - * User Request. - * up is socket - * m is optional mbuf chain containing message - * ctl is either - * optional mbuf chain containing socket options - * l is pointer to process requesting action (if any) - * - * we are responsible for disposing of m and ctl if - * they are mbuf chains - */ -static int -l2cap_usrreq(struct socket *up, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *ctl, struct lwp *l) -{ - struct l2cap_channel *pcb = up->so_pcb; - int err = 0; - - DPRINTFN(2, "%s\n", prurequests[req]); - 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); - - if (pcb == NULL) { - err = EINVAL; - goto release; - } - - switch(req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - err = EOPNOTSUPP; - break; - - default: - UNKNOWN(req); - err = EOPNOTSUPP; - break; - } - -release: - if (m) m_freem(m); - if (ctl) m_freem(ctl); - return err; -} - -/* * l2cap_ctloutput(req, socket, sockopt) * * Apply configuration commands to channel. This corresponds to @@ -579,7 +515,6 @@ PR_WRAP_USRREQS(l2cap) #define l2cap_send l2cap_send_wrapper #define l2cap_sendoob l2cap_sendoob_wrapper #define l2cap_purgeif l2cap_purgeif_wrapper -#define l2cap_usrreq l2cap_usrreq_wrapper const struct pr_usrreqs l2cap_usrreqs = { .pr_attach = l2cap_attach, @@ -601,5 +536,4 @@ const struct pr_usrreqs l2cap_usrreqs = .pr_send = l2cap_send, .pr_sendoob = l2cap_sendoob, .pr_purgeif = l2cap_purgeif, - .pr_generic = l2cap_usrreq, }; Index: src/sys/netbt/rfcomm_socket.c diff -u src/sys/netbt/rfcomm_socket.c:1.35 src/sys/netbt/rfcomm_socket.c:1.36 --- src/sys/netbt/rfcomm_socket.c:1.35 Fri Apr 24 22:32:37 2015 +++ src/sys/netbt/rfcomm_socket.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_socket.c,v 1.35 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: rfcomm_socket.c,v 1.36 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.35 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.36 2015/04/26 21:40:49 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -360,70 +360,6 @@ rfcomm_purgeif(struct socket *so, struct } /* - * User Request. - * up is socket - * m is optional mbuf chain containing message - * ctl is either - * optional mbuf chain containing socket options - * l is pointer to process requesting action (if any) - * - * we are responsible for disposing of m and ctl if - * they are mbuf chains - */ -static int -rfcomm_usrreq(struct socket *up, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *ctl, struct lwp *l) -{ - struct rfcomm_dlc *pcb = up->so_pcb; - int err = 0; - - DPRINTFN(2, "%s\n", prurequests[req]); - 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); - - if (pcb == NULL) { - err = EINVAL; - goto release; - } - - switch(req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - err = EOPNOTSUPP; - break; - - default: - UNKNOWN(req); - err = EOPNOTSUPP; - break; - } - -release: - if (m) m_freem(m); - if (ctl) m_freem(ctl); - return err; -} - -/* * rfcomm_ctloutput(req, socket, sockopt) * */ @@ -596,7 +532,6 @@ PR_WRAP_USRREQS(rfcomm) #define rfcomm_send rfcomm_send_wrapper #define rfcomm_sendoob rfcomm_sendoob_wrapper #define rfcomm_purgeif rfcomm_purgeif_wrapper -#define rfcomm_usrreq rfcomm_usrreq_wrapper const struct pr_usrreqs rfcomm_usrreqs = { .pr_attach = rfcomm_attach, @@ -618,5 +553,4 @@ const struct pr_usrreqs rfcomm_usrreqs = .pr_send = rfcomm_send, .pr_sendoob = rfcomm_sendoob, .pr_purgeif = rfcomm_purgeif, - .pr_generic = rfcomm_usrreq, }; Index: src/sys/netbt/sco_socket.c diff -u src/sys/netbt/sco_socket.c:1.35 src/sys/netbt/sco_socket.c:1.36 --- src/sys/netbt/sco_socket.c:1.35 Fri Apr 24 22:32:37 2015 +++ src/sys/netbt/sco_socket.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sco_socket.c,v 1.35 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: sco_socket.c,v 1.36 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.35 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.36 2015/04/26 21:40:49 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -346,71 +346,6 @@ sco_purgeif(struct socket *so, struct if } /* - * User Request. - * up is socket - * m is optional mbuf chain containing message - * nam is optional mbuf chain containing an address - * ctl is optional mbuf chain containing socket options - * l is pointer to process requesting action (if any) - * - * we are responsible for disposing of m and ctl if - * they are mbuf chains - */ -static int -sco_usrreq(struct socket *up, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *ctl, struct lwp *l) -{ - struct sco_pcb *pcb = up->so_pcb; - int err = 0; - - DPRINTFN(2, "%s\n", prurequests[req]); - 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); - - /* anything after here *requires* a pcb */ - if (pcb == NULL) { - err = EINVAL; - goto release; - } - - switch(req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - err = EOPNOTSUPP; - break; - - default: - UNKNOWN(req); - err = EOPNOTSUPP; - break; - } - -release: - if (m) m_freem(m); - if (ctl) m_freem(ctl); - return err; -} - -/* * get/set socket options */ int @@ -550,7 +485,6 @@ PR_WRAP_USRREQS(sco) #define sco_send sco_send_wrapper #define sco_sendoob sco_sendoob_wrapper #define sco_purgeif sco_purgeif_wrapper -#define sco_usrreq sco_usrreq_wrapper const struct pr_usrreqs sco_usrreqs = { .pr_attach = sco_attach, @@ -572,5 +506,4 @@ const struct pr_usrreqs sco_usrreqs = { .pr_send = sco_send, .pr_sendoob = sco_sendoob, .pr_purgeif = sco_purgeif, - .pr_generic = sco_usrreq, }; Index: src/sys/netinet/dccp_usrreq.c diff -u src/sys/netinet/dccp_usrreq.c:1.3 src/sys/netinet/dccp_usrreq.c:1.4 --- src/sys/netinet/dccp_usrreq.c:1.3 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet/dccp_usrreq.c Sun Apr 26 21:40:49 2015 @@ -1,5 +1,5 @@ /* $KAME: dccp_usrreq.c,v 1.67 2005/11/03 16:05:04 nishida Exp $ */ -/* $NetBSD: dccp_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: dccp_usrreq.c,v 1.4 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (c) 2003 Joacim Häggmark, Magnus Erixzon, Nils-Erik Mattsson @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.4 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_dccp.h" @@ -2978,40 +2978,6 @@ dccp_purgeif(struct socket *so, struct i return 0; } -int -dccp_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 (sotoinpcb(so) == NULL) - return EINVAL; - - panic("dccp_usrreq"); - - return 0; -} - /****** Ack Vector functions *********/ /** @@ -3384,7 +3350,6 @@ PR_WRAP_USRREQS(dccp) #define dccp_send dccp_send_wrapper #define dccp_sendoob dccp_sendoob_wrapper #define dccp_purgeif dccp_purgeif_wrapper -#define dccp_usrreq dccp_usrreq_wrapper const struct pr_usrreqs dccp_usrreqs = { .pr_attach = dccp_attach, @@ -3406,5 +3371,4 @@ const struct pr_usrreqs dccp_usrreqs = { .pr_send = dccp_send, .pr_sendoob = dccp_sendoob, .pr_purgeif = dccp_purgeif, - .pr_generic = dccp_usrreq, }; Index: src/sys/netinet/raw_ip.c diff -u src/sys/netinet/raw_ip.c:1.149 src/sys/netinet/raw_ip.c:1.150 --- src/sys/netinet/raw_ip.c:1.149 Sat Apr 25 15:19:54 2015 +++ src/sys/netinet/raw_ip.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.149 2015/04/25 15:19:54 rtr Exp $ */ +/* $NetBSD: raw_ip.c,v 1.150 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.149 2015/04/25 15:19:54 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.150 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -812,40 +812,6 @@ rip_purgeif(struct socket *so, struct if return 0; } -int -rip_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 (sotoinpcb(so) == NULL) - return EINVAL; - - panic("rip_usrreq"); - - return 0; -} - PR_WRAP_USRREQS(rip) #define rip_attach rip_attach_wrapper #define rip_detach rip_detach_wrapper @@ -866,7 +832,6 @@ PR_WRAP_USRREQS(rip) #define rip_send rip_send_wrapper #define rip_sendoob rip_sendoob_wrapper #define rip_purgeif rip_purgeif_wrapper -#define rip_usrreq rip_usrreq_wrapper const struct pr_usrreqs rip_usrreqs = { .pr_attach = rip_attach, @@ -888,7 +853,6 @@ const struct pr_usrreqs rip_usrreqs = { .pr_send = rip_send, .pr_sendoob = rip_sendoob, .pr_purgeif = rip_purgeif, - .pr_generic = rip_usrreq, }; static void Index: src/sys/netinet/tcp_usrreq.c diff -u src/sys/netinet/tcp_usrreq.c:1.206 src/sys/netinet/tcp_usrreq.c:1.207 --- src/sys/netinet/tcp_usrreq.c:1.206 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet/tcp_usrreq.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_usrreq.c,v 1.206 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: tcp_usrreq.c,v 1.207 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.206 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.207 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_tcp_debug.h" @@ -214,42 +214,6 @@ tcp_getpcb(struct socket *so, struct inp return 0; } -/* - * Process a TCP user request for TCP tb. If this is a send request - * then m is the mbuf chain of send data. If this is a timer expiration - * (called from the software clock routine), then timertype tells which timer. - */ -static int -tcp_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)); - - panic("tcp_usrreq"); - - return 0; -} - static void change_keepalive(struct socket *so, struct tcpcb *tp) { @@ -2523,7 +2487,6 @@ PR_WRAP_USRREQS(tcp) #define tcp_send tcp_send_wrapper #define tcp_sendoob tcp_sendoob_wrapper #define tcp_purgeif tcp_purgeif_wrapper -#define tcp_usrreq tcp_usrreq_wrapper const struct pr_usrreqs tcp_usrreqs = { .pr_attach = tcp_attach, @@ -2545,5 +2508,4 @@ const struct pr_usrreqs tcp_usrreqs = { .pr_send = tcp_send, .pr_sendoob = tcp_sendoob, .pr_purgeif = tcp_purgeif, - .pr_generic = tcp_usrreq, }; Index: src/sys/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.219 src/sys/netinet/udp_usrreq.c:1.220 --- src/sys/netinet/udp_usrreq.c:1.219 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet/udp_usrreq.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.219 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.220 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.219 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.220 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -1145,40 +1145,6 @@ udp_purgeif(struct socket *so, struct if } static int -udp_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 (sotoinpcb(so) == NULL) - return EINVAL; - - panic("udp_usrreq"); - - return 0; -} - -static int sysctl_net_inet_udp_stats(SYSCTLFN_ARGS) { @@ -1415,7 +1381,6 @@ PR_WRAP_USRREQS(udp) #define udp_send udp_send_wrapper #define udp_sendoob udp_sendoob_wrapper #define udp_purgeif udp_purgeif_wrapper -#define udp_usrreq udp_usrreq_wrapper const struct pr_usrreqs udp_usrreqs = { .pr_attach = udp_attach, @@ -1437,5 +1402,4 @@ const struct pr_usrreqs udp_usrreqs = { .pr_send = udp_send, .pr_sendoob = udp_sendoob, .pr_purgeif = udp_purgeif, - .pr_generic = udp_usrreq, }; Index: src/sys/netinet6/dccp6_usrreq.c diff -u src/sys/netinet6/dccp6_usrreq.c:1.4 src/sys/netinet6/dccp6_usrreq.c:1.5 --- src/sys/netinet6/dccp6_usrreq.c:1.4 Sat Apr 25 14:56:05 2015 +++ src/sys/netinet6/dccp6_usrreq.c Sun Apr 26 21:40:49 2015 @@ -1,5 +1,5 @@ /* $KAME: dccp6_usrreq.c,v 1.13 2005/07/27 08:42:56 nishida Exp $ */ -/* $NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $ */ +/* $NetBSD: dccp6_usrreq.c,v 1.5 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (C) 2003 WIDE Project. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dccp6_usrreq.c,v 1.5 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_dccp.h" @@ -329,57 +329,6 @@ dccp6_purgeif(struct socket *so, struct return 0; } -int -dccp6_usrreq(struct socket *so, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *control, struct lwp *l) -{ - 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); - - if (sotoin6pcb(so) == NULL) { - error = EINVAL; - goto release; - } - - switch (req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - error = EOPNOTSUPP; - break; - - default: - panic("dccp6_usrreq"); - } - -release: - if (control != NULL) - m_freem(control); - if (m != NULL) - m_freem(m); - return error; -} - static int dccp6_attach(struct socket *so, int proto) { @@ -496,7 +445,6 @@ PR_WRAP_USRREQS(dccp6) #define dccp6_send dccp6_send_wrapper #define dccp6_sendoob dccp6_sendoob_wrapper #define dccp6_purgeif dccp6_purgeif_wrapper -#define dccp6_usrreq dccp6_usrreq_wrapper const struct pr_usrreqs dccp6_usrreqs = { .pr_attach = dccp6_attach, @@ -518,5 +466,4 @@ const struct pr_usrreqs dccp6_usrreqs = .pr_send = dccp6_send, .pr_sendoob = dccp6_sendoob, .pr_purgeif = dccp6_purgeif, - .pr_generic = dccp6_usrreq, }; Index: src/sys/netinet6/raw_ip6.c diff -u src/sys/netinet6/raw_ip6.c:1.138 src/sys/netinet6/raw_ip6.c:1.139 --- src/sys/netinet6/raw_ip6.c:1.138 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet6/raw_ip6.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.138 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.139 2015/04/26 21:40:49 rtr Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.138 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.139 2015/04/26 21:40:49 rtr Exp $"); #include "opt_ipsec.h" @@ -931,34 +931,6 @@ rip6_purgeif(struct socket *so, struct i return 0; } -int -rip6_usrreq(struct socket *so, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *control, struct lwp *l) -{ - - 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_PURGEIF); - KASSERT(req != PRU_SENDOOB); - - panic("rip6_usrreq"); - - return 0; -} - static int sysctl_net_inet6_raw6_stats(SYSCTLFN_ARGS) { @@ -1018,7 +990,6 @@ PR_WRAP_USRREQS(rip6) #define rip6_send rip6_send_wrapper #define rip6_sendoob rip6_sendoob_wrapper #define rip6_purgeif rip6_purgeif_wrapper -#define rip6_usrreq rip6_usrreq_wrapper const struct pr_usrreqs rip6_usrreqs = { .pr_attach = rip6_attach, @@ -1040,5 +1011,4 @@ const struct pr_usrreqs rip6_usrreqs = { .pr_send = rip6_send, .pr_sendoob = rip6_sendoob, .pr_purgeif = rip6_purgeif, - .pr_generic = rip6_usrreq, }; Index: src/sys/netinet6/udp6_usrreq.c diff -u src/sys/netinet6/udp6_usrreq.c:1.118 src/sys/netinet6/udp6_usrreq.c:1.119 --- src/sys/netinet6/udp6_usrreq.c:1.118 Fri Apr 24 22:32:37 2015 +++ src/sys/netinet6/udp6_usrreq.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_usrreq.c,v 1.118 2015/04/24 22:32:37 rtr Exp $ */ +/* $NetBSD: udp6_usrreq.c,v 1.119 2015/04/26 21:40:49 rtr Exp $ */ /* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.118 2015/04/24 22:32:37 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.119 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_inet_csum.h" @@ -907,57 +907,6 @@ udp6_purgeif(struct socket *so, struct i return 0; } -int -udp6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr6, - struct mbuf *control, struct lwp *l) -{ - 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); - - if (sotoin6pcb(so) == NULL) { - error = EINVAL; - goto release; - } - - switch (req) { - case PRU_FASTTIMO: - case PRU_SLOWTIMO: - case PRU_PROTORCV: - case PRU_PROTOSEND: - error = EOPNOTSUPP; - break; - - default: - panic("udp6_usrreq"); - } - -release: - if (control != NULL) - m_freem(control); - if (m != NULL) - m_freem(m); - return error; -} - static int sysctl_net_inet6_udp6_stats(SYSCTLFN_ARGS) { @@ -1046,7 +995,6 @@ PR_WRAP_USRREQS(udp6) #define udp6_send udp6_send_wrapper #define udp6_sendoob udp6_sendoob_wrapper #define udp6_purgeif udp6_purgeif_wrapper -#define udp6_usrreq udp6_usrreq_wrapper const struct pr_usrreqs udp6_usrreqs = { .pr_attach = udp6_attach, @@ -1068,5 +1016,4 @@ const struct pr_usrreqs udp6_usrreqs = { .pr_send = udp6_send, .pr_sendoob = udp6_sendoob, .pr_purgeif = udp6_purgeif, - .pr_generic = udp6_usrreq, }; Index: src/sys/netipsec/keysock.c diff -u src/sys/netipsec/keysock.c:1.46 src/sys/netipsec/keysock.c:1.47 --- src/sys/netipsec/keysock.c:1.46 Fri Apr 24 22:32:38 2015 +++ src/sys/netipsec/keysock.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: keysock.c,v 1.46 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: keysock.c,v 1.47 2015/04/26 21:40:49 rtr Exp $ */ /* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.46 2015/04/24 22:32:38 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.47 2015/04/26 21:40:49 rtr Exp $"); /* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */ @@ -667,44 +667,6 @@ key_purgeif(struct socket *so, struct if } /* - * key_usrreq() - * derived from net/rtsock.c:route_usrreq() - */ -static int -key_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); - m = control = NULL; /* reclaimed in raw_usrreq */ - splx(s); - - return error; -} - -/* * Definitions of protocols supported in the KEY domain. */ @@ -730,7 +692,6 @@ PR_WRAP_USRREQS(key) #define key_send key_send_wrapper #define key_sendoob key_sendoob_wrapper #define key_purgeif key_purgeif_wrapper -#define key_usrreq key_usrreq_wrapper const struct pr_usrreqs key_usrreqs = { .pr_attach = key_attach, @@ -752,7 +713,6 @@ const struct pr_usrreqs key_usrreqs = { .pr_send = key_send, .pr_sendoob = key_sendoob, .pr_purgeif = key_purgeif, - .pr_generic = key_usrreq, }; const struct protosw keysw[] = { Index: src/sys/netmpls/mpls_proto.c diff -u src/sys/netmpls/mpls_proto.c:1.26 src/sys/netmpls/mpls_proto.c:1.27 --- src/sys/netmpls/mpls_proto.c:1.26 Fri Apr 24 22:32:38 2015 +++ src/sys/netmpls/mpls_proto.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mpls_proto.c,v 1.26 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: mpls_proto.c,v 1.27 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.26 2015/04/24 22:32:38 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.27 2015/04/26 21:40:49 rtr Exp $"); #include "opt_inet.h" #include "opt_mbuftrace.h" @@ -228,33 +228,6 @@ mpls_purgeif(struct socket *so, struct i return EOPNOTSUPP; } -static int -mpls_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; -} - /* * Sysctl for MPLS variables. */ @@ -356,7 +329,6 @@ PR_WRAP_USRREQS(mpls) #define mpls_send mpls_send_wrapper #define mpls_sendoob mpls_sendoob_wrapper #define mpls_purgeif mpls_purgeif_wrapper -#define mpls_usrreq mpls_usrreq_wrapper static const struct pr_usrreqs mpls_usrreqs = { .pr_attach = mpls_attach, @@ -378,7 +350,6 @@ static const struct pr_usrreqs mpls_usrr .pr_send = mpls_send, .pr_sendoob = mpls_sendoob, .pr_purgeif = mpls_purgeif, - .pr_generic = mpls_usrreq, }; const struct protosw mplssw[] = { Index: src/sys/netnatm/natm.c diff -u src/sys/netnatm/natm.c:1.47 src/sys/netnatm/natm.c:1.48 --- src/sys/netnatm/natm.c:1.47 Fri Apr 24 22:32:38 2015 +++ src/sys/netnatm/natm.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: natm.c,v 1.47 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: natm.c,v 1.48 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (c) 1996 Charles D. Cranor and Washington University. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.47 2015/04/24 22:32:38 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.48 2015/04/26 21:40:49 rtr Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -429,63 +429,6 @@ natm_purgeif(struct socket *so, struct i } /* - * user requests - */ - -static int -natm_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) -{ - int error = 0, s, s2; - struct natmpcb *npcb; - struct sockaddr_natm *snatm; - struct atm_pseudoioctl api; - struct atm_pseudohdr *aph; - struct ifnet *ifp; - int proto = so->so_proto->pr_protocol; - - 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); - - if (so->so_pcb == NULL) - return EINVAL; - - switch (req) { - case PRU_FASTTIMO: /* 200ms timeout */ - case PRU_SLOWTIMO: /* 500ms timeout */ - case PRU_PROTORCV: /* receive from below */ - case PRU_PROTOSEND: /* send to below */ -#ifdef DIAGNOSTIC - printf("natm: PRU #%d unsupported\n", req); -#endif - error = EOPNOTSUPP; - break; - - default: panic("natm usrreq"); - } - -done: - return error; -} - -/* * natmintr: splsoftnet interrupt * * note: we expect a socket pointer in rcvif rather than an interface @@ -583,7 +526,6 @@ PR_WRAP_USRREQS(natm) #define natm_send natm_send_wrapper #define natm_sendoob natm_sendoob_wrapper #define natm_purgeif natm_purgeif_wrapper -#define natm_usrreq natm_usrreq_wrapper const struct pr_usrreqs natm_usrreqs = { .pr_attach = natm_attach, @@ -605,5 +547,4 @@ const struct pr_usrreqs natm_usrreqs = { .pr_send = natm_send, .pr_sendoob = natm_sendoob, .pr_purgeif = natm_purgeif, - .pr_generic = natm_usrreq, }; Index: src/sys/rump/net/lib/libsockin/sockin.c diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.60 src/sys/rump/net/lib/libsockin/sockin.c:1.61 --- src/sys/rump/net/lib/libsockin/sockin.c:1.60 Fri Apr 24 22:32:38 2015 +++ src/sys/rump/net/lib/libsockin/sockin.c Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sockin.c,v 1.60 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: sockin.c,v 1.61 2015/04/26 21:40:49 rtr Exp $ */ /* * Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.60 2015/04/24 22:32:38 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.61 2015/04/26 21:40:49 rtr Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -86,8 +86,6 @@ static int sockin_send(struct socket *, struct mbuf *, struct lwp *); static int sockin_sendoob(struct socket *, struct mbuf *, struct mbuf *); static int sockin_purgeif(struct socket *, struct ifnet *); -static int sockin_usrreq(struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct lwp *); static int sockin_ctloutput(int op, struct socket *, struct sockopt *); static const struct pr_usrreqs sockin_usrreqs = { @@ -110,7 +108,6 @@ static const struct pr_usrreqs sockin_us .pr_send = sockin_send, .pr_sendoob = sockin_sendoob, .pr_purgeif = sockin_purgeif, - .pr_generic = sockin_usrreq, }; const struct protosw sockinsw[] = { @@ -695,33 +692,6 @@ sockin_purgeif(struct socket *so, struct } static int -sockin_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) -{ - 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); - - panic("sockin_usrreq: IMPLEMENT ME, req %d not supported", req); - - return 0; -} - -static int sockin_ctloutput(int op, struct socket *so, struct sockopt *sopt) { Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.474 src/sys/sys/param.h:1.475 --- src/sys/sys/param.h:1.474 Fri Apr 24 22:32:38 2015 +++ src/sys/sys/param.h Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.474 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: param.h,v 1.475 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799001200 /* NetBSD 7.99.12 */ +#define __NetBSD_Version__ 799001300 /* NetBSD 7.99.13 */ #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \ (m) * 1000000) + (p) * 100) <= __NetBSD_Version__) Index: src/sys/sys/protosw.h diff -u src/sys/sys/protosw.h:1.62 src/sys/sys/protosw.h:1.63 --- src/sys/sys/protosw.h:1.62 Fri Apr 24 22:32:38 2015 +++ src/sys/sys/protosw.h Sun Apr 26 21:40:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: protosw.h,v 1.62 2015/04/24 22:32:38 rtr Exp $ */ +/* $NetBSD: protosw.h,v 1.63 2015/04/26 21:40:49 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -256,8 +256,6 @@ struct pr_usrreqs { struct mbuf *, struct lwp *); int (*pr_sendoob)(struct socket *, struct mbuf *, struct mbuf *); int (*pr_purgeif)(struct socket *, struct ifnet *); - int (*pr_generic)(struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct lwp *); }; /* @@ -471,17 +469,6 @@ name##_purgeif_wrapper(struct socket *a, rv = name##_purgeif(a, b); \ KERNEL_UNLOCK_ONE(NULL); \ return rv; \ -} \ -static int \ -name##_usrreq_wrapper(struct socket *a, int b, \ - struct mbuf *c, struct mbuf *d, struct mbuf *e, \ - struct lwp *f) \ -{ \ - int rv; \ - KERNEL_LOCK(1, NULL); \ - rv = name##_usrreq(a, b, c, d, e, f); \ - KERNEL_UNLOCK_ONE(NULL); \ - return rv; \ } #define PR_WRAP_CTLOUTPUT(name) \