Home
last modified time | relevance | path

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

/system/core/base/
Dcmsg.cpp54 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in SendFileDescriptorVector() local
55 cmsg->cmsg_level = SOL_SOCKET; in SendFileDescriptorVector()
56 cmsg->cmsg_type = SCM_RIGHTS; in SendFileDescriptorVector()
57 cmsg->cmsg_len = cmsg_len; in SendFileDescriptorVector()
59 int* cmsg_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in SendFileDescriptorVector()
117 struct cmsghdr* cmsg; in ReceiveFileDescriptorVector() local
118 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != nullptr; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in ReceiveFileDescriptorVector()
119 if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { in ReceiveFileDescriptorVector()
120 LOG(ERROR) << "received unexpected cmsg: [" << cmsg->cmsg_level << ", " << cmsg->cmsg_type in ReceiveFileDescriptorVector()
139 if (cmsg->cmsg_len % sizeof(int) != 0) { in ReceiveFileDescriptorVector()
[all …]
DAndroid.bp49 "cmsg.cpp",
90 "cmsg.cpp",
/system/core/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/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/core/logd/
DLogListener.cpp71 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in onDataAvailable() local
72 while (cmsg != nullptr) { in onDataAvailable()
73 if (cmsg->cmsg_level == SOL_SOCKET && in onDataAvailable()
74 cmsg->cmsg_type == SCM_CREDENTIALS) { in onDataAvailable()
75 cred = (struct ucred*)CMSG_DATA(cmsg); in onDataAvailable()
78 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.cpp102 char cmsg[CMSG_SPACE(sizeof(fd))]; in send() member
106 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in send()
107 message.msg_control = cmsgu.cmsg; in send()
108 message.msg_controllen = sizeof(cmsgu.cmsg); in send()
/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/core/libmeminfo/libdmabufinfo/
Ddmabufinfo_test.cpp107 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in run() local
108 cmsg->cmsg_level = SOL_SOCKET; in run()
109 cmsg->cmsg_type = SCM_RIGHTS; in run()
110 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in run()
135 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in sendfd() local
136 cmsg->cmsg_level = SOL_SOCKET; in sendfd()
137 cmsg->cmsg_type = SCM_RIGHTS; in sendfd()
138 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); in sendfd()
140 int* fd_buf = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in sendfd()
/system/netd/server/
DFwmarkServer.cpp99 char cmsg[CMSG_SPACE(sizeof(*socketFd))]; in processClient() member
102 memset(cmsgu.cmsg, 0, sizeof(cmsgu.cmsg)); in processClient()
103 message.msg_control = cmsgu.cmsg; in processClient()
104 message.msg_controllen = sizeof(cmsgu.cmsg); in processClient()