int compat_30_netbsd32_socket(struct lwp *l, const struct compat_30_netbsd32_socket_args *uap, register_t *retval) { /* { syscallarg(int) domain; syscallarg(int) type; syscallarg(int) protocol; } */ struct compat_30_sys_socket_args ua; NETBSD32TO64_UAP(domain); NETBSD32TO64_UAP(type); NETBSD32TO64_UAP(protocol); return (compat_30_sys_socket(l, &ua, retval)); }
int darwin_sys_socket(struct lwp *l, const struct darwin_sys_socket_args *uap, register_t *retval) { /* { syscallarg(int) domain; syscallarg(int) type; syscallarg(int) protocol; } */ struct compat_30_sys_socket_args cup; if ((unsigned)SCARG(uap, domain) >= __arraycount(darwin_to_native_af)) return (EPROTONOSUPPORT); SCARG(&cup, domain) = darwin_to_native_af[SCARG(uap, domain)]; SCARG(&cup, type) = SCARG(uap, type); SCARG(&cup, protocol) = SCARG(uap, protocol); return compat_30_sys_socket(l, &cup, retval); }