xref: /titanic_51/usr/src/uts/common/fs/sockfs/sock_notsupp.c (revision 0a0e9771ca0211c15f3ac4466b661c145feeb9e4)
1*0a0e9771SDarren Reed /*
2*0a0e9771SDarren Reed  * CDDL HEADER START
3*0a0e9771SDarren Reed  *
4*0a0e9771SDarren Reed  * The contents of this file are subject to the terms of the
5*0a0e9771SDarren Reed  * Common Development and Distribution License (the "License").
6*0a0e9771SDarren Reed  * You may not use this file except in compliance with the License.
7*0a0e9771SDarren Reed  *
8*0a0e9771SDarren Reed  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*0a0e9771SDarren Reed  * or http://www.opensolaris.org/os/licensing.
10*0a0e9771SDarren Reed  * See the License for the specific language governing permissions
11*0a0e9771SDarren Reed  * and limitations under the License.
12*0a0e9771SDarren Reed  *
13*0a0e9771SDarren Reed  * When distributing Covered Code, include this CDDL HEADER in each
14*0a0e9771SDarren Reed  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*0a0e9771SDarren Reed  * If applicable, add the following below this CDDL HEADER, with the
16*0a0e9771SDarren Reed  * fields enclosed by brackets "[]" replaced with your own identifying
17*0a0e9771SDarren Reed  * information: Portions Copyright [yyyy] [name of copyright owner]
18*0a0e9771SDarren Reed  *
19*0a0e9771SDarren Reed  * CDDL HEADER END
20*0a0e9771SDarren Reed  */
21*0a0e9771SDarren Reed 
22*0a0e9771SDarren Reed /*
23*0a0e9771SDarren Reed  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*0a0e9771SDarren Reed  * Use is subject to license terms.
25*0a0e9771SDarren Reed  */
26*0a0e9771SDarren Reed 
27*0a0e9771SDarren Reed #include <sys/types.h>
28*0a0e9771SDarren Reed #include <sys/param.h>
29*0a0e9771SDarren Reed #include <sys/stropts.h>
30*0a0e9771SDarren Reed #include <sys/socket.h>
31*0a0e9771SDarren Reed #include <sys/socketvar.h>
32*0a0e9771SDarren Reed #include <sys/socket_proto.h>
33*0a0e9771SDarren Reed 
34*0a0e9771SDarren Reed 
35*0a0e9771SDarren Reed /*ARGSUSED*/
36*0a0e9771SDarren Reed int
37*0a0e9771SDarren Reed sock_accept_notsupp(sock_lower_handle_t low1, sock_lower_handle_t low2,
38*0a0e9771SDarren Reed     sock_upper_handle_t upper, struct cred *cr)
39*0a0e9771SDarren Reed {
40*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
41*0a0e9771SDarren Reed }
42*0a0e9771SDarren Reed 
43*0a0e9771SDarren Reed /*ARGSUSED*/
44*0a0e9771SDarren Reed int
45*0a0e9771SDarren Reed sock_bind_notsupp(sock_lower_handle_t handle, struct sockaddr *name,
46*0a0e9771SDarren Reed     socklen_t namelen, struct cred *cr)
47*0a0e9771SDarren Reed {
48*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
49*0a0e9771SDarren Reed }
50*0a0e9771SDarren Reed 
51*0a0e9771SDarren Reed /*ARGSUSED*/
52*0a0e9771SDarren Reed int
53*0a0e9771SDarren Reed sock_listen_notsupp(sock_lower_handle_t handle, int backlog,
54*0a0e9771SDarren Reed     struct cred *cr)
55*0a0e9771SDarren Reed {
56*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
57*0a0e9771SDarren Reed }
58*0a0e9771SDarren Reed 
59*0a0e9771SDarren Reed /*ARGSUSED*/
60*0a0e9771SDarren Reed int
61*0a0e9771SDarren Reed sock_connect_notsupp(sock_lower_handle_t handle,
62*0a0e9771SDarren Reed     const struct sockaddr *name, socklen_t namelen, sock_connid_t *conp,
63*0a0e9771SDarren Reed     struct cred *cr)
64*0a0e9771SDarren Reed {
65*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
66*0a0e9771SDarren Reed }
67*0a0e9771SDarren Reed 
68*0a0e9771SDarren Reed /*ARGSUSED*/
69*0a0e9771SDarren Reed int
70*0a0e9771SDarren Reed sock_getsockname_notsupp(sock_lower_handle_t handle, struct sockaddr *sa,
71*0a0e9771SDarren Reed     socklen_t *len, struct cred *cr)
72*0a0e9771SDarren Reed {
73*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
74*0a0e9771SDarren Reed }
75*0a0e9771SDarren Reed 
76*0a0e9771SDarren Reed /*ARGSUSED*/
77*0a0e9771SDarren Reed int
78*0a0e9771SDarren Reed sock_getpeername_notsupp(sock_lower_handle_t handle, struct sockaddr *addr,
79*0a0e9771SDarren Reed     socklen_t *addrlen, struct cred *cr)
80*0a0e9771SDarren Reed {
81*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
82*0a0e9771SDarren Reed }
83*0a0e9771SDarren Reed 
84*0a0e9771SDarren Reed /*ARGSUSED*/
85*0a0e9771SDarren Reed int
86*0a0e9771SDarren Reed sock_getsockopt_notsupp(sock_lower_handle_t handle, int level,
87*0a0e9771SDarren Reed     int option_name, void *optval, socklen_t *optlenp, struct cred *cr)
88*0a0e9771SDarren Reed {
89*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
90*0a0e9771SDarren Reed }
91*0a0e9771SDarren Reed 
92*0a0e9771SDarren Reed /*ARGSUSED*/
93*0a0e9771SDarren Reed int
94*0a0e9771SDarren Reed sock_setsockopt_notsupp(sock_lower_handle_t handle, int level,
95*0a0e9771SDarren Reed     int option_name, const void *optval, socklen_t optlen, struct cred *cr)
96*0a0e9771SDarren Reed {
97*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
98*0a0e9771SDarren Reed }
99*0a0e9771SDarren Reed 
100*0a0e9771SDarren Reed /*ARGSUSED*/
101*0a0e9771SDarren Reed int
102*0a0e9771SDarren Reed sock_send_notsupp(sock_lower_handle_t handle, mblk_t *mp,
103*0a0e9771SDarren Reed     struct msghdr *msg, struct cred *cr)
104*0a0e9771SDarren Reed {
105*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
106*0a0e9771SDarren Reed }
107*0a0e9771SDarren Reed 
108*0a0e9771SDarren Reed /*ARGSUSED*/
109*0a0e9771SDarren Reed int
110*0a0e9771SDarren Reed sock_senduio_notsupp(sock_lower_handle_t handle, struct uio *uiop,
111*0a0e9771SDarren Reed     struct nmsghdr *msg, struct cred *cr)
112*0a0e9771SDarren Reed {
113*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
114*0a0e9771SDarren Reed }
115*0a0e9771SDarren Reed 
116*0a0e9771SDarren Reed /*ARGSUSED*/
117*0a0e9771SDarren Reed int
118*0a0e9771SDarren Reed sock_recvuio_notsupp(sock_lower_handle_t handle, struct uio *uiop,
119*0a0e9771SDarren Reed     struct nmsghdr *msg, struct cred *cr)
120*0a0e9771SDarren Reed {
121*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
122*0a0e9771SDarren Reed }
123*0a0e9771SDarren Reed 
124*0a0e9771SDarren Reed /*ARGSUSED*/
125*0a0e9771SDarren Reed short
126*0a0e9771SDarren Reed sock_poll_notsupp(sock_lower_handle_t handle, short events, int anyyet,
127*0a0e9771SDarren Reed     cred_t *cred)
128*0a0e9771SDarren Reed {
129*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
130*0a0e9771SDarren Reed }
131*0a0e9771SDarren Reed 
132*0a0e9771SDarren Reed /*ARGSUSED*/
133*0a0e9771SDarren Reed int
134*0a0e9771SDarren Reed sock_shutdown_notsupp(sock_lower_handle_t handle, int how, struct cred *cr)
135*0a0e9771SDarren Reed {
136*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
137*0a0e9771SDarren Reed }
138*0a0e9771SDarren Reed 
139*0a0e9771SDarren Reed /*ARGSUSED*/
140*0a0e9771SDarren Reed void
141*0a0e9771SDarren Reed sock_clr_flowctrl_notsupp(sock_lower_handle_t proto_handle)
142*0a0e9771SDarren Reed {
143*0a0e9771SDarren Reed }
144*0a0e9771SDarren Reed 
145*0a0e9771SDarren Reed /*ARGSUSED*/
146*0a0e9771SDarren Reed int
147*0a0e9771SDarren Reed sock_ioctl_notsupp(sock_lower_handle_t handle, int cmd, intptr_t arg,
148*0a0e9771SDarren Reed     int mode, int32_t *rvalp, cred_t *cred)
149*0a0e9771SDarren Reed {
150*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
151*0a0e9771SDarren Reed }
152*0a0e9771SDarren Reed 
153*0a0e9771SDarren Reed /* ARGSUSED */
154*0a0e9771SDarren Reed int
155*0a0e9771SDarren Reed sock_close_notsupp(sock_lower_handle_t proto_handle, int flags, cred_t *cr)
156*0a0e9771SDarren Reed {
157*0a0e9771SDarren Reed 	return (EOPNOTSUPP);
158*0a0e9771SDarren Reed }
159*0a0e9771SDarren Reed 
160*0a0e9771SDarren Reed sock_downcalls_t sock_down_notsupp = {
161*0a0e9771SDarren Reed 	NULL,
162*0a0e9771SDarren Reed 	sock_accept_notsupp,
163*0a0e9771SDarren Reed 	sock_bind_notsupp,
164*0a0e9771SDarren Reed 	sock_listen_notsupp,
165*0a0e9771SDarren Reed 	sock_connect_notsupp,
166*0a0e9771SDarren Reed 	sock_getpeername_notsupp,
167*0a0e9771SDarren Reed 	sock_getsockname_notsupp,
168*0a0e9771SDarren Reed 	sock_getsockopt_notsupp,
169*0a0e9771SDarren Reed 	sock_setsockopt_notsupp,
170*0a0e9771SDarren Reed 	sock_send_notsupp,
171*0a0e9771SDarren Reed 	sock_senduio_notsupp,
172*0a0e9771SDarren Reed 	sock_recvuio_notsupp,
173*0a0e9771SDarren Reed 	sock_poll_notsupp,
174*0a0e9771SDarren Reed 	sock_shutdown_notsupp,
175*0a0e9771SDarren Reed 	sock_clr_flowctrl_notsupp,
176*0a0e9771SDarren Reed 	sock_ioctl_notsupp,
177*0a0e9771SDarren Reed 	sock_close_notsupp,
178*0a0e9771SDarren Reed };
179