linux_socket.h (302408) | linux_socket.h (314107) |
---|---|
1/*- 2 * Copyright (c) 2000 Assar Westerlund 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2000 Assar Westerlund 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: stable/11/sys/compat/linux/linux_socket.h 298829 2016-04-30 00:53:10Z pfg $ | 28 * $FreeBSD: stable/11/sys/compat/linux/linux_socket.h 314107 2017-02-22 19:57:59Z dchagin $ |
29 */ 30 31#ifndef _LINUX_SOCKET_H_ 32#define _LINUX_SOCKET_H_ 33 34/* msg flags in recvfrom/recvmsg */ 35 36#define LINUX_MSG_OOB 0x01 --- 100 unchanged lines hidden (view full) --- 137struct l_ucred { 138 uint32_t pid; 139 uint32_t uid; 140 uint32_t gid; 141}; 142 143#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) 144 | 29 */ 30 31#ifndef _LINUX_SOCKET_H_ 32#define _LINUX_SOCKET_H_ 33 34/* msg flags in recvfrom/recvmsg */ 35 36#define LINUX_MSG_OOB 0x01 --- 100 unchanged lines hidden (view full) --- 137struct l_ucred { 138 uint32_t pid; 139 uint32_t uid; 140 uint32_t gid; 141}; 142 143#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) 144 |
145struct linux_sendto_args { 146 int s; 147 l_uintptr_t msg; 148 int len; 149 int flags; 150 l_uintptr_t to; 151 int tolen; 152}; 153 154struct linux_socket_args { 155 int domain; 156 int type; 157 int protocol; 158}; 159 160struct linux_bind_args { 161 int s; 162 l_uintptr_t name; 163 int namelen; 164}; 165 166struct linux_connect_args { 167 int s; 168 l_uintptr_t name; 169 int namelen; 170}; 171 172struct linux_listen_args { 173 int s; 174 int backlog; 175}; 176 | |
177struct linux_accept_args { | 145struct linux_accept_args { |
178 int s; 179 l_uintptr_t addr; 180 l_uintptr_t namelen; | 146 register_t s; 147 register_t addr; 148 register_t namelen; |
181}; 182 | 149}; 150 |
183struct linux_accept4_args { 184 int s; 185 l_uintptr_t addr; 186 l_uintptr_t namelen; 187 int flags; 188}; 189 190struct linux_getsockname_args { 191 int s; 192 l_uintptr_t addr; 193 l_uintptr_t namelen; 194}; 195 196struct linux_getpeername_args { 197 int s; 198 l_uintptr_t addr; 199 l_uintptr_t namelen; 200}; 201 202struct linux_socketpair_args { 203 int domain; 204 int type; 205 int protocol; 206 l_uintptr_t rsv; 207}; 208 209struct linux_recvfrom_args { 210 int s; 211 l_uintptr_t buf; 212 int len; 213 int flags; 214 l_uintptr_t from; 215 l_uintptr_t fromlen; 216}; 217 218struct linux_sendmsg_args { 219 int s; 220 l_uintptr_t msg; 221 int flags; 222}; 223 224struct linux_recvmsg_args { 225 int s; 226 l_uintptr_t msg; 227 int flags; 228}; 229 230struct linux_shutdown_args { 231 int s; 232 int how; 233}; 234 235struct linux_setsockopt_args { 236 int s; 237 int level; 238 int optname; 239 l_uintptr_t optval; 240 int optlen; 241}; 242 243struct linux_getsockopt_args { 244 int s; 245 int level; 246 int optname; 247 l_uintptr_t optval; 248 l_uintptr_t optlen; 249}; 250 251int linux_socket(struct thread *td, struct linux_socket_args *args); 252int linux_bind(struct thread *td, struct linux_bind_args *args); 253int linux_connect(struct thread *, struct linux_connect_args *); 254int linux_listen(struct thread *td, struct linux_listen_args *args); | |
255int linux_accept(struct thread *td, struct linux_accept_args *args); | 151int linux_accept(struct thread *td, struct linux_accept_args *args); |
256int linux_accept4(struct thread *td, struct linux_accept4_args *args); 257int linux_getsockname(struct thread *td, struct linux_getsockname_args *args); 258int linux_getpeername(struct thread *td, struct linux_getpeername_args *args); 259int linux_socketpair(struct thread *td, struct linux_socketpair_args *args); 260int linux_sendto(struct thread *td, struct linux_sendto_args *args); 261int linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args); 262int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args); 263int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args); 264int linux_shutdown(struct thread *td, struct linux_shutdown_args *args); 265int linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args); 266int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args); | |
267 268#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ 269 | 152 153#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ 154 |
155 156 |
|
270/* Operations for socketcall */ 271 272#define LINUX_SOCKET 1 273#define LINUX_BIND 2 274#define LINUX_CONNECT 3 275#define LINUX_LISTEN 4 276#define LINUX_ACCEPT 5 277#define LINUX_GETSOCKNAME 6 --- 60 unchanged lines hidden --- | 157/* Operations for socketcall */ 158 159#define LINUX_SOCKET 1 160#define LINUX_BIND 2 161#define LINUX_CONNECT 3 162#define LINUX_LISTEN 4 163#define LINUX_ACCEPT 5 164#define LINUX_GETSOCKNAME 6 --- 60 unchanged lines hidden --- |