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