Home
last modified time | relevance | path

Searched refs:cmsghdr (Results 1 – 25 of 61) sorted by relevance

123

/linux/include/linux/
H A Dsocket.h105 struct cmsghdr { struct
122 ((void *)(cmsg) + sizeof(struct cmsghdr)) argument
124 ((void __user *)(cmsg) + sizeof(struct cmsghdr))
125 #define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))
126 #define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))
128 #define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \
129 (struct cmsghdr *)(ctl) : \
130 (struct cmsghdr *)NULL)
132 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
154 static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, in __cmsg_nxthdr()
[all …]
/linux/tools/perf/trace/beauty/include/linux/
H A Dsocket.h105 struct cmsghdr { struct
122 ((void *)(cmsg) + sizeof(struct cmsghdr)) argument
124 ((void __user *)(cmsg) + sizeof(struct cmsghdr))
125 #define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))
126 #define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))
128 #define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \
129 (struct cmsghdr *)(ctl) : \
130 (struct cmsghdr *)NULL)
132 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
154 static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, in __cmsg_nxthdr()
[all …]
/linux/net/core/
H A Dscm.c67 static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) in scm_fp_copy()
74 num = (cmsg->cmsg_len - sizeof(struct cmsghdr))/sizeof(int); in scm_fp_copy()
151 struct cmsghdr *cmsg; in __scm_send()
238 if (!msg->msg_control || msg->msg_controllen < sizeof(struct cmsghdr)) { in put_cmsg()
248 struct cmsghdr __user *cm = msg->msg_control_user; in put_cmsg()
262 struct cmsghdr *cm = msg->msg_control; in put_cmsg()
315 if (msg->msg_controllen <= sizeof(struct cmsghdr)) in scm_max_fds()
317 return (msg->msg_controllen - sizeof(struct cmsghdr)) / sizeof(int); in scm_max_fds()
322 struct cmsghdr __user *cm = in scm_detach_fds()
323 (__force struct cmsghdr __user *)msg->msg_control_user; in scm_detach_fds()
/linux/tools/testing/selftests/landlock/
H A Dcommon.h165 struct cmsghdr _align; in recv_fd()
178 struct cmsghdr *cmsg; in recv_fd()
199 struct cmsghdr _align; in send_fd()
212 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); in send_fd()
/linux/tools/testing/selftests/net/
H A Dcmsg_sender.c228 struct cmsghdr *cmsg; in ca_write_cmsg_u32()
233 cmsg = (struct cmsghdr *)(cbuf + *cmsg_len); in ca_write_cmsg_u32()
247 struct cmsghdr *cmsg; in cs_write_cmsg()
269 cmsg = (struct cmsghdr *)(cbuf + cmsg_len); in cs_write_cmsg()
280 cmsg = (struct cmsghdr *)(cbuf + cmsg_len); in cs_write_cmsg()
292 cmsg = (struct cmsghdr *)(cbuf + cmsg_len); in cs_write_cmsg()
328 struct cmsghdr *cmsg; in cs_read_cmsg()
H A Dudpgso_bench_tx.c139 static void flush_cmsg(struct cmsghdr *cmsg) in flush_cmsg()
216 struct cmsghdr *cmsg; in flush_errqueue_recv()
314 static void send_ts_cmsg(struct cmsghdr *cm) in send_ts_cmsg()
339 struct cmsghdr *cmsg; in send_udp_sendmmsg()
378 static void send_udp_segment_cmsg(struct cmsghdr *cm) in send_udp_segment_cmsg()
396 struct cmsghdr *cmsg; in send_udp_segment()
H A Dipv6_flowlabel.c75 struct cmsghdr *cm; in do_send()
103 struct cmsghdr *cm; in do_recv()
H A Dmsg_zerocopy.c174 struct cmsghdr *cm; in add_zcopy_cookie()
201 msg->msg_control = (struct cmsghdr *)ckbuf; in do_sendmsg()
366 struct cmsghdr *cmsg; in do_recvmsg_completion()
399 struct cmsghdr *cm; in do_recv_completion()
H A Dnettest.c908 struct cmsghdr *cm; in get_index_from_cmsg()
912 for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(m); in get_index_from_cmsg()
914 cm = (struct cmsghdr *)CMSG_NXTHDR(m, cm)) { in get_index_from_cmsg()
966 struct cmsghdr *cm; in send_msg_cmsg()
978 cm = (struct cmsghdr *)cmsgbuf; in send_msg_cmsg()
1062 struct cmsghdr *cm = (struct cmsghdr *)cmsgbuf; in socket_read_dgram()
H A Dso_txtime.c78 struct cmsghdr *cm; in do_send_one()
164 struct cmsghdr *cm; in do_recv_errqueue_timeout()
H A Dtimestamping.c159 struct cmsghdr *cmsg; in printpacket()
285 struct cmsghdr cm; in recvpacket()
H A Dtcp_inq.c103 struct cmsghdr *cm; in main()
/linux/net/handshake/
H A Dalert.c39 struct cmsghdr *cmsg; in tls_alert_send()
74 u8 tls_get_record_type(const struct sock *sk, const struct cmsghdr *cmsg) in tls_get_record_type()
/linux/net/
H A Dcompat.c143 struct cmsghdr *kcmsg, *kcmsg_base; in cmsghdr_from_user_compat_to_kern()
152 kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf; in cmsghdr_from_user_compat_to_kern()
162 tmp = ((ucmlen - sizeof(*ucmsg)) + sizeof(struct cmsghdr)); in cmsghdr_from_user_compat_to_kern()
189 tmp = ((cmsg.cmsg_len - sizeof(*ucmsg)) + sizeof(struct cmsghdr)); in cmsghdr_from_user_compat_to_kern()
202 kcmsg = (struct cmsghdr *)((char *)kcmsg + tmp); in cmsghdr_from_user_compat_to_kern()
222 if (kcmsg_base != (struct cmsghdr *)stackbuf) in cmsghdr_from_user_compat_to_kern()
/linux/tools/testing/selftests/net/af_unix/
H A Dscm_rights.c205 struct cmsghdr cmsghdr; in __send_fd() member
208 .cmsghdr = { in __send_fd()
/linux/net/sunrpc/
H A Dsvcsock.c156 static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh) in svc_set_cmsg_data()
232 struct cmsghdr *cmsg, int ret) in svc_tcp_sock_process_cmsg()
263 struct cmsghdr cmsg; in svc_tcp_sock_recv_cmsg()
501 struct cmsghdr *cmh) in svc_udp_get_dest_address4()
518 struct cmsghdr *cmh) in svc_udp_get_dest_address6()
540 struct cmsghdr *cmh) in svc_udp_get_dest_address()
569 struct cmsghdr hdr; in svc_udp_recvfrom()
572 struct cmsghdr *cmh = &buffer.hdr; in svc_udp_recvfrom()
692 struct cmsghdr hdr; in svc_udp_sendto()
695 struct cmsghdr *cmh = &buffer.hdr; in svc_udp_sendto()
/linux/include/net/
H A Dhandshake.h45 u8 tls_get_record_type(const struct sock *sk, const struct cmsghdr *msg);
/linux/samples/seccomp/
H A Duser-trap.c35 struct cmsghdr *cmsg; in send_fd()
66 struct cmsghdr *cmsg; in recv_fd()
/linux/tools/testing/vsock/
H A Dmsg_zerocopy_common.c22 struct cmsghdr *cm; in vsock_recv_completion()
/linux/net/rds/
H A Drds.h933 struct cmsghdr *cmsg);
935 struct cmsghdr *cmsg,
938 struct cmsghdr *cmsg);
944 struct cmsghdr *cmsg);
H A Drdma.c612 struct cmsghdr *cmsg, in rds_cmsg_rdma_args()
812 struct cmsghdr *cmsg) in rds_cmsg_rdma_dest()
855 struct cmsghdr *cmsg) in rds_cmsg_rdma_map()
869 struct cmsghdr *cmsg) in rds_cmsg_atomic()
/linux/arch/um/os-Linux/
H A Dfile.c527 struct cmsghdr *cmsg; in os_rcv_fd_msg()
667 struct cmsghdr align; in os_sendmsg_fds()
676 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); in os_sendmsg_fds()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtoken.c150 struct cmsghdr *cmsg; in sendfd()
159 struct cmsghdr align; in sendfd()
185 struct cmsghdr *cmsg; in recvfd()
194 struct cmsghdr align; in recvfd()
H A Dlwt_reroute.c102 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); in overflow_fq()
/linux/Documentation/crypto/
H A Duserspace-if.rst163 struct cmsghdr data structure. See recv(2) and cmsg(3) for more
164 information on how the cmsghdr data structure is used together with the
165 send/recv system call family. That cmsghdr data structure holds the
222 struct cmsghdr data structure. See recv(2) and cmsg(3) for more
223 information on how the cmsghdr data structure is used together with the
224 send/recv system call family. That cmsghdr data structure holds the

123