Home
last modified time | relevance | path

Searched refs:cmsg (Results 1 – 25 of 89) sorted by relevance

1234

/external/strace/tests/
Dmsg_control.c67 print_fds(const struct cmsghdr *const cmsg, const size_t cmsg_len) in print_fds() argument
75 int *fdp = (int *) CMSG_DATA(cmsg); in print_fds()
104 struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); in test_scm_rights1() local
107 cmsg->cmsg_len = cmsg_len; in test_scm_rights1()
109 cmsg->cmsg_level = SOL_SOCKET; in test_scm_rights1()
111 cmsg->cmsg_type = SCM_RIGHTS; in test_scm_rights1()
116 memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); in test_scm_rights1()
118 mh->msg_control = cmsg; in test_scm_rights1()
128 printf(", msg_control=%p", cmsg); in test_scm_rights1()
132 print_fds(cmsg, src_len); in test_scm_rights1()
[all …]
Dscm_rights.c76 struct cmsghdr *cmsg = tail_alloc(cmsg_size); in main() local
77 memset(cmsg, 0, cmsg_size); in main()
78 cmsg->cmsg_level = SOL_SOCKET; in main()
79 cmsg->cmsg_type = SCM_RIGHTS; in main()
80 cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); in main()
81 memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); in main()
83 mh->msg_control = cmsg; in main()
97 cmsg = tail_alloc(cmsg_size); in main()
98 memset(cmsg, 0, cmsg_size); in main()
99 mh->msg_control = cmsg; in main()
/external/strace/tests-m32/
Dmsg_control.c67 print_fds(const struct cmsghdr *const cmsg, const size_t cmsg_len) in print_fds() argument
75 int *fdp = (int *) CMSG_DATA(cmsg); in print_fds()
104 struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); in test_scm_rights1() local
107 cmsg->cmsg_len = cmsg_len; in test_scm_rights1()
109 cmsg->cmsg_level = SOL_SOCKET; in test_scm_rights1()
111 cmsg->cmsg_type = SCM_RIGHTS; in test_scm_rights1()
116 memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); in test_scm_rights1()
118 mh->msg_control = cmsg; in test_scm_rights1()
128 printf(", msg_control=%p", cmsg); in test_scm_rights1()
132 print_fds(cmsg, src_len); in test_scm_rights1()
[all …]
Dscm_rights.c76 struct cmsghdr *cmsg = tail_alloc(cmsg_size); in main() local
77 memset(cmsg, 0, cmsg_size); in main()
78 cmsg->cmsg_level = SOL_SOCKET; in main()
79 cmsg->cmsg_type = SCM_RIGHTS; in main()
80 cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); in main()
81 memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); in main()
83 mh->msg_control = cmsg; in main()
97 cmsg = tail_alloc(cmsg_size); in main()
98 memset(cmsg, 0, cmsg_size); in main()
99 mh->msg_control = cmsg; in main()
/external/strace/tests-mx32/
Dmsg_control.c67 print_fds(const struct cmsghdr *const cmsg, const size_t cmsg_len) in print_fds() argument
75 int *fdp = (int *) CMSG_DATA(cmsg); in print_fds()
104 struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); in test_scm_rights1() local
107 cmsg->cmsg_len = cmsg_len; in test_scm_rights1()
109 cmsg->cmsg_level = SOL_SOCKET; in test_scm_rights1()
111 cmsg->cmsg_type = SCM_RIGHTS; in test_scm_rights1()
116 memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); in test_scm_rights1()
118 mh->msg_control = cmsg; in test_scm_rights1()
128 printf(", msg_control=%p", cmsg); in test_scm_rights1()
132 print_fds(cmsg, src_len); in test_scm_rights1()
[all …]
Dscm_rights.c76 struct cmsghdr *cmsg = tail_alloc(cmsg_size); in main() local
77 memset(cmsg, 0, cmsg_size); in main()
78 cmsg->cmsg_level = SOL_SOCKET; in main()
79 cmsg->cmsg_type = SCM_RIGHTS; in main()
80 cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); in main()
81 memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); in main()
83 mh->msg_control = cmsg; in main()
97 cmsg = tail_alloc(cmsg_size); in main()
98 memset(cmsg, 0, cmsg_size); in main()
99 mh->msg_control = cmsg; in main()
/external/compiler-rt/test/msan/Linux/
Dcmsghdr.cc51 struct cmsghdr *cmsg = (struct cmsghdr *)&controlbuf; in main() local
52 assert(cmsg); in main()
59 cmsg->cmsg_level = SOL_SOCKET; in main()
60 cmsg->cmsg_type = SCM_RIGHTS; in main()
61 cmsg->cmsg_len = CMSG_LEN(kNumFds * sizeof(int)); in main()
62 memcpy(CMSG_DATA(cmsg), myfds, kNumFds * sizeof(int)); in main()
64 __msan_poison(&cmsg->cmsg_level, sizeof(cmsg->cmsg_level)); in main()
67 __msan_poison(&cmsg->cmsg_type, sizeof(cmsg->cmsg_type)); in main()
70 __msan_poison(&cmsg->cmsg_len, sizeof(cmsg->cmsg_len)); in main()
73 cmsg = (struct cmsghdr *)(&controlbuf[CMSG_SPACE(kNumFds * sizeof(int))]); in main()
[all …]
/external/valgrind/none/tests/
Dfdleak_cmsg.c58 struct cmsghdr *cmsg; in server() local
67 cmsg = CMSG_FIRSTHDR(&msg); in server()
68 cmsg->cmsg_level = SOL_SOCKET; in server()
69 cmsg->cmsg_type = SCM_RIGHTS; in server()
70 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * 2); in server()
71 ((int *)CMSG_DATA(cmsg))[0] = fd1; in server()
72 ((int *)CMSG_DATA(cmsg))[1] = fd2; in server()
95 struct cmsghdr *cmsg = &control_un.cm; in client() local
130 cmsg = CMSG_FIRSTHDR(&msg); in client()
131 while (cmsg) { in client()
[all …]
/external/ltp/utils/sctp/lib/
Dsendmsg.c39 struct cmsghdr *cmsg; in sctp_sendmsg() local
53 cmsg = CMSG_FIRSTHDR(&outmsg); in sctp_sendmsg()
54 cmsg->cmsg_level = IPPROTO_SCTP; in sctp_sendmsg()
55 cmsg->cmsg_type = SCTP_SNDRCV; in sctp_sendmsg()
56 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in sctp_sendmsg()
58 outmsg.msg_controllen = cmsg->cmsg_len; in sctp_sendmsg()
59 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in sctp_sendmsg()
90 struct cmsghdr *cmsg; in sctp_send() local
96 cmsg = CMSG_FIRSTHDR(&outmsg); in sctp_send()
97 cmsg->cmsg_level = IPPROTO_SCTP; in sctp_send()
[all …]
Drecvmsg.c63 struct cmsghdr *cmsg = NULL; in sctp_recvmsg() local
89 for (cmsg = CMSG_FIRSTHDR(&inmsg); cmsg != NULL; in sctp_recvmsg()
90 cmsg = CMSG_NXTHDR(&inmsg, cmsg)){ in sctp_recvmsg()
91 if ((IPPROTO_SCTP == cmsg->cmsg_level) && in sctp_recvmsg()
92 (SCTP_SNDRCV == cmsg->cmsg_type)) in sctp_recvmsg()
97 if (cmsg) in sctp_recvmsg()
98 memcpy(sinfo, CMSG_DATA(cmsg), sizeof(struct sctp_sndrcvinfo)); in sctp_recvmsg()
/external/libmojo/mojo/edk/embedder/
Dplatform_channel_utils_posix.cc104 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in PlatformChannelSendmsgWithHandles() local
105 cmsg->cmsg_level = SOL_SOCKET; in PlatformChannelSendmsgWithHandles()
106 cmsg->cmsg_type = SCM_RIGHTS; in PlatformChannelSendmsgWithHandles()
107 cmsg->cmsg_len = CMSG_LEN(num_platform_handles * sizeof(int)); in PlatformChannelSendmsgWithHandles()
110 reinterpret_cast<int*>(CMSG_DATA(cmsg))[i] = platform_handles[i].handle; in PlatformChannelSendmsgWithHandles()
131 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in PlatformChannelSendHandles() local
132 cmsg->cmsg_level = SOL_SOCKET; in PlatformChannelSendHandles()
133 cmsg->cmsg_type = SCM_RIGHTS; in PlatformChannelSendHandles()
134 cmsg->cmsg_len = CMSG_LEN(num_handles * sizeof(int)); in PlatformChannelSendHandles()
137 reinterpret_cast<int*>(CMSG_DATA(cmsg))[i] = handles[i].handle; in PlatformChannelSendHandles()
[all …]
/external/libchrome/base/posix/
Dunix_domain_socket_linux.cc64 struct cmsghdr* cmsg; in SendMsg() local
67 cmsg = CMSG_FIRSTHDR(&msg); in SendMsg()
68 cmsg->cmsg_level = SOL_SOCKET; in SendMsg()
69 cmsg->cmsg_type = SCM_RIGHTS; in SendMsg()
70 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); in SendMsg()
71 memcpy(CMSG_DATA(cmsg), &fds[0], sizeof(int) * fds.size()); in SendMsg()
72 msg.msg_controllen = cmsg->cmsg_len; in SendMsg()
138 struct cmsghdr* cmsg; in RecvMsgWithFlags() local
139 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in RecvMsgWithFlags()
140 const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0); in RecvMsgWithFlags()
[all …]
/external/python/cpython2/Modules/_multiprocessing/
Dmultiprocessing.c109 struct cmsghdr *cmsg; in multiprocessing_sendfd() local
127 cmsg = CMSG_FIRSTHDR(&msg); in multiprocessing_sendfd()
128 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in multiprocessing_sendfd()
129 cmsg->cmsg_level = SOL_SOCKET; in multiprocessing_sendfd()
130 cmsg->cmsg_type = SCM_RIGHTS; in multiprocessing_sendfd()
131 * (int *) CMSG_DATA(cmsg) = fd; in multiprocessing_sendfd()
149 struct cmsghdr *cmsg; in multiprocessing_recvfd() local
167 cmsg = CMSG_FIRSTHDR(&msg); in multiprocessing_recvfd()
168 cmsg->cmsg_level = SOL_SOCKET; in multiprocessing_recvfd()
169 cmsg->cmsg_type = SCM_RIGHTS; in multiprocessing_recvfd()
[all …]
/external/openssh/
Dmonitor_fdpass.c61 struct cmsghdr *cmsg; in mm_send_fd() local
76 cmsg = CMSG_FIRSTHDR(&msg); in mm_send_fd()
77 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in mm_send_fd()
78 cmsg->cmsg_level = SOL_SOCKET; in mm_send_fd()
79 cmsg->cmsg_type = SCM_RIGHTS; in mm_send_fd()
80 *(int *)CMSG_DATA(cmsg) = fd; in mm_send_fd()
122 struct cmsghdr *cmsg; in mm_receive_fd() local
167 cmsg = CMSG_FIRSTHDR(&msg); in mm_receive_fd()
168 if (cmsg == NULL) { in mm_receive_fd()
174 if (cmsg->cmsg_type != SCM_RIGHTS) { in mm_receive_fd()
[all …]
/external/iproute2/include/
Dbpf_scm.h39 struct cmsghdr *cmsg; in bpf_map_set_init() local
54 cmsg = CMSG_FIRSTHDR(&msg->hdr); in bpf_map_set_init()
55 cmsg->cmsg_len = msg->hdr.msg_controllen; in bpf_map_set_init()
56 cmsg->cmsg_level = SOL_SOCKET; in bpf_map_set_init()
57 cmsg->cmsg_type = SCM_RIGHTS; in bpf_map_set_init()
59 return (int *)CMSG_DATA(cmsg); in bpf_map_set_init()
65 struct cmsghdr *cmsg; in bpf_map_set_init_single() local
71 cmsg = CMSG_FIRSTHDR(&msg->hdr); in bpf_map_set_init_single()
72 cmsg->cmsg_len = msg->hdr.msg_controllen; in bpf_map_set_init_single()
/external/ltp/utils/sctp/testlib/
Dsctputil.c99 struct cmsghdr *cmsg; in test_print_message() local
105 for (cmsg = CMSG_FIRSTHDR(msg); in test_print_message()
106 cmsg != NULL; in test_print_message()
107 cmsg = CMSG_NXTHDR(msg, cmsg)) { in test_print_message()
108 data = (sctp_cmsg_data_t *)CMSG_DATA(cmsg); in test_print_message()
109 test_print_cmsg(cmsg->cmsg_type, data); in test_print_message()
279 struct cmsghdr *cmsg = NULL; in test_check_msg_data() local
283 for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; in test_check_msg_data()
284 cmsg = CMSG_NXTHDR(msg, cmsg)){ in test_check_msg_data()
285 if (IPPROTO_SCTP == cmsg->cmsg_level && in test_check_msg_data()
[all …]
/external/ltp/utils/sctp/func_tests/
Dtest_assoc_shutdown.c73 struct cmsghdr *cmsg; in main() local
125 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
126 cmsg->cmsg_level = IPPROTO_SCTP; in main()
127 cmsg->cmsg_type = SCTP_SNDRCV; in main()
128 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in main()
129 outmessage.msg_controllen = cmsg->cmsg_len; in main()
130 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in main()
189 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
190 cmsg->cmsg_level = IPPROTO_SCTP; in main()
191 cmsg->cmsg_type = SCTP_SNDRCV; in main()
[all …]
Dtest_assoc_abort.c74 struct cmsghdr *cmsg; in main() local
125 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
126 cmsg->cmsg_level = IPPROTO_SCTP; in main()
127 cmsg->cmsg_type = SCTP_SNDRCV; in main()
128 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in main()
129 outmessage.msg_controllen = cmsg->cmsg_len; in main()
130 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in main()
188 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
189 cmsg->cmsg_level = IPPROTO_SCTP; in main()
190 cmsg->cmsg_type = SCTP_SNDRCV; in main()
[all …]
Dtest_inaddr_any.c73 struct cmsghdr *cmsg; in main() local
157 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
158 cmsg->cmsg_level = IPPROTO_SCTP; in main()
159 cmsg->cmsg_type = SCTP_SNDRCV; in main()
160 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in main()
161 outmessage.msg_controllen = cmsg->cmsg_len; in main()
162 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in main()
205 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
206 cmsg->cmsg_level = IPPROTO_SCTP; in main()
207 cmsg->cmsg_type = SCTP_SNDRCV; in main()
[all …]
Dtest_1_to_1_sendmsg.c82 struct cmsghdr *cmsg; in main() local
135 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
136 cmsg->cmsg_level = IPPROTO_SCTP; in main()
137 cmsg->cmsg_type = SCTP_SNDRCV; in main()
138 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in main()
139 outmessage.msg_controllen = cmsg->cmsg_len; in main()
140 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in main()
293 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
294 cmsg->cmsg_level = IPPROTO_SCTP; in main()
295 cmsg->cmsg_type = SCTP_SNDRCV; in main()
[all …]
Dtest_timetolive.c100 struct cmsghdr *cmsg; in main() local
199 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
200 cmsg->cmsg_level = IPPROTO_SCTP; in main()
201 cmsg->cmsg_type = SCTP_SNDRCV; in main()
202 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in main()
203 outmessage.msg_controllen = cmsg->cmsg_len; in main()
204 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in main()
273 cmsg = CMSG_FIRSTHDR(&outmessage); in main()
274 cmsg->cmsg_level = IPPROTO_SCTP; in main()
275 cmsg->cmsg_type = SCTP_SNDRCV; in main()
[all …]
Dtest_1_to_1_threads.c93 struct cmsghdr *cmsg; in t_send() local
106 cmsg = CMSG_FIRSTHDR(&outmessage); in t_send()
107 cmsg->cmsg_level = IPPROTO_SCTP; in t_send()
108 cmsg->cmsg_type = SCTP_SNDRCV; in t_send()
109 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in t_send()
110 outmessage.msg_controllen = cmsg->cmsg_len; in t_send()
112 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); in t_send()
/external/linux-kselftest/tools/testing/selftests/networking/timestamping/
Dtimestamping.c159 struct cmsghdr *cmsg; in printpacket() local
172 for (cmsg = CMSG_FIRSTHDR(msg); in printpacket()
173 cmsg; in printpacket()
174 cmsg = CMSG_NXTHDR(msg, cmsg)) { in printpacket()
175 printf(" cmsg len %zu: ", cmsg->cmsg_len); in printpacket()
176 switch (cmsg->cmsg_level) { in printpacket()
179 switch (cmsg->cmsg_type) { in printpacket()
182 (struct timeval *)CMSG_DATA(cmsg); in printpacket()
190 (struct timespec *)CMSG_DATA(cmsg); in printpacket()
198 (struct timespec *)CMSG_DATA(cmsg); in printpacket()
[all …]
/external/llvm/bindings/go/llvm/
Dexecutionengine.go93 var cmsg *C.char
94 fail := C.LLVMCreateExecutionEngineForModule(&ee.C, m.C, &cmsg)
97 err = errors.New(C.GoString(cmsg))
98 C.LLVMDisposeMessage(cmsg)
104 var cmsg *C.char
105 fail := C.LLVMCreateInterpreterForModule(&ee.C, m.C, &cmsg)
108 err = errors.New(C.GoString(cmsg))
109 C.LLVMDisposeMessage(cmsg)
121 var cmsg *C.char
122 …Module(&ee.C, m.C, &options.C, C.size_t(unsafe.Sizeof(C.struct_LLVMMCJITCompilerOptions{})), &cmsg)
[all …]
/external/iputils/ninfod/
Dninfod.c292 struct cmsghdr *cmsg; in ni_recv() local
315 for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg; in ni_recv()
316 cmsg = CMSG_NXTHDR(&msgh, cmsg)) { in ni_recv()
317 if (cmsg->cmsg_level == IPPROTO_IPV6 && in ni_recv()
318 (cmsg->cmsg_type == IPV6_PKTINFO in ni_recv()
320 || cmsg->cmsg_type == IPV6_2292PKTINFO in ni_recv()
323 memcpy(&p->pktinfo, CMSG_DATA(cmsg), sizeof(p->pktinfo)); in ni_recv()
337 struct cmsghdr *cmsg; in ni_send() local
357 cmsg = CMSG_FIRSTHDR(&msgh); in ni_send()
358 cmsg->cmsg_level = IPPROTO_IPV6; in ni_send()
[all …]

1234