Home
last modified time | relevance | path

Searched refs:cmsg_len (Results 1 – 25 of 36) sorted by relevance

12

/Linux-v5.10/net/
Dcompat.c128 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/
Ddatagram.c790 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/
Dscm.c72 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/
Dsocket.h93 __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/
Dsocket.h93 __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/
Dtls.rst139 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/
Dipcsocket.c147 cmsg->cmsg_len = CMSG_LEN(len); in sendtosocket()
200 cmsg->cmsg_len = CMSG_LEN(len); in receivefromsocket()
/Linux-v5.10/samples/seccomp/
Duser-trap.c49 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/
Dcompat.h28 compat_size_t cmsg_len; member
/Linux-v5.10/net/rds/
Drdma.c619 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()
Dsend.c976 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/
Daf_alg.c459 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/
Dip_sockglue.c258 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/
Dipv6_flowlabel.c55 cm->cmsg_len = CMSG_LEN(sizeof(flowlabel)); in do_send()
Dudpgso_bench_tx.c304 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()
Dnettest.c682 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()
Dtxtimestamp.c316 cm && cm->cmsg_len; in __recv_errmsg_cmsg()
631 cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); in do_test()
Dtls.c1117 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()
Dso_txtime.c89 cm->cmsg_len = CMSG_LEN(sizeof(tdeliver)); in do_send_one()
Dtimestamping.c156 printf(" cmsg len %zu: ", cmsg->cmsg_len); in printpacket()
Dudpgso.c475 cm->cmsg_len = CMSG_LEN(sizeof(uint16_t)); in send_one()
Dmsg_zerocopy.c177 cm->cmsg_len = CMSG_LEN(sizeof(cookie)); in add_zcopy_cookie()
/Linux-v5.10/arch/um/os-Linux/
Dfile.c663 cmsg->cmsg_len = CMSG_LEN(fds_size); in os_sendmsg_fds()
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_sock_addr.c1237 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/
Dsvcsock.c166 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()

12