Home
last modified time | relevance | path

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

/frameworks/native/libs/binder/
DOS_unix_base.cpp97 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in sendMessageOnSocket() local
98 cmsg->cmsg_level = SOL_SOCKET; in sendMessageOnSocket()
99 cmsg->cmsg_type = SCM_RIGHTS; in sendMessageOnSocket()
100 cmsg->cmsg_len = CMSG_LEN(fdsByteSize); in sendMessageOnSocket()
101 memcpy(CMSG_DATA(cmsg), fds, fdsByteSize); in sendMessageOnSocket()
133 for (cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); cmsg != nullptr; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in receiveMessageFromSocket() local
134 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { in receiveMessageFromSocket()
137 size_t dataLen = cmsg->cmsg_len - CMSG_LEN(0); in receiveMessageFromSocket()
139 memcpy(fdBuffer, CMSG_DATA(cmsg), dataLen); in receiveMessageFromSocket()
/frameworks/native/libs/vr/libpdx_uds/
Dipc_helper.cpp311 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in Receive() local
312 while (cmsg) { in Receive()
313 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS && in Receive()
314 cred && cmsg->cmsg_len == CMSG_LEN(sizeof(ucred))) { in Receive()
316 memcpy(cred, CMSG_DATA(cmsg), sizeof(ucred)); in Receive()
317 } else if (cmsg->cmsg_level == SOL_SOCKET && in Receive()
318 cmsg->cmsg_type == SCM_RIGHTS) { in Receive()
319 socklen_t payload_len = cmsg->cmsg_len - CMSG_LEN(0); in Receive()
320 const int* fds = reinterpret_cast<const int*>(CMSG_DATA(cmsg)); in Receive()
325 cmsg = CMSG_NXTHDR(&msg, cmsg); in Receive()
/frameworks/native/libs/nativewindow/
DAHardwareBuffer.cpp377 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in AHardwareBuffer_sendHandleToUnixSocket() local
378 cmsg->cmsg_level = SOL_SOCKET; in AHardwareBuffer_sendHandleToUnixSocket()
379 cmsg->cmsg_type = SCM_RIGHTS; in AHardwareBuffer_sendHandleToUnixSocket()
380 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fdCount); in AHardwareBuffer_sendHandleToUnixSocket()
381 int* fdData = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in AHardwareBuffer_sendHandleToUnixSocket()
383 msg.msg_controllen = cmsg->cmsg_len; in AHardwareBuffer_sendHandleToUnixSocket()
445 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in AHardwareBuffer_recvHandleFromUnixSocket() local
446 if (!cmsg) { in AHardwareBuffer_recvHandleFromUnixSocket()
452 const int* fdData = reinterpret_cast<const int*>(CMSG_DATA(cmsg)); in AHardwareBuffer_recvHandleFromUnixSocket()