Deleted Added
full compact
svr4_socket.c (107839) svr4_socket.c (107849)
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1996 Christos Zoulas.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1996 Christos Zoulas.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $FreeBSD: head/sys/compat/svr4/svr4_socket.c 107839 2002-12-13 22:41:47Z alfred $
31 * $FreeBSD: head/sys/compat/svr4/svr4_socket.c 107849 2002-12-14 01:56:26Z alfred $
32 */
33
34/*
35 * In SVR4 unix domain sockets are referenced sometimes
36 * (in putmsg(2) for example) as a [device, inode] pair instead of a pathname.
37 * Since there is no iname() routine in the kernel, and we need access to
38 * a mapping from inode to pathname, we keep our own table. This is a simple
39 * linked list that contains the pathname, the [device, inode] pair, the

--- 121 unchanged lines hidden (view full) ---

161}
162
163
164int
165svr4_sys_socket(td, uap)
166 struct thread *td;
167 struct svr4_sys_socket_args *uap;
168{
32 */
33
34/*
35 * In SVR4 unix domain sockets are referenced sometimes
36 * (in putmsg(2) for example) as a [device, inode] pair instead of a pathname.
37 * Since there is no iname() routine in the kernel, and we need access to
38 * a mapping from inode to pathname, we keep our own table. This is a simple
39 * linked list that contains the pathname, the [device, inode] pair, the

--- 121 unchanged lines hidden (view full) ---

161}
162
163
164int
165svr4_sys_socket(td, uap)
166 struct thread *td;
167 struct svr4_sys_socket_args *uap;
168{
169 switch (SCARG(uap, type)) {
169 switch (uap->type) {
170 case SVR4_SOCK_DGRAM:
170 case SVR4_SOCK_DGRAM:
171 SCARG(uap, type) = SOCK_DGRAM;
171 uap->type = SOCK_DGRAM;
172 break;
173
174 case SVR4_SOCK_STREAM:
172 break;
173
174 case SVR4_SOCK_STREAM:
175 SCARG(uap, type) = SOCK_STREAM;
175 uap->type = SOCK_STREAM;
176 break;
177
178 case SVR4_SOCK_RAW:
176 break;
177
178 case SVR4_SOCK_RAW:
179 SCARG(uap, type) = SOCK_RAW;
179 uap->type = SOCK_RAW;
180 break;
181
182 case SVR4_SOCK_RDM:
180 break;
181
182 case SVR4_SOCK_RDM:
183 SCARG(uap, type) = SOCK_RDM;
183 uap->type = SOCK_RDM;
184 break;
185
186 case SVR4_SOCK_SEQPACKET:
184 break;
185
186 case SVR4_SOCK_SEQPACKET:
187 SCARG(uap, type) = SOCK_SEQPACKET;
187 uap->type = SOCK_SEQPACKET;
188 break;
189 default:
190 return EINVAL;
191 }
192 return socket(td, (struct socket_args *)uap);
193}
188 break;
189 default:
190 return EINVAL;
191 }
192 return socket(td, (struct socket_args *)uap);
193}