From b6f6f56147a65161b228a38652ef442ae8f0941a Mon Sep 17 00:00:00 2001 From: kstailey Date: Fri, 29 Aug 1997 19:56:43 +0000 Subject: regen for s/UNIMPL/STD/ for svr4_sys_socket() --- sys/compat/svr4/svr4_socket.c | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'sys/compat/svr4/svr4_socket.c') 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 #include #include +#include #include #include +#include #include #include +#include #include #include +#include +#include +#include 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); +} -- cgit v1.2.3