| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: raw_usrreq.c,v 1.63 2019/08/02 01:55:01 ozaki-r Exp $ */ | | 1 | /* $NetBSD: raw_usrreq.c,v 1.64 2019/08/02 02:17:46 ozaki-r Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1980, 1986, 1993 | | 4 | * Copyright (c) 1980, 1986, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -26,27 +26,27 @@ | | | @@ -26,27 +26,27 @@ |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | * SUCH DAMAGE. | | 29 | * SUCH DAMAGE. |
30 | * | | 30 | * |
31 | * @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93 | | 31 | * @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93 |
32 | */ | | 32 | */ |
33 | | | 33 | |
34 | /* | | 34 | /* |
35 | * Raw protocol interface. | | 35 | * Raw protocol interface. |
36 | */ | | 36 | */ |
37 | | | 37 | |
38 | #include <sys/cdefs.h> | | 38 | #include <sys/cdefs.h> |
39 | __KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.63 2019/08/02 01:55:01 ozaki-r Exp $"); | | 39 | __KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.64 2019/08/02 02:17:46 ozaki-r Exp $"); |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/mbuf.h> | | 42 | #include <sys/mbuf.h> |
43 | #include <sys/domain.h> | | 43 | #include <sys/domain.h> |
44 | #include <sys/protosw.h> | | 44 | #include <sys/protosw.h> |
45 | #include <sys/socket.h> | | 45 | #include <sys/socket.h> |
46 | #include <sys/socketvar.h> | | 46 | #include <sys/socketvar.h> |
47 | #include <sys/errno.h> | | 47 | #include <sys/errno.h> |
48 | #include <sys/systm.h> | | 48 | #include <sys/systm.h> |
49 | #include <sys/proc.h> | | 49 | #include <sys/proc.h> |
50 | #include <sys/kauth.h> | | 50 | #include <sys/kauth.h> |
51 | | | 51 | |
52 | #include <net/if.h> | | 52 | #include <net/if.h> |
| @@ -105,27 +105,27 @@ raw_input(struct mbuf *m0, struct sockpr | | | @@ -105,27 +105,27 @@ raw_input(struct mbuf *m0, struct sockpr |
105 | soroverflow(last); | | 105 | soroverflow(last); |
106 | } else | | 106 | } else |
107 | sorwakeup(last); | | 107 | sorwakeup(last); |
108 | } | | 108 | } |
109 | last = rp->rcb_socket; | | 109 | last = rp->rcb_socket; |
110 | } | | 110 | } |
111 | if (last != NULL) { | | 111 | if (last != NULL) { |
112 | if (sbappendaddr(&last->so_rcv, src, m, NULL) == 0) { | | 112 | if (sbappendaddr(&last->so_rcv, src, m, NULL) == 0) { |
113 | m_freem(m); | | 113 | m_freem(m); |
114 | soroverflow(last); | | 114 | soroverflow(last); |
115 | } else | | 115 | } else |
116 | sorwakeup(last); | | 116 | sorwakeup(last); |
117 | } else { | | 117 | } else { |
118 | m_free(m); | | 118 | m_freem(m); |
119 | } | | 119 | } |
120 | } | | 120 | } |
121 | | | 121 | |
122 | void * | | 122 | void * |
123 | raw_ctlinput(int cmd, const struct sockaddr *arg, void *d) | | 123 | raw_ctlinput(int cmd, const struct sockaddr *arg, void *d) |
124 | { | | 124 | { |
125 | | | 125 | |
126 | if ((unsigned)cmd >= PRC_NCMDS) | | 126 | if ((unsigned)cmd >= PRC_NCMDS) |
127 | return NULL; | | 127 | return NULL; |
128 | return NULL; | | 128 | return NULL; |
129 | /* INCOMPLETE */ | | 129 | /* INCOMPLETE */ |
130 | } | | 130 | } |
131 | | | 131 | |