/Linux-v5.10/net/ |
D | compat.c | 128 struct compat_cmsghdr __user *cmsg, int cmsg_len) in cmsg_compat_nxthdr() argument 130 char __user *ptr = (char __user *)cmsg + CMSG_COMPAT_ALIGN(cmsg_len); in cmsg_compat_nxthdr() 157 if (get_user(ucmlen, &ucmsg->cmsg_len)) in cmsghdr_from_user_compat_to_kern() 189 if (!CMSG_COMPAT_OK(cmsg.cmsg_len, ucmsg, kmsg)) in cmsghdr_from_user_compat_to_kern() 191 tmp = ((cmsg.cmsg_len - sizeof(*ucmsg)) + sizeof(struct cmsghdr)); in cmsghdr_from_user_compat_to_kern() 194 kcmsg->cmsg_len = tmp; in cmsghdr_from_user_compat_to_kern() 200 (cmsg.cmsg_len - sizeof(*ucmsg)))) in cmsghdr_from_user_compat_to_kern() 205 ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, cmsg.cmsg_len); in cmsghdr_from_user_compat_to_kern() 270 cmhdr.cmsg_len = cmlen; in put_cmsg_compat() 313 err = put_user(cmlen, &cm->cmsg_len); in scm_detach_fds_compat()
|
/Linux-v5.10/net/ipv6/ |
D | datagram.c | 790 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) { in ip6_datagram_send_ctl() 843 if (cmsg->cmsg_len < CMSG_LEN(4)) { in ip6_datagram_send_ctl() 859 if (opt->hopopt || cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) { in ip6_datagram_send_ctl() 866 if (cmsg->cmsg_len < CMSG_LEN(len)) { in ip6_datagram_send_ctl() 879 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) { in ip6_datagram_send_ctl() 886 if (cmsg->cmsg_len < CMSG_LEN(len)) { in ip6_datagram_send_ctl() 904 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) { in ip6_datagram_send_ctl() 911 if (cmsg->cmsg_len < CMSG_LEN(len)) { in ip6_datagram_send_ctl() 930 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_rt_hdr))) { in ip6_datagram_send_ctl() 954 if (cmsg->cmsg_len < CMSG_LEN(len)) { in ip6_datagram_send_ctl() [all …]
|
/Linux-v5.10/net/core/ |
D | scm.c | 72 num = (cmsg->cmsg_len - sizeof(struct cmsghdr))/sizeof(int); in scm_fp_copy() 167 if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct ucred))) in __scm_send() 235 cmhdr.cmsg_len = cmlen; in put_cmsg() 244 cm->cmsg_len = cmlen; in put_cmsg() 321 err = put_user(cmlen, &cm->cmsg_len); in scm_detach_fds()
|
/Linux-v5.10/include/linux/ |
D | socket.h | 93 __kernel_size_t cmsg_len; /* data byte count, including hdr */ member 119 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \ 120 (cmsg)->cmsg_len <= (unsigned long) \ 146 __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len)); in __cmsg_nxthdr()
|
/Linux-v5.10/tools/perf/trace/beauty/include/linux/ |
D | socket.h | 93 __kernel_size_t cmsg_len; /* data byte count, including hdr */ member 119 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \ 120 (cmsg)->cmsg_len <= (unsigned long) \ 146 __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len)); in __cmsg_nxthdr()
|
/Linux-v5.10/Documentation/networking/ |
D | tls.rst | 139 int cmsg_len = sizeof(record_type); 141 char buf[CMSG_SPACE(cmsg_len)]; 149 cmsg->cmsg_len = CMSG_LEN(cmsg_len); 151 msg.msg_controllen = cmsg->cmsg_len;
|
/Linux-v5.10/tools/testing/selftests/android/ion/ |
D | ipcsocket.c | 147 cmsg->cmsg_len = CMSG_LEN(len); in sendtosocket() 200 cmsg->cmsg_len = CMSG_LEN(len); in receivefromsocket()
|
/Linux-v5.10/samples/seccomp/ |
D | user-trap.c | 49 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in send_fd() 51 msg.msg_controllen = cmsg->cmsg_len; in send_fd()
|
/Linux-v5.10/include/net/ |
D | compat.h | 28 compat_size_t cmsg_len; member
|
/Linux-v5.10/net/rds/ |
D | rdma.c | 619 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_rdma_args)) in rds_cmsg_rdma_args() 813 if (cmsg->cmsg_len < CMSG_LEN(sizeof(rds_rdma_cookie_t)) || in rds_cmsg_rdma_dest() 851 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_get_mr_args)) || in rds_cmsg_rdma_map() 869 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) in rds_cmsg_atomic()
|
D | send.c | 976 if (cmsg->cmsg_len < CMSG_LEN(sizeof(*cookie)) || in rds_cmsg_zcopy() 1091 if (cmsg->cmsg_len < in rds_rdma_bytes()
|
/Linux-v5.10/crypto/ |
D | af_alg.c | 459 if (cmsg->cmsg_len < CMSG_LEN(sizeof(*con->iv))) in af_alg_cmsg_send() 462 if (cmsg->cmsg_len < CMSG_LEN(con->iv->ivlen + in af_alg_cmsg_send() 468 if (cmsg->cmsg_len < CMSG_LEN(sizeof(u32))) in af_alg_cmsg_send() 474 if (cmsg->cmsg_len < CMSG_LEN(sizeof(u32))) in af_alg_cmsg_send()
|
/Linux-v5.10/net/ipv4/ |
D | ip_sockglue.c | 258 if (cmsg->cmsg_len < CMSG_LEN(sizeof(*src_info))) in ip_cmsg_send() 280 err = cmsg->cmsg_len - sizeof(struct cmsghdr); in ip_cmsg_send() 292 if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct in_pktinfo))) in ip_cmsg_send() 301 if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) in ip_cmsg_send() 309 if (cmsg->cmsg_len == CMSG_LEN(sizeof(int))) in ip_cmsg_send() 311 else if (cmsg->cmsg_len == CMSG_LEN(sizeof(u8))) in ip_cmsg_send()
|
/Linux-v5.10/tools/testing/selftests/net/ |
D | ipv6_flowlabel.c | 55 cm->cmsg_len = CMSG_LEN(sizeof(flowlabel)); in do_send()
|
D | udpgso_bench_tx.c | 304 cm->cmsg_len = CMSG_LEN(sizeof(cfg_tx_ts)); in send_ts_cmsg() 368 cm->cmsg_len = CMSG_LEN(sizeof(cfg_gso_size)); in send_udp_segment_cmsg()
|
D | nettest.c | 682 cm->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in send_msg_cmsg() 686 m.msg_controllen = cm->cmsg_len; in send_msg_cmsg() 693 cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); in send_msg_cmsg() 698 m.msg_controllen = cm->cmsg_len; in send_msg_cmsg()
|
D | txtimestamp.c | 316 cm && cm->cmsg_len; in __recv_errmsg_cmsg() 631 cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); in do_test()
|
D | tls.c | 1117 int cmsg_len = sizeof(char); in TEST_F() local 1136 cmsg->cmsg_len = CMSG_LEN(cmsg_len); in TEST_F() 1138 msg.msg_controllen = cmsg->cmsg_len; in TEST_F()
|
D | so_txtime.c | 89 cm->cmsg_len = CMSG_LEN(sizeof(tdeliver)); in do_send_one()
|
D | timestamping.c | 156 printf(" cmsg len %zu: ", cmsg->cmsg_len); in printpacket()
|
D | udpgso.c | 475 cm->cmsg_len = CMSG_LEN(sizeof(uint16_t)); in send_one()
|
D | msg_zerocopy.c | 177 cm->cmsg_len = CMSG_LEN(sizeof(cookie)); in add_zcopy_cookie()
|
/Linux-v5.10/arch/um/os-Linux/ |
D | file.c | 663 cmsg->cmsg_len = CMSG_LEN(fds_size); in os_sendmsg_fds()
|
/Linux-v5.10/tools/testing/selftests/bpf/ |
D | test_sock_addr.c | 1237 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); in init_pktinfo() 1246 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); in init_pktinfo()
|
/Linux-v5.10/net/sunrpc/ |
D | svcsock.c | 166 cmh->cmsg_len = CMSG_LEN(sizeof(*pki)); in svc_set_cmsg_data() 178 cmh->cmsg_len = CMSG_LEN(sizeof(*pki)); in svc_set_cmsg_data()
|