Lines Matching refs:CMSG_LEN
69 size_t nfd = cmsg_len > CMSG_LEN(0) in print_fds()
70 ? (cmsg_len - CMSG_LEN(0)) / sizeof(int) : 0; in print_fds()
99 cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); in test_scm_rights1()
100 if (cmsg_len >= CMSG_LEN(0) in test_scm_rights1()
101 && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) in test_scm_rights1()
115 if (src_len > CMSG_LEN(0)) in test_scm_rights1()
116 memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); in test_scm_rights1()
126 if (msg_controllen < CMSG_LEN(0)) { in test_scm_rights1()
152 cmsg_len[0] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[0]) : CMSG_LEN(0), in test_scm_rights2()
153 cmsg_len[1] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[1]) : CMSG_LEN(0) in test_scm_rights2()
155 if (cmsg_len[0] < CMSG_LEN(0) in test_scm_rights2()
156 || aligned_cms_len[0] + CMSG_LEN(0) > msg_controllen in test_scm_rights2()
157 || aligned_cms_len[0] + aligned_cms_len[1] + CMSG_LEN(0) <= msg_controllen) in test_scm_rights2()
167 if (cmsg_len[0] > CMSG_LEN(0)) in test_scm_rights2()
168 memcpy(CMSG_DATA(cmsg[0]), src[0], cmsg_len[0] - CMSG_LEN(0)); in test_scm_rights2()
179 if (src1_len > CMSG_LEN(0)) in test_scm_rights2()
180 memcpy(CMSG_DATA(cmsg[1]), src[1], src1_len - CMSG_LEN(0)); in test_scm_rights2()
212 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * nfds); in test_scm_rights3()
239 cmsg->cmsg_len = CMSG_LEN(sizeof(struct timeval)); in test_scm_timestamp()
262 cmsg->cmsg_len = CMSG_LEN(sizeof(struct timeval) - sizeof(long)); in test_scm_timestamp()
284 cmsg->cmsg_len = CMSG_LEN(sizeof(struct timespec)); in test_scm_timestampns()
307 cmsg->cmsg_len = CMSG_LEN(sizeof(struct timespec) - sizeof(long)); in test_scm_timestampns()
330 cmsg->cmsg_len = CMSG_LEN(3 * sizeof(struct timespec)); in test_scm_timestamping()
362 cmsg->cmsg_len = CMSG_LEN(3 * sizeof(struct timespec) - sizeof(long)); in test_scm_timestamping()
382 int n = cmsg_len > CMSG_LEN(0) ? cmsg_len - CMSG_LEN(0) : 0; in print_security()
399 cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); in test_scm_security()
400 if (cmsg_len >= CMSG_LEN(0) in test_scm_security()
401 && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) in test_scm_security()
412 if (src_len > CMSG_LEN(0)) in test_scm_security()
413 memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); in test_scm_security()
443 struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); in test_unknown_type()
445 cmsg->cmsg_len = CMSG_LEN(0); in test_unknown_type()
475 cmsg_len <= msg_controllen + CMSG_LEN(0); in test_sol_socket()
485 for (msg_controllen = CMSG_LEN(0) * 2; in test_sol_socket()
491 for (cmsg_len[0] = CMSG_LEN(0); in test_sol_socket()
492 CMSG_ALIGN(cmsg_len[0]) + CMSG_LEN(0) <= msg_controllen in test_sol_socket()
499 cmsg_len[1] <= msg_controllen1 + CMSG_LEN(0); in test_sol_socket()
508 max_msg_controllen = CMSG_SPACE(sizeof(text)) + CMSG_LEN(0) - 1; in test_sol_socket()
509 for (msg_controllen = CMSG_LEN(0); in test_sol_socket()
515 cmsg_len <= msg_controllen + CMSG_LEN(0) in test_sol_socket()
516 && cmsg_len <= CMSG_LEN(sizeof(text)); in test_sol_socket()
542 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in test_ip_pktinfo()
572 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in test_ip_uint()
598 cmsg->cmsg_len = CMSG_LEN(1); in test_ip_uint8_t()
641 cmsg->cmsg_len = CMSG_LEN(opts_len); in test_ip_opts()
680 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sock_ee)); in test_ip_recverr()
722 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sockaddr_in)); in test_ip_origdstaddr()
771 test_scm_security(mh, CMSG_LEN(0), page, 0, CMSG_LEN(0), in test_sol_ip()
779 struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); in test_unknown_level()
781 cmsg->cmsg_len = CMSG_LEN(0); in test_unknown_level()
845 mh->msg_controllen = CMSG_LEN(0); in main()
850 page, (unsigned) CMSG_LEN(0), rc, errno2name()); in main()