Lines Matching refs:uap

132 sys_socket(struct thread *td, struct socket_args *uap)
135 return (kern_socket(td, uap->domain, uap->type, uap->protocol));
181 sys_bind(struct thread *td, struct bind_args *uap)
186 error = getsockaddr(&sa, uap->name, uap->namelen);
188 error = kern_bindat(td, AT_FDCWD, uap->s, sa);
236 sys_bindat(struct thread *td, struct bindat_args *uap)
241 error = getsockaddr(&sa, uap->name, uap->namelen);
243 error = kern_bindat(td, uap->fd, uap->s, sa);
250 sys_listen(struct thread *td, struct listen_args *uap)
253 return (kern_listen(td, uap->s, uap->backlog));
427 sys_accept(struct thread *td, struct accept_args *uap)
430 return (accept1(td, uap->s, uap->name, uap->anamelen, ACCEPT4_INHERIT));
434 sys_accept4(struct thread *td, struct accept4_args *uap)
437 if (uap->flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK))
440 return (accept1(td, uap->s, uap->name, uap->anamelen, uap->flags));
445 oaccept(struct thread *td, struct oaccept_args *uap)
448 return (accept1(td, uap->s, uap->name, uap->anamelen,
454 sys_connect(struct thread *td, struct connect_args *uap)
459 error = getsockaddr(&sa, uap->name, uap->namelen);
461 error = kern_connectat(td, AT_FDCWD, uap->s, sa);
530 sys_connectat(struct thread *td, struct connectat_args *uap)
535 error = getsockaddr(&sa, uap->name, uap->namelen);
537 error = kern_connectat(td, uap->fd, uap->s, sa);
634 sys_socketpair(struct thread *td, struct socketpair_args *uap)
638 error = kern_socketpair(td, uap->domain, uap->type,
639 uap->protocol, sv);
642 error = copyout(sv, uap->rsv, 2 * sizeof(int));
797 sys_sendto(struct thread *td, struct sendto_args *uap)
802 msg.msg_name = __DECONST(void *, uap->to);
803 msg.msg_namelen = uap->tolen;
811 aiov.iov_base = __DECONST(void *, uap->buf);
812 aiov.iov_len = uap->len;
813 return (sendit(td, uap->s, &msg, uap->flags));
818 osend(struct thread *td, struct osend_args *uap)
827 aiov.iov_base = __DECONST(void *, uap->buf);
828 aiov.iov_len = uap->len;
831 return (sendit(td, uap->s, &msg, uap->flags));
835 osendmsg(struct thread *td, struct osendmsg_args *uap)
841 error = copyin(uap->msg, &msg, sizeof (struct omsghdr));
849 error = sendit(td, uap->s, &msg, uap->flags);
856 sys_sendmsg(struct thread *td, struct sendmsg_args *uap)
862 error = copyin(uap->msg, &msg, sizeof (msg));
873 error = sendit(td, uap->s, &msg, uap->flags);
1081 sys_recvfrom(struct thread *td, struct recvfrom_args *uap)
1083 return (kern_recvfrom(td, uap->s, uap->buf, uap->len,
1084 uap->flags, uap->from, uap->fromlenaddr));
1090 orecvfrom(struct thread *td, struct orecvfrom_args *uap)
1092 return (kern_recvfrom(td, uap->s, uap->buf, uap->len,
1093 uap->flags | MSG_COMPAT, uap->from, uap->fromlenaddr));
1099 orecv(struct thread *td, struct orecv_args *uap)
1108 aiov.iov_base = uap->buf;
1109 aiov.iov_len = uap->len;
1111 msg.msg_flags = uap->flags;
1112 return (recvit(td, uap->s, &msg, NULL));
1121 orecvmsg(struct thread *td, struct orecvmsg_args *uap)
1127 error = copyin(uap->msg, &msg, sizeof (struct omsghdr));
1133 msg.msg_flags = uap->flags | MSG_COMPAT;
1135 error = recvit(td, uap->s, &msg, &uap->msg->msg_namelen);
1138 &uap->msg->msg_accrightslen, sizeof (int));
1145 sys_recvmsg(struct thread *td, struct recvmsg_args *uap)
1151 error = copyin(uap->msg, &msg, sizeof (msg));
1157 msg.msg_flags = uap->flags;
1164 error = recvit(td, uap->s, &msg, NULL);
1167 error = copyout(&msg, uap->msg, sizeof(msg));
1174 sys_shutdown(struct thread *td, struct shutdown_args *uap)
1177 return (kern_shutdown(td, uap->s, uap->how));
1210 sys_setsockopt(struct thread *td, struct setsockopt_args *uap)
1213 return (kern_setsockopt(td, uap->s, uap->level, uap->name,
1214 uap->val, UIO_USERSPACE, uap->valsize));
1261 sys_getsockopt(struct thread *td, struct getsockopt_args *uap)
1266 if (uap->val) {
1267 error = copyin(uap->avalsize, &valsize, sizeof (valsize));
1272 error = kern_getsockopt(td, uap->s, uap->level, uap->name,
1273 uap->val, UIO_USERSPACE, &valsize);
1276 error = copyout(&valsize, uap->avalsize, sizeof (valsize));
1378 sys_getsockname(struct thread *td, struct getsockname_args *uap)
1380 return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, false));
1385 ogetsockname(struct thread *td, struct ogetsockname_args *uap)
1387 return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, true));
1447 sys_getpeername(struct thread *td, struct getpeername_args *uap)
1449 return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, false));
1454 ogetpeername(struct thread *td, struct ogetpeername_args *uap)
1456 return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, true));