diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-08-29 19:56:43 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-08-29 19:56:43 +0000 |
commit | b6f6f56147a65161b228a38652ef442ae8f0941a (patch) | |
tree | f802c0872d5b92d926d966fafbd6188405cc67f6 /sys/compat/svr4/svr4_socket.c | |
parent | 7b40f7103a2ac57f477cfb688e14b8ff4a7aa519 (diff) |
regen for s/UNIMPL/STD/ for svr4_sys_socket()
Diffstat (limited to 'sys/compat/svr4/svr4_socket.c')
-rw-r--r-- | sys/compat/svr4/svr4_socket.c | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index 34d2a1d5346..3d8ca6a7d22 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_socket.c,v 1.2 1997/02/13 19:45:22 niklas Exp $ */ -/* $NetBSD: svr4_socket.c,v 1.3 1996/10/28 08:46:36 fvdl Exp $ */ +/* $OpenBSD: svr4_socket.c,v 1.3 1997/08/29 19:56:37 kstailey Exp $ */ +/* $NetBSD: svr4_socket.c,v 1.4 1997/07/21 23:02:37 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -47,13 +47,19 @@ #include <sys/queue.h> #include <sys/mbuf.h> #include <sys/file.h> +#include <sys/mount.h> #include <sys/socket.h> #include <sys/socketvar.h> +#include <sys/syscallargs.h> #include <sys/un.h> #include <sys/stat.h> +#include <compat/svr4/svr4_types.h> #include <compat/svr4/svr4_util.h> #include <compat/svr4/svr4_socket.h> +#include <compat/svr4/svr4_signal.h> +#include <compat/svr4/svr4_sockmod.h> +#include <compat/svr4/svr4_syscallargs.h> struct svr4_sockcache_entry { struct proc *p; /* Process for the socket */ @@ -163,3 +169,38 @@ svr4_add_socket(p, path, st) p, e->dev, e->ino)); return 0; } + + +int +svr4_sys_socket(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct svr4_sys_socket_args *uap = v; + + switch (SCARG(uap, type)) { + case SVR4_SOCK_DGRAM: + SCARG(uap, type) = SOCK_DGRAM; + break; + + case SVR4_SOCK_STREAM: + SCARG(uap, type) = SOCK_STREAM; + break; + + case SVR4_SOCK_RAW: + SCARG(uap, type) = SOCK_RAW; + break; + + case SVR4_SOCK_RDM: + SCARG(uap, type) = SOCK_RDM; + break; + + case SVR4_SOCK_SEQPACKET: + SCARG(uap, type) = SOCK_SEQPACKET; + break; + default: + return EINVAL; + } + return sys_socket(p, uap, retval); +} |