Home
last modified time | relevance | path

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

12345

/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/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/libchrome/base/posix/
Dunix_domain_socket.cc84 struct cmsghdr* cmsg; in SendMsg() local
87 cmsg = CMSG_FIRSTHDR(&msg); in SendMsg()
88 cmsg->cmsg_level = SOL_SOCKET; in SendMsg()
89 cmsg->cmsg_type = SCM_RIGHTS; in SendMsg()
90 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); in SendMsg()
91 memcpy(CMSG_DATA(cmsg), &fds[0], sizeof(int) * fds.size()); in SendMsg()
92 msg.msg_controllen = cmsg->cmsg_len; in SendMsg()
169 struct cmsghdr* cmsg; in RecvMsgWithFlags() local
170 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in RecvMsgWithFlags()
171 const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0); in RecvMsgWithFlags()
[all …]
/external/adhd/cras/src/common/
Dcras_util.c102 struct cmsghdr *cmsg; in cras_send_with_fds() local
117 cmsg = CMSG_FIRSTHDR(&msg); in cras_send_with_fds()
118 cmsg->cmsg_level = SOL_SOCKET; in cras_send_with_fds()
119 cmsg->cmsg_type = SCM_RIGHTS; in cras_send_with_fds()
120 cmsg->cmsg_len = CMSG_LEN(sizeof(*fd) * num_fds); in cras_send_with_fds()
121 memcpy(CMSG_DATA(cmsg), fd, sizeof(*fd) * num_fds); in cras_send_with_fds()
133 struct cmsghdr *cmsg; in cras_recv_with_fds() local
157 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; in cras_recv_with_fds()
158 cmsg = CMSG_NXTHDR(&msg, cmsg)) { in cras_recv_with_fds()
159 if (cmsg->cmsg_level == SOL_SOCKET in cras_recv_with_fds()
[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.h40 struct cmsghdr *cmsg; in bpf_map_set_init() local
55 cmsg = CMSG_FIRSTHDR(&msg->hdr); in bpf_map_set_init()
56 cmsg->cmsg_len = msg->hdr.msg_controllen; in bpf_map_set_init()
57 cmsg->cmsg_level = SOL_SOCKET; in bpf_map_set_init()
58 cmsg->cmsg_type = SCM_RIGHTS; in bpf_map_set_init()
60 return (int *)CMSG_DATA(cmsg); in bpf_map_set_init()
66 struct cmsghdr *cmsg; in bpf_map_set_init_single() local
72 cmsg = CMSG_FIRSTHDR(&msg->hdr); in bpf_map_set_init_single()
73 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()
282 struct cmsghdr *cmsg = NULL; in test_check_msg_data() local
286 for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; in test_check_msg_data()
287 cmsg = CMSG_NXTHDR(msg, cmsg)){ in test_check_msg_data()
288 if (IPPROTO_SCTP == cmsg->cmsg_level && in test_check_msg_data()
[all …]
/external/libchrome/mojo/public/cpp/platform/
Dsocket_utils_posix.cc118 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in SendmsgWithHandles() local
119 cmsg->cmsg_level = SOL_SOCKET; in SendmsgWithHandles()
120 cmsg->cmsg_type = SCM_RIGHTS; in SendmsgWithHandles()
121 cmsg->cmsg_len = CMSG_LEN(descriptors.size() * sizeof(int)); in SendmsgWithHandles()
124 reinterpret_cast<int*>(CMSG_DATA(cmsg))[i] = descriptors[i].get(); in SendmsgWithHandles()
152 for (cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); cmsg; in SocketRecvmsg() local
153 cmsg = CMSG_NXTHDR(&msg, cmsg)) { in SocketRecvmsg()
154 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { in SocketRecvmsg()
155 size_t payload_length = cmsg->cmsg_len - CMSG_LEN(0); in SocketRecvmsg()
158 const int* fds = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in SocketRecvmsg()
/external/wayland/src/
Dwayland-os.c94 struct cmsghdr *cmsg; in recvmsg_cloexec_fallback() local
106 cmsg = CMSG_FIRSTHDR(msg); in recvmsg_cloexec_fallback()
107 for (; cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) { in recvmsg_cloexec_fallback()
108 if (cmsg->cmsg_level != SOL_SOCKET || in recvmsg_cloexec_fallback()
109 cmsg->cmsg_type != SCM_RIGHTS) in recvmsg_cloexec_fallback()
112 data = CMSG_DATA(cmsg); in recvmsg_cloexec_fallback()
113 end = (int *)(data + cmsg->cmsg_len - CMSG_LEN(0)); in recvmsg_cloexec_fallback()
/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 …]
/external/linux-kselftest/tools/testing/selftests/android/ion/
Dipcsocket.c110 struct cmsghdr *cmsg; in sendtosocket() local
144 cmsg = CMSG_FIRSTHDR(&msgh); in sendtosocket()
145 cmsg->cmsg_level = SOL_SOCKET; in sendtosocket()
146 cmsg->cmsg_type = SCM_RIGHTS; in sendtosocket()
147 cmsg->cmsg_len = CMSG_LEN(len); in sendtosocket()
148 memcpy(CMSG_DATA(cmsg), &buffd, len); in sendtosocket()
166 struct cmsghdr *cmsg; in receivefromsocket() local
197 cmsg = CMSG_FIRSTHDR(&msgh); in receivefromsocket()
198 cmsg->cmsg_level = SOL_SOCKET; in receivefromsocket()
199 cmsg->cmsg_type = SCM_RIGHTS; in receivefromsocket()
[all …]
/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/swiftshader/third_party/llvm-7.0/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/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 …]

12345