1 1.4 pgoyette /* $NetBSD: uipc_syscalls_30.c,v 1.4 2019/01/27 02:08:39 pgoyette Exp $ */ 2 1.1 mrg 3 1.1 mrg /* written by Pavel Cahyna, 2006. Public domain. */ 4 1.1 mrg 5 1.1 mrg #include <sys/cdefs.h> 6 1.4 pgoyette __KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_30.c,v 1.4 2019/01/27 02:08:39 pgoyette Exp $"); 7 1.4 pgoyette 8 1.4 pgoyette #if defined(_KERNEL_OPT) 9 1.4 pgoyette #include "opt_compat_netbsd.h" 10 1.4 pgoyette #endif 11 1.1 mrg 12 1.1 mrg /* 13 1.1 mrg * System call interface to the socket abstraction. 14 1.1 mrg */ 15 1.1 mrg 16 1.1 mrg #include <sys/param.h> 17 1.1 mrg #include <sys/kernel.h> 18 1.1 mrg #include <sys/msg.h> 19 1.1 mrg #include <sys/sysctl.h> 20 1.1 mrg #include <sys/mount.h> 21 1.4 pgoyette #include <sys/syscall.h> 22 1.4 pgoyette #include <sys/syscallvar.h> 23 1.1 mrg #include <sys/syscallargs.h> 24 1.1 mrg #include <sys/errno.h> 25 1.1 mrg 26 1.4 pgoyette #include <compat/common/compat_mod.h> 27 1.4 pgoyette 28 1.4 pgoyette static const struct syscall_package uipc_syscalls_30_syscalls[] = { 29 1.4 pgoyette { SYS_compat_30_socket, 0, (sy_call_t *)compat_30_sys_socket }, 30 1.4 pgoyette { 0, 0, NULL} 31 1.4 pgoyette }; 32 1.4 pgoyette 33 1.1 mrg int 34 1.4 pgoyette compat_30_sys_socket(struct lwp *l, 35 1.4 pgoyette const struct compat_30_sys_socket_args *uap, register_t *retval) 36 1.1 mrg { 37 1.1 mrg int error; 38 1.1 mrg 39 1.3 dsl error = sys___socket30(l, (const void *)uap, retval); 40 1.1 mrg if (error == EAFNOSUPPORT) 41 1.1 mrg error = EPROTONOSUPPORT; 42 1.1 mrg 43 1.1 mrg return (error); 44 1.1 mrg } 45 1.4 pgoyette 46 1.4 pgoyette int 47 1.4 pgoyette uipc_syscalls_30_init(void) 48 1.4 pgoyette { 49 1.4 pgoyette 50 1.4 pgoyette return syscall_establish(NULL, uipc_syscalls_30_syscalls); 51 1.4 pgoyette } 52 1.4 pgoyette 53 1.4 pgoyette int 54 1.4 pgoyette uipc_syscalls_30_fini(void) 55 1.4 pgoyette { 56 1.4 pgoyette 57 1.4 pgoyette return syscall_disestablish(NULL, uipc_syscalls_30_syscalls); 58 1.4 pgoyette } 59