Home
last modified time | relevance | path

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

/system/core/libmemunreachable/
DLeakPipe.cpp38 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in SendFd() local
39 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in SendFd()
40 cmsg->cmsg_level = SOL_SOCKET; in SendFd()
41 cmsg->cmsg_type = SCM_RIGHTS; in SendFd()
43 *(int*)CMSG_DATA(cmsg) = fd; in SendFd()
82 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in ReceiveFd() local
83 if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { in ReceiveFd()
88 return *(int*)CMSG_DATA(cmsg); in ReceiveFd()
/system/core/debuggerd/
Dutil.cpp38 auto cmsg = CMSG_FIRSTHDR(&msg); in send_fd() local
39 cmsg->cmsg_level = SOL_SOCKET; in send_fd()
40 cmsg->cmsg_type = SCM_RIGHTS; in send_fd()
41 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in send_fd()
42 *reinterpret_cast<int*>(CMSG_DATA(cmsg)) = fd.get(); in send_fd()
58 auto cmsg = CMSG_FIRSTHDR(&msg); in recv_fd() local
59 cmsg->cmsg_level = SOL_SOCKET; in recv_fd()
60 cmsg->cmsg_type = SCM_RIGHTS; in recv_fd()
61 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in recv_fd()
71 fd.reset(*reinterpret_cast<int*>(CMSG_DATA(cmsg))); in recv_fd()
/system/core/logd/
DLogListener.cpp65 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in onDataAvailable() local
66 while (cmsg != NULL) { in onDataAvailable()
67 if (cmsg->cmsg_level == SOL_SOCKET && in onDataAvailable()
68 cmsg->cmsg_type == SCM_CREDENTIALS) { in onDataAvailable()
69 cred = (struct ucred*)CMSG_DATA(cmsg); in onDataAvailable()
72 cmsg = CMSG_NXTHDR(&hdr, cmsg); in onDataAvailable()
/system/core/libion/
Dion_test.c135 struct cmsghdr *cmsg; in ion_share_test() local
149 cmsg = CMSG_FIRSTHDR(&msg); in ion_share_test()
150 cmsg->cmsg_level = SOL_SOCKET; in ion_share_test()
151 cmsg->cmsg_type = SCM_RIGHTS; in ion_share_test()
152 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ion_share_test()
153 *(int *)CMSG_DATA(cmsg) = share_fd; in ion_share_test()
170 struct cmsghdr *cmsg; in ion_share_test() local
189 cmsg = CMSG_FIRSTHDR(&child_msg); in ion_share_test()
190 if (cmsg == NULL) { in ion_share_test()
194 recv_fd = *(int*)CMSG_DATA(cmsg); in ion_share_test()
/system/netd/client/
DFwmarkClient.cpp90 char cmsg[CMSG_SPACE(sizeof(fd))]; in send() member
94 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in send()
95 message.msg_control = cmsgu.cmsg; in send()
96 message.msg_controllen = sizeof(cmsgu.cmsg); in send()
/system/core/libcutils/
Duevent.c73 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&hdr); in uevent_kernel_recv() local
74 if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { in uevent_kernel_recv()
79 struct ucred *cred = (struct ucred *)CMSG_DATA(cmsg); in uevent_kernel_recv()
/system/bt/btif/src/
Dbtif_sock_util.cc99 struct cmsghdr* cmsg; in sock_send_fd() local
107 cmsg = CMSG_FIRSTHDR(&msg); in sock_send_fd()
108 cmsg->cmsg_level = SOL_SOCKET; in sock_send_fd()
109 cmsg->cmsg_type = SCM_RIGHTS; in sock_send_fd()
110 cmsg->cmsg_len = CMSG_LEN(sizeof send_fd); in sock_send_fd()
111 memcpy(CMSG_DATA(cmsg), &send_fd, sizeof send_fd); in sock_send_fd()
/system/netd/server/
DFwmarkServer.cpp73 char cmsg[CMSG_SPACE(sizeof(*socketFd))]; in processClient() member
76 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in processClient()
77 message.msg_control = cmsgu.cmsg; in processClient()
78 message.msg_controllen = sizeof(cmsgu.cmsg); in processClient()
/system/core/adb/
Djdwp_service.cpp273 struct cmsghdr* cmsg; in jdwp_process_event() local
289 cmsg = CMSG_FIRSTHDR(&msg); in jdwp_process_event()
290 cmsg->cmsg_len = msg.msg_controllen; in jdwp_process_event()
291 cmsg->cmsg_level = SOL_SOCKET; in jdwp_process_event()
292 cmsg->cmsg_type = SCM_RIGHTS; in jdwp_process_event()
293 ((int*)CMSG_DATA(cmsg))[0] = fd; in jdwp_process_event()