Home
last modified time | relevance | path

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

12

/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/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()
123 struct cmsghdr *cmsg; in mm_receive_fd() local
169 cmsg = CMSG_FIRSTHDR(&msg); in mm_receive_fd()
170 if (cmsg == NULL) { in mm_receive_fd()
176 if (cmsg->cmsg_type != SCM_RIGHTS) { in mm_receive_fd()
[all …]
Ddefines.h535 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr))) argument
/external/llvm/bindings/go/llvm/
Dexecutionengine.go92 var cmsg *C.char
93 fail := C.LLVMCreateExecutionEngineForModule(&ee.C, m.C, &cmsg)
96 err = errors.New(C.GoString(cmsg))
97 C.LLVMDisposeMessage(cmsg)
103 var cmsg *C.char
104 fail := C.LLVMCreateInterpreterForModule(&ee.C, m.C, &cmsg)
107 err = errors.New(C.GoString(cmsg))
108 C.LLVMDisposeMessage(cmsg)
120 var cmsg *C.char
121 …Module(&ee.C, m.C, &options.C, C.size_t(unsafe.Sizeof(C.struct_LLVMMCJITCompilerOptions{})), &cmsg)
[all …]
Dlinker.go24 var cmsg *C.char
25 failed := C.LLVMLinkModules(Dest.C, Src.C, C.LLVMLinkerDestroySource, &cmsg)
27 err := errors.New(C.GoString(cmsg))
28 C.LLVMDisposeMessage(cmsg)
Danalysis.go37 var cmsg *C.char
38 broken := C.LLVMVerifyModule(m.C, C.LLVMVerifierFailureAction(a), &cmsg)
43 err := errors.New(C.GoString(cmsg))
44 C.LLVMDisposeMessage(cmsg)
Dtarget.go134 cmsg := C.LLVMCopyStringRepOfTargetData(td.C)
135 s = C.GoString(cmsg)
136 C.LLVMDisposeMessage(cmsg)
/external/dhcpcd/
Dlpf.c178 struct cmsghdr *cmsg; in get_raw_packet() local
200 for (cmsg = CMSG_FIRSTHDR(&msg); in get_raw_packet()
201 cmsg; in get_raw_packet()
202 cmsg = CMSG_NXTHDR(&msg, cmsg)) in get_raw_packet()
204 if (cmsg->cmsg_level == SOL_PACKET && in get_raw_packet()
205 cmsg->cmsg_type == PACKET_AUXDATA) { in get_raw_packet()
206 aux = (void *)CMSG_DATA(cmsg); in get_raw_packet()
/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 …]
/external/libnl/lib/
Dnl.c257 struct cmsghdr *cmsg; in nl_send_iovec() local
262 cmsg = CMSG_FIRSTHDR(&hdr); in nl_send_iovec()
263 cmsg->cmsg_level = SOL_SOCKET; in nl_send_iovec()
264 cmsg->cmsg_type = SCM_CREDENTIALS; in nl_send_iovec()
265 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred)); in nl_send_iovec()
266 memcpy(CMSG_DATA(cmsg), creds, sizeof(struct ucred)); in nl_send_iovec()
415 struct cmsghdr *cmsg; in nl_recv() local
472 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in nl_recv()
473 if (cmsg->cmsg_level == SOL_SOCKET && in nl_recv()
474 cmsg->cmsg_type == SCM_CREDENTIALS) { in nl_recv()
[all …]
/external/iputils/
Dtracepath6.c109 struct cmsghdr *cmsg; in recverr() local
172 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in recverr()
173 switch (cmsg->cmsg_level) { in recverr()
175 switch(cmsg->cmsg_type) { in recverr()
177 e = (struct sock_extended_err *)CMSG_DATA(cmsg); in recverr()
183 memcpy(&rethops, CMSG_DATA(cmsg), sizeof(rethops)); in recverr()
186 printf("cmsg6:%d\n ", cmsg->cmsg_type); in recverr()
190 switch(cmsg->cmsg_type) { in recverr()
192 e = (struct sock_extended_err *)CMSG_DATA(cmsg); in recverr()
195 rethops = *(__u8*)CMSG_DATA(cmsg); in recverr()
[all …]
Dtracepath.c96 struct cmsghdr *cmsg; in recverr() local
149 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in recverr()
150 if (cmsg->cmsg_level == SOL_IP) { in recverr()
151 if (cmsg->cmsg_type == IP_RECVERR) { in recverr()
152 e = (struct sock_extended_err *) CMSG_DATA(cmsg); in recverr()
153 } else if (cmsg->cmsg_type == IP_TTL) { in recverr()
154 memcpy(&rethops, CMSG_DATA(cmsg), sizeof(rethops)); in recverr()
156 printf("cmsg:%d\n ", cmsg->cmsg_type); in recverr()
Dping.c109 } cmsg = { {sizeof(struct cmsghdr) + sizeof(struct in_pktinfo), SOL_IP, IP_PKTINFO}, variable
438 cmsg.ipi.ipi_ifindex = ifr.ifr_ifindex; in main()
439 cmsg_len = sizeof(cmsg); in main()
614 struct cmsghdr *cmsg; in receive_error_msg() local
637 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in receive_error_msg()
638 if (cmsg->cmsg_level == SOL_IP) { in receive_error_msg()
639 if (cmsg->cmsg_type == IP_RECVERR) in receive_error_msg()
640 e = (struct sock_extended_err *)CMSG_DATA(cmsg); in receive_error_msg()
758 &iov, 1, &cmsg, 0, 0 }; in send_probe()
791 struct cmsghdr *cmsg; in parse_reply() local
[all …]
Dping6.c202 struct cmsghdr *cmsg; in inet6_srcrt_init() local
208 cmsg = (struct cmsghdr *) bp; in inet6_srcrt_init()
210 cmsg->cmsg_len = sizeof(struct cmsghdr) + sizeof(struct ip6_rthdr0); in inet6_srcrt_init()
211 cmsg->cmsg_level = SOL_IPV6; in inet6_srcrt_init()
212 cmsg->cmsg_type = IPV6_RTHDR; in inet6_srcrt_init()
214 return cmsg; in inet6_srcrt_init()
217 int inet6_srcrt_add(struct cmsghdr *cmsg, const struct in6_addr *addr) in inet6_srcrt_add() argument
221 hdr = (struct ip6_rthdr0 *) CMSG_DATA(cmsg); in inet6_srcrt_add()
223 cmsg->cmsg_len += sizeof(struct in6_addr); in inet6_srcrt_add()
1043 struct cmsghdr *cmsg; in main() local
[all …]
Dtraceroute6.c702 struct cmsghdr *cmsg; local
705 for (cmsg = CMSG_FIRSTHDR(&msg);
706 cmsg;
707 cmsg = CMSG_NXTHDR(&msg, cmsg)) {
708 if (cmsg->cmsg_level != SOL_IPV6)
710 switch (cmsg->cmsg_type) {
715 ipi = (struct in6_pktinfo *)CMSG_DATA(cmsg);
/external/strace/tests/
Dscm_rights.c42 struct cmsghdr cmsg; in main() member
46 control.cmsg.cmsg_level = SOL_SOCKET; in main()
47 control.cmsg.cmsg_type = SCM_RIGHTS; in main()
48 control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds)); in main()
49 memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds)); in main()
/external/libpcap/
Dpcap-bt-linux.c306 struct cmsghdr *cmsg; in bt_read_linux() local
342 cmsg = CMSG_FIRSTHDR(&msg); in bt_read_linux()
344 while (cmsg) { in bt_read_linux()
345 switch (cmsg->cmsg_type) { in bt_read_linux()
347 memcpy(&in, CMSG_DATA(cmsg), sizeof in); in bt_read_linux()
350 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux()
354 cmsg = CMSG_NXTHDR(&msg, cmsg); in bt_read_linux()
/external/compiler-rt/lib/tsan/rtl/
Dtsan_platform_linux.cc384 struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); in ExtractRecvmsgFDs() local
385 for (; cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in ExtractRecvmsgFDs()
386 if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) in ExtractRecvmsgFDs()
388 int n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(fds[0]); in ExtractRecvmsgFDs()
390 fds[res++] = ((int*)CMSG_DATA(cmsg))[i]; in ExtractRecvmsgFDs()
/external/google-breakpad/src/client/linux/crash_generation/
Dcrash_generation_client.cc64 char cmsg[kControlMsgSize] = ""; in RequestDump() local
65 msg.msg_control = cmsg; in RequestDump()
66 msg.msg_controllen = sizeof(cmsg); in RequestDump()
/external/protobuf/python/google/protobuf/pyext/
Drepeated_composite_container.cc233 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg.get()); in UpdateChildMessages() local
234 cmsg->owner = self->owner; in UpdateChildMessages()
235 cmsg->message = const_cast<google::protobuf::Message*>(&sub_message); in UpdateChildMessages()
236 cmsg->parent = self->parent; in UpdateChildMessages()
237 if (cmessage::InitAttributes(cmsg, NULL, NULL) < 0) { in UpdateChildMessages()
266 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg); in AddToAttached() local
268 cmsg->owner = self->owner; in AddToAttached()
269 cmsg->message = sub_message; in AddToAttached()
270 cmsg->parent = self->parent; in AddToAttached()
273 if (cmessage::InitAttributes(cmsg, NULL, kwargs) < 0) { in AddToAttached()
[all …]
Dmessage.cc133 CMessage* cmsg = reinterpret_cast<CMessage*>(child); in VisitCompositeField() local
134 if (visitor.VisitCMessage(cmsg, descriptor) == -1) in VisitCompositeField()
1723 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg); in CheckAndGetInteger() local
1730 cmsg->owner = self->owner; in CheckAndGetInteger()
1731 cmsg->parent = self; in CheckAndGetInteger()
1732 cmsg->parent_field = cfield_descriptor; in CheckAndGetInteger()
1733 cmsg->read_only = !reflection->HasField(*self->message, field_descriptor); in CheckAndGetInteger()
1734 cmsg->message = const_cast<google::protobuf::Message*>(&sub_message); in CheckAndGetInteger()
1736 if (InitAttributes(cmsg, NULL, NULL) < 0) { in CheckAndGetInteger()
1833 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg); in CheckAndGetInteger() local
[all …]
Drepeated_scalar_container.cc273 CMessage* cmsg = reinterpret_cast<CMessage*>(py_cmsg); in Item() local
276 cmsg->owner = self->owner; in Item()
277 cmsg->parent = self->parent; in Item()
278 cmsg->message = const_cast<google::protobuf::Message*>(&msg); in Item()
279 cmsg->read_only = false; in Item()
/external/valgrind/include/vki/
Dvki-darwin.h195 #define VKI_CMSG_DATA(cmsg) CMSG_DATA(cmsg) argument
197 #define VKI_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg) argument
/external/mdnsresponder/mDNSShared/
Ddnssd_clientstub.c687 #define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + (sizeof(struct cmsghdr))) in deliver_request()
696 struct cmsghdr *cmsg; in deliver_request()
721 cmsg = CMSG_FIRSTHDR(&msg); in deliver_request()
722 cmsg->cmsg_len = CMSG_LEN(sizeof(dnssd_sock_t)); in deliver_request()
723 cmsg->cmsg_level = SOL_SOCKET; in deliver_request()
724 cmsg->cmsg_type = SCM_RIGHTS; in deliver_request()
725 *((dnssd_sock_t *)CMSG_DATA(cmsg)) = listenfd; in deliver_request()
736 (long)((char*)CMSG_DATA(cmsg) + 4 - cbuf)); in deliver_request()
/external/strace/
Dnet.c397 struct cmsghdr *cmsg; member
477 u.cmsg->cmsg_len; in printcmsghdr()
482 u.cmsg->cmsg_level; in printcmsghdr()
487 u.cmsg->cmsg_type; in printcmsghdr()

12