Lines Matching refs:message
395 ssize_t SysSendMsg(int s, const struct msghdr *message, int flags) in SysSendMsg() argument
401 CHECK_ASPACE(message, sizeof(struct msghdr)); in SysSendMsg()
402 CPY_FROM_CONST_USER(struct msghdr, message); in SysSendMsg()
404 if (message && message->msg_iovlen > IOV_MAX) { in SysSendMsg()
409 CHECK_FIELD_ASPACE(message, msg_name, message->msg_namelen); in SysSendMsg()
410 CHECK_FIELD_ASPACE(message, msg_iov, message->msg_iovlen * sizeof(struct iovec)); in SysSendMsg()
411 CHECK_FIELD_ASPACE(message, msg_control, message->msg_controllen); in SysSendMsg()
413 DUP_FIELD_FROM_USER(message, msg_iov, message->msg_iovlen * sizeof(struct iovec)); in SysSendMsg()
414 CHECK_ARRAY_FIELD_ASPACE(message, msg_iov, message->msg_iovlen, iov_base, iov_len, in SysSendMsg()
415 FREE_DUP_FIELD(message, msg_iov)); in SysSendMsg()
416 DUP_FIELD_FROM_USER(message, msg_name, message->msg_namelen, in SysSendMsg()
417 FREE_DUP_FIELD(message, msg_iov)); in SysSendMsg()
418 DUP_FIELD_FROM_USER(message, msg_control, message->msg_controllen, in SysSendMsg()
419 FREE_DUP_FIELD(message, msg_iov); in SysSendMsg()
420 FREE_DUP_FIELD(message, msg_name)); in SysSendMsg()
421 DUP_ARRAY_FIELD_FROM_USER(message, msg_iov, message->msg_iovlen, iov_base, iov_len, in SysSendMsg()
422 FREE_DUP_FIELD(message, msg_control); in SysSendMsg()
423 FREE_DUP_FIELD(message, msg_iov); in SysSendMsg()
424 FREE_DUP_FIELD(message, msg_name)); in SysSendMsg()
426 if (message == NULL) { in SysSendMsg()
430 ret = sendmsg(s, message, flags); in SysSendMsg()
432 FREE_DUP_ARRAY_FIELD(message, msg_iov, message->msg_iovlen, iov_base); in SysSendMsg()
433 FREE_DUP_FIELD(message, msg_control); in SysSendMsg()
434 FREE_DUP_FIELD(message, msg_iov); in SysSendMsg()
435 FREE_DUP_FIELD(message, msg_name); in SysSendMsg()
443 ssize_t SysRecvMsg(int s, struct msghdr *message, int flags) in SysRecvMsg() argument
449 CHECK_ASPACE(message, sizeof(struct msghdr)); in SysRecvMsg()
450 CPY_FROM_NONCONST_USER(message); in SysRecvMsg()
452 if (message && message->msg_iovlen > IOV_MAX) { in SysRecvMsg()
457 CHECK_FIELD_ASPACE(message, msg_name, message->msg_namelen); in SysRecvMsg()
458 CHECK_FIELD_ASPACE(message, msg_iov, message->msg_iovlen * sizeof(struct iovec)); in SysRecvMsg()
459 CHECK_FIELD_ASPACE(message, msg_control, message->msg_controllen); in SysRecvMsg()
461 DUP_FIELD_FROM_USER(message, msg_iov, message->msg_iovlen * sizeof(struct iovec)); in SysRecvMsg()
462 CHECK_ARRAY_FIELD_ASPACE(message, msg_iov, message->msg_iovlen, iov_base, iov_len, in SysRecvMsg()
463 FREE_DUP_FIELD(message, msg_iov)); in SysRecvMsg()
464 DUP_FIELD_FROM_USER_NOCOPY(message, msg_name, message->msg_namelen, in SysRecvMsg()
465 FREE_DUP_FIELD(message, msg_iov)); in SysRecvMsg()
466 DUP_FIELD_FROM_USER_NOCOPY(message, msg_control, message->msg_controllen, in SysRecvMsg()
467 FREE_DUP_FIELD(message, msg_iov); in SysRecvMsg()
468 FREE_DUP_FIELD(message, msg_name)); in SysRecvMsg()
469 DUP_ARRAY_FIELD_FROM_USER_NOCOPY(message, msg_iov, message->msg_iovlen, iov_base, iov_len, in SysRecvMsg()
470 FREE_DUP_FIELD(message, msg_control); in SysRecvMsg()
471 FREE_DUP_FIELD(message, msg_iov); in SysRecvMsg()
472 FREE_DUP_FIELD(message, msg_name)); in SysRecvMsg()
474 if (message == NULL) { in SysRecvMsg()
478 ret = recvmsg(s, message, flags); in SysRecvMsg()
484 CPY_TO_USER(message, ret = -1; goto OUT); in SysRecvMsg()
485 DUP_FIELD_TO_USER(message, msg_control, message->msg_controllen, ret = -1; goto OUT); in SysRecvMsg()
486 …DUP_FIELD_TO_USER(message, msg_iov, message->msg_iovlen * sizeof(struct iovec), ret = -1; goto OUT… in SysRecvMsg()
487 DUP_FIELD_TO_USER(message, msg_name, message->msg_namelen, ret = -1; goto OUT); in SysRecvMsg()
488 …DUP_ARRAY_FIELD_TO_USER(message, msg_iov, message->msg_iovlen, iov_base, iov_len, ret = -1; goto O… in SysRecvMsg()
490 FREE_DUP_ARRAY_FIELD(message, msg_iov, message->msg_iovlen, iov_base); in SysRecvMsg()
491 FREE_DUP_FIELD(message, msg_control); in SysRecvMsg()
492 FREE_DUP_FIELD(message, msg_iov); in SysRecvMsg()
493 FREE_DUP_FIELD(message, msg_name); in SysRecvMsg()