Home
last modified time | relevance | path

Searched refs:cmsg (Results 1 – 10 of 10) 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.bp63 "cmsg.cpp",
106 "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/core/logd/
DLogListener.cpp78 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in HandleData() local
79 while (cmsg != nullptr) { in HandleData()
80 if (cmsg->cmsg_level == SOL_SOCKET && in HandleData()
81 cmsg->cmsg_type == SCM_CREDENTIALS) { in HandleData()
82 cred = (struct ucred*)CMSG_DATA(cmsg); in HandleData()
85 cmsg = CMSG_NXTHDR(&hdr, cmsg); in HandleData()
/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/client/
DFwmarkClient.cpp99 char cmsg[CMSG_SPACE(sizeof(fd))]; in send() member
103 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in send()
104 message.msg_control = cmsgu.cmsg; in send()
105 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.cpp108 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in run() local
109 cmsg->cmsg_level = SOL_SOCKET; in run()
110 cmsg->cmsg_type = SCM_RIGHTS; in run()
111 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in run()
136 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in sendfd() local
137 cmsg->cmsg_level = SOL_SOCKET; in sendfd()
138 cmsg->cmsg_type = SCM_RIGHTS; in sendfd()
139 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in sendfd()
141 int* fd_buf = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in sendfd()
/system/memory/lmkd/
Dlmkd.cpp712 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in ctrl_data_read() local
713 while (cmsg != NULL) { in ctrl_data_read()
714 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) { in ctrl_data_read()
715 cred = (struct ucred*)CMSG_DATA(cmsg); in ctrl_data_read()
718 cmsg = CMSG_NXTHDR(&hdr, cmsg); in ctrl_data_read()