/external/valgrind/none/tests/ |
D | fdleak_cmsg.c | 58 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/libchrome/base/posix/ |
D | unix_domain_socket_linux.cc | 64 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/avahi/avahi-daemon/ |
D | chroot.c | 116 } cmsg; in send_fd() local 122 memset(&cmsg, 0, sizeof(cmsg)); in send_fd() 132 msg.msg_control = &cmsg; in send_fd() 133 msg.msg_controllen = sizeof(cmsg); in send_fd() 136 cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int)); in send_fd() 137 cmsg.hdr.cmsg_level = SOL_SOCKET; in send_fd() 138 cmsg.hdr.cmsg_type = SCM_RIGHTS; in send_fd() 139 *((int*) CMSG_DATA(&cmsg.hdr)) = payload_fd; in send_fd() 156 } cmsg; in recv_fd() local 162 memset(&cmsg, 0, sizeof(cmsg)); in recv_fd() [all …]
|
/external/avahi/avahi-core/ |
D | socket.c | 482 struct cmsghdr *cmsg; in avahi_send_dns_packet_ipv4() local 485 struct cmsghdr *cmsg; in avahi_send_dns_packet_ipv4() local 520 cmsg = CMSG_FIRSTHDR(&msg); in avahi_send_dns_packet_ipv4() 521 cmsg->cmsg_len = msg.msg_controllen; in avahi_send_dns_packet_ipv4() 522 cmsg->cmsg_level = IPPROTO_IP; in avahi_send_dns_packet_ipv4() 523 cmsg->cmsg_type = IP_PKTINFO; in avahi_send_dns_packet_ipv4() 525 pkti = (struct in_pktinfo*) CMSG_DATA(cmsg); in avahi_send_dns_packet_ipv4() 549 cmsg = CMSG_FIRSTHDR(&msg); in avahi_send_dns_packet_ipv4() 550 cmsg->cmsg_len = msg.msg_controllen; in avahi_send_dns_packet_ipv4() 551 cmsg->cmsg_level = IPPROTO_IP; in avahi_send_dns_packet_ipv4() [all …]
|
D | netlink.c | 49 struct cmsghdr *cmsg; in avahi_netlink_work() local 76 cmsg = CMSG_FIRSTHDR(&smsg); in avahi_netlink_work() 78 if (!cmsg || cmsg->cmsg_type != SCM_CREDENTIALS) { in avahi_netlink_work() 83 cred = (struct ucred*) CMSG_DATA(cmsg); in avahi_netlink_work()
|
/external/iproute2/include/ |
D | bpf_scm.h | 39 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/llvm/bindings/go/llvm/ |
D | executionengine.go | 93 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 …]
|
D | analysis.go | 38 var cmsg *C.char 39 broken := C.LLVMVerifyModule(m.C, C.LLVMVerifierFailureAction(a), &cmsg) 44 err := errors.New(C.GoString(cmsg)) 45 C.LLVMDisposeMessage(cmsg)
|
D | target.go | 135 cmsg := C.LLVMCopyStringRepOfTargetData(td.C) 136 s = C.GoString(cmsg) 137 C.LLVMDisposeMessage(cmsg)
|
/external/iputils/ninfod/ |
D | ninfod.c | 292 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/libpcap/ |
D | pcap-bt-monitor-linux.c | 69 struct cmsghdr *cmsg; in bt_monitor_read() local 109 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in bt_monitor_read() 110 if (cmsg->cmsg_level != SOL_SOCKET) continue; in bt_monitor_read() 112 if (cmsg->cmsg_type == SCM_TIMESTAMP) { in bt_monitor_read() 113 memcpy(&pkth.ts, CMSG_DATA(cmsg), sizeof(pkth.ts)); in bt_monitor_read()
|
D | pcap-bt-linux.c | 302 struct cmsghdr *cmsg; in bt_read_linux() local 338 cmsg = CMSG_FIRSTHDR(&msg); in bt_read_linux() 340 while (cmsg) { in bt_read_linux() 341 switch (cmsg->cmsg_type) { in bt_read_linux() 343 memcpy(&in, CMSG_DATA(cmsg), sizeof in); in bt_read_linux() 346 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux() 350 cmsg = CMSG_NXTHDR(&msg, cmsg); in bt_read_linux()
|
/external/iputils/ |
D | tracepath6.c | 109 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 …]
|
D | tracepath.c | 96 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()
|
D | ping.c | 109 } 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 …]
|
D | ping6.c | 202 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 …]
|
D | traceroute6.c | 702 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/libnl/lib/ |
D | nl.c | 257 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/strace/tests/ |
D | scm_rights.c | 69 struct cmsghdr cmsg; in main() member 73 control.cmsg.cmsg_level = SOL_SOCKET; in main() 74 control.cmsg.cmsg_type = SCM_RIGHTS; in main() 75 control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds)); in main() 76 memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds)); in main()
|
/external/compiler-rt/lib/tsan/rtl/ |
D | tsan_platform_linux.cc | 331 struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); in ExtractRecvmsgFDs() local 332 for (; cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in ExtractRecvmsgFDs() 333 if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) in ExtractRecvmsgFDs() 335 int n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(fds[0]); in ExtractRecvmsgFDs() 337 fds[res++] = ((int*)CMSG_DATA(cmsg))[i]; in ExtractRecvmsgFDs()
|
/external/iproute2/examples/bpf/ |
D | bpf_agent.c | 176 struct cmsghdr *cmsg; in bpf_map_set_recv() local 187 cmsg = CMSG_FIRSTHDR(&msg.hdr); in bpf_map_set_recv() 188 if (!cmsg || cmsg->cmsg_type != SCM_RIGHTS) in bpf_map_set_recv() 193 min_fd = (cmsg->cmsg_len - sizeof(*cmsg)) / sizeof(fd); in bpf_map_set_recv()
|
/external/google-breakpad/src/client/linux/crash_generation/ |
D | crash_generation_client.cc | 64 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/ |
D | repeated_composite_container.cc | 233 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 …]
|
D | message.cc | 133 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 …]
|
/external/iproute2/lib/ |
D | libnetlink.c | 497 struct cmsghdr *cmsg; in rtnl_listen() local 523 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; in rtnl_listen() 524 cmsg = CMSG_NXTHDR(&msg, cmsg)) in rtnl_listen() 525 if (cmsg->cmsg_level == SOL_NETLINK && in rtnl_listen() 526 cmsg->cmsg_type == NETLINK_LISTEN_ALL_NSID && in rtnl_listen() 527 cmsg->cmsg_len == CMSG_LEN(sizeof(int))) { in rtnl_listen() 528 int *data = (int *)CMSG_DATA(cmsg); in rtnl_listen()
|