Lines Matching refs:mh
92 test_scm_rights1(struct msghdr *const mh, in test_scm_rights1() argument
118 mh->msg_control = cmsg; in test_scm_rights1()
119 mh->msg_controllen = msg_controllen; in test_scm_rights1()
121 int rc = sendmsg(-1, mh, 0); in test_scm_rights1()
145 test_scm_rights2(struct msghdr *const mh, in test_scm_rights2() argument
182 mh->msg_control = cmsg[0]; in test_scm_rights2()
183 mh->msg_controllen = msg_controllen; in test_scm_rights2()
185 int rc = sendmsg(-1, mh, 0); in test_scm_rights2()
207 test_scm_rights3(struct msghdr *const mh, void *const page, const size_t nfds) in test_scm_rights3() argument
220 mh->msg_control = cmsg; in test_scm_rights3()
221 mh->msg_controllen = len; in test_scm_rights3()
223 int rc = sendmsg(-1, mh, 0); in test_scm_rights3()
234 test_scm_timestamp(struct msghdr *const mh, void *const page) in test_scm_timestamp() argument
246 mh->msg_control = cmsg; in test_scm_timestamp()
247 mh->msg_controllen = len; in test_scm_timestamp()
249 int rc = sendmsg(-1, mh, 0); in test_scm_timestamp()
266 mh->msg_control = cmsg; in test_scm_timestamp()
267 mh->msg_controllen = len; in test_scm_timestamp()
269 rc = sendmsg(-1, mh, 0); in test_scm_timestamp()
279 test_scm_timestampns(struct msghdr *const mh, void *const page) in test_scm_timestampns() argument
291 mh->msg_control = cmsg; in test_scm_timestampns()
292 mh->msg_controllen = len; in test_scm_timestampns()
294 int rc = sendmsg(-1, mh, 0); in test_scm_timestampns()
311 mh->msg_control = cmsg; in test_scm_timestampns()
312 mh->msg_controllen = len; in test_scm_timestampns()
314 rc = sendmsg(-1, mh, 0); in test_scm_timestampns()
325 test_scm_timestamping(struct msghdr *const mh, void *const page) in test_scm_timestamping() argument
341 mh->msg_control = cmsg; in test_scm_timestamping()
342 mh->msg_controllen = len; in test_scm_timestamping()
344 int rc = sendmsg(-1, mh, 0); in test_scm_timestamping()
366 mh->msg_control = cmsg; in test_scm_timestamping()
367 mh->msg_controllen = len; in test_scm_timestamping()
369 rc = sendmsg(-1, mh, 0); in test_scm_timestamping()
390 test_scm_security(struct msghdr *const mh, in test_scm_security() argument
415 mh->msg_control = cmsg; in test_scm_security()
416 mh->msg_controllen = msg_controllen; in test_scm_security()
418 int rc = sendmsg(-1, mh, 0); in test_scm_security()
437 test_unknown_type(struct msghdr *const mh, in test_unknown_type() argument
449 mh->msg_control = cmsg; in test_unknown_type()
450 mh->msg_controllen = cmsg->cmsg_len; in test_unknown_type()
452 int rc = sendmsg(-1, mh, 0); in test_unknown_type()
458 cmsg_type_str, (unsigned) mh->msg_controllen, rc, errno2name()); in test_unknown_type()
462 test_sol_socket(struct msghdr *const mh, void *const page) in test_sol_socket() argument
477 test_scm_rights1(mh, msg_controllen, in test_sol_socket()
501 test_scm_rights2(mh, msg_controllen, in test_sol_socket()
518 test_scm_security(mh, msg_controllen, in test_sol_socket()
524 test_scm_rights3(mh, page, DEFAULT_STRLEN - 1); in test_sol_socket()
525 test_scm_rights3(mh, page, DEFAULT_STRLEN); in test_sol_socket()
526 test_scm_rights3(mh, page, DEFAULT_STRLEN + 1); in test_sol_socket()
528 test_scm_timestamp(mh, page); in test_sol_socket()
529 test_scm_timestampns(mh, page); in test_sol_socket()
530 test_scm_timestamping(mh, page); in test_sol_socket()
532 test_unknown_type(mh, page, ARG_STR(SOL_SOCKET), "SCM_???"); in test_sol_socket()
536 test_ip_pktinfo(struct msghdr *const mh, void *const page, in test_ip_pktinfo() argument
551 mh->msg_control = cmsg; in test_ip_pktinfo()
552 mh->msg_controllen = len; in test_ip_pktinfo()
554 int rc = sendmsg(-1, mh, 0); in test_ip_pktinfo()
566 test_ip_uint(struct msghdr *const mh, void *const page, in test_ip_uint() argument
579 mh->msg_control = cmsg; in test_ip_uint()
580 mh->msg_controllen = len; in test_ip_uint()
582 int rc = sendmsg(-1, mh, 0); in test_ip_uint()
592 test_ip_uint8_t(struct msghdr *const mh, void *const page, in test_ip_uint8_t() argument
603 mh->msg_control = cmsg; in test_ip_uint8_t()
604 mh->msg_controllen = len; in test_ip_uint8_t()
606 int rc = sendmsg(-1, mh, 0); in test_ip_uint8_t()
634 test_ip_opts(struct msghdr *const mh, void *const page, in test_ip_opts() argument
648 mh->msg_control = cmsg; in test_ip_opts()
649 mh->msg_controllen = len; in test_ip_opts()
651 int rc = sendmsg(-1, mh, 0); in test_ip_opts()
674 test_ip_recverr(struct msghdr *const mh, void *const page, in test_ip_recverr() argument
695 mh->msg_control = cmsg; in test_ip_recverr()
696 mh->msg_controllen = len; in test_ip_recverr()
698 int rc = sendmsg(-1, mh, 0); in test_ip_recverr()
716 test_ip_origdstaddr(struct msghdr *const mh, void *const page, in test_ip_origdstaddr() argument
731 mh->msg_control = cmsg; in test_ip_origdstaddr()
732 mh->msg_controllen = len; in test_ip_origdstaddr()
734 int rc = sendmsg(-1, mh, 0); in test_ip_origdstaddr()
746 test_sol_ip(struct msghdr *const mh, void *const page) in test_sol_ip() argument
748 test_ip_pktinfo(mh, page, ARG_STR(IP_PKTINFO)); in test_sol_ip()
749 test_ip_uint(mh, page, ARG_STR(IP_TTL)); in test_sol_ip()
750 test_ip_uint8_t(mh, page, ARG_STR(IP_TOS)); in test_sol_ip()
751 test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 1); in test_sol_ip()
752 test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 2); in test_sol_ip()
753 test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 3); in test_sol_ip()
754 test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 4); in test_sol_ip()
755 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 5); in test_sol_ip()
756 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 6); in test_sol_ip()
757 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 7); in test_sol_ip()
758 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 8); in test_sol_ip()
759 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN - 1); in test_sol_ip()
760 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN); in test_sol_ip()
761 test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN + 1); in test_sol_ip()
763 test_ip_recverr(mh, page, ARG_STR(IP_RECVERR)); in test_sol_ip()
766 test_ip_origdstaddr(mh, page, ARG_STR(IP_ORIGDSTADDR)); in test_sol_ip()
769 test_ip_uint(mh, page, ARG_STR(IP_CHECKSUM)); in test_sol_ip()
771 test_scm_security(mh, CMSG_LEN(0), page, 0, CMSG_LEN(0), in test_sol_ip()
773 test_unknown_type(mh, page, ARG_STR(SOL_IP), "IP_???"); in test_sol_ip()
777 test_unknown_level(struct msghdr *const mh, void *const page) in test_unknown_level() argument
785 mh->msg_control = cmsg; in test_unknown_level()
786 mh->msg_controllen = cmsg->cmsg_len; in test_unknown_level()
788 int rc = sendmsg(-1, mh, 0); in test_unknown_level()
794 (unsigned) mh->msg_controllen, rc, errno2name()); in test_unknown_level()
798 test_big_len(struct msghdr *const mh) in test_big_len() argument
814 mh->msg_control = cmsg; in test_big_len()
815 mh->msg_controllen = len; in test_big_len()
817 int rc = sendmsg(-1, mh, 0); in test_big_len()
835 TAIL_ALLOC_OBJECT_CONST_PTR(struct msghdr, mh); in main()
836 memset(mh, 0, sizeof(*mh)); in main()
837 test_big_len(mh); in main()
839 rc = sendmsg(-1, mh + 1, 0); in main()
841 mh + 1, rc, errno2name()); in main()
844 mh->msg_control = page; in main()
845 mh->msg_controllen = CMSG_LEN(0); in main()
846 rc = sendmsg(-1, mh, 0); in main()
852 test_sol_socket(mh, page); in main()
853 test_sol_ip(mh, page); in main()
854 test_unknown_level(mh, page); in main()