| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rtsock.c,v 1.150 2014/07/06 03:33:33 rtr Exp $ */ | | 1 | /* $NetBSD: rtsock.c,v 1.151 2014/07/07 10:18:20 rtr Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
5 | * All rights reserved. | | 5 | * 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. |
| @@ -51,27 +51,27 @@ | | | @@ -51,27 +51,27 @@ |
51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
58 | * SUCH DAMAGE. | | 58 | * SUCH DAMAGE. |
59 | * | | 59 | * |
60 | * @(#)rtsock.c 8.7 (Berkeley) 10/12/95 | | 60 | * @(#)rtsock.c 8.7 (Berkeley) 10/12/95 |
61 | */ | | 61 | */ |
62 | | | 62 | |
63 | #include <sys/cdefs.h> | | 63 | #include <sys/cdefs.h> |
64 | __KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.150 2014/07/06 03:33:33 rtr Exp $"); | | 64 | __KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.151 2014/07/07 10:18:20 rtr Exp $"); |
65 | | | 65 | |
66 | #ifdef _KERNEL_OPT | | 66 | #ifdef _KERNEL_OPT |
67 | #include "opt_inet.h" | | 67 | #include "opt_inet.h" |
68 | #include "opt_mpls.h" | | 68 | #include "opt_mpls.h" |
69 | #include "opt_compat_netbsd.h" | | 69 | #include "opt_compat_netbsd.h" |
70 | #endif | | 70 | #endif |
71 | | | 71 | |
72 | #include <sys/param.h> | | 72 | #include <sys/param.h> |
73 | #include <sys/systm.h> | | 73 | #include <sys/systm.h> |
74 | #include <sys/proc.h> | | 74 | #include <sys/proc.h> |
75 | #include <sys/socket.h> | | 75 | #include <sys/socket.h> |
76 | #include <sys/socketvar.h> | | 76 | #include <sys/socketvar.h> |
77 | #include <sys/domain.h> | | 77 | #include <sys/domain.h> |
| @@ -223,27 +223,27 @@ COMPATNAME(route_detach)(struct socket * | | | @@ -223,27 +223,27 @@ COMPATNAME(route_detach)(struct socket * |
223 | splx(s); | | 223 | splx(s); |
224 | } | | 224 | } |
225 | | | 225 | |
226 | static int | | 226 | static int |
227 | COMPATNAME(route_ioctl)(struct socket *so, u_long cmd, void *nam, | | 227 | COMPATNAME(route_ioctl)(struct socket *so, u_long cmd, void *nam, |
228 | struct ifnet * ifp) | | 228 | struct ifnet * ifp) |
229 | { | | 229 | { |
230 | return EOPNOTSUPP; | | 230 | return EOPNOTSUPP; |
231 | } | | 231 | } |
232 | | | 232 | |
233 | static int | | 233 | static int |
234 | COMPATNAME(route_stat)(struct socket *so, struct stat *ub) | | 234 | COMPATNAME(route_stat)(struct socket *so, struct stat *ub) |
235 | { | | 235 | { |
236 | return 0; | | 236 | return EOPNOTSUPP; |
237 | } | | 237 | } |
238 | | | 238 | |
239 | static int | | 239 | static int |
240 | COMPATNAME(route_usrreq)(struct socket *so, int req, struct mbuf *m, | | 240 | COMPATNAME(route_usrreq)(struct socket *so, int req, struct mbuf *m, |
241 | struct mbuf *nam, struct mbuf *control, struct lwp *l) | | 241 | struct mbuf *nam, struct mbuf *control, struct lwp *l) |
242 | { | | 242 | { |
243 | int s, error = 0; | | 243 | int s, error = 0; |
244 | | | 244 | |
245 | KASSERT(req != PRU_ATTACH); | | 245 | KASSERT(req != PRU_ATTACH); |
246 | KASSERT(req != PRU_DETACH); | | 246 | KASSERT(req != PRU_DETACH); |
247 | KASSERT(req != PRU_CONTROL); | | 247 | KASSERT(req != PRU_CONTROL); |
248 | KASSERT(req != PRU_SENSE); | | 248 | KASSERT(req != PRU_SENSE); |
249 | | | 249 | |