Home
last modified time | relevance | path

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

/system/libbase/
Dcmsg.cpp55 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in SendFileDescriptorVector() local
56 cmsg->cmsg_level = SOL_SOCKET; in SendFileDescriptorVector()
57 cmsg->cmsg_type = SCM_RIGHTS; in SendFileDescriptorVector()
58 cmsg->cmsg_len = cmsg_len; in SendFileDescriptorVector()
60 int* cmsg_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in SendFileDescriptorVector()
119 struct cmsghdr* cmsg; in ReceiveFileDescriptorVector() local
120 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != nullptr; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in ReceiveFileDescriptorVector()
121 if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { in ReceiveFileDescriptorVector()
122 LOG(ERROR) << "received unexpected cmsg: [" << cmsg->cmsg_level << ", " << cmsg->cmsg_type in ReceiveFileDescriptorVector()
141 if (cmsg->cmsg_len % sizeof(int) != 0) { in ReceiveFileDescriptorVector()
[all …]
DAndroid.bp91 "cmsg.cpp",
136 "cmsg.cpp",
/system/memory/libmemunreachable/
DLeakPipe.cpp40 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in SendFd() local
41 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in SendFd()
42 cmsg->cmsg_level = SOL_SOCKET; in SendFd()
43 cmsg->cmsg_type = SCM_RIGHTS; in SendFd()
45 *(int*)CMSG_DATA(cmsg) = fd; in SendFd()
84 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in ReceiveFd() local
85 if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { in ReceiveFd()
90 return *(int*)CMSG_DATA(cmsg); in ReceiveFd()
/system/logging/logd/
DLogListener.cpp77 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in HandleData() local
78 while (cmsg != nullptr) { in HandleData()
79 if (cmsg->cmsg_level == SOL_SOCKET && in HandleData()
80 cmsg->cmsg_type == SCM_CREDENTIALS) { in HandleData()
81 cred = (struct ucred*)CMSG_DATA(cmsg); in HandleData()
84 cmsg = CMSG_NXTHDR(&hdr, cmsg); in HandleData()
/system/netd/client/
DFwmarkClient.cpp97 char cmsg[CMSG_SPACE(sizeof(fd))]; in send() member
101 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in send()
102 message.msg_control = cmsgu.cmsg; in send()
103 message.msg_controllen = sizeof(cmsgu.cmsg); in send()
/system/memory/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/core/libcutils/
Duevent.cpp68 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in uevent_kernel_recv() local
69 if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { in uevent_kernel_recv()
74 cred = (struct ucred*)CMSG_DATA(cmsg); in uevent_kernel_recv()
/system/memory/libmeminfo/libdmabufinfo/
Ddmabufinfo_test.cpp113 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in run() local
114 cmsg->cmsg_level = SOL_SOCKET; in run()
115 cmsg->cmsg_type = SCM_RIGHTS; in run()
116 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in run()
141 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in sendfd() local
142 cmsg->cmsg_level = SOL_SOCKET; in sendfd()
143 cmsg->cmsg_type = SCM_RIGHTS; in sendfd()
144 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in sendfd()
146 int* fd_buf = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in sendfd()
/system/memory/lmkd/
Dlmkd.cpp768 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in ctrl_data_read() local
769 while (cmsg != NULL) { in ctrl_data_read()
770 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) { in ctrl_data_read()
771 cred = (struct ucred*)CMSG_DATA(cmsg); in ctrl_data_read()
774 cmsg = CMSG_NXTHDR(&hdr, cmsg); in ctrl_data_read()