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