Searched refs:cmsg (Results 1 - 4 of 4) sorted by relevance

/frameworks/base/cmds/statsd/src/socket/
H A DStatsSocketListener.cpp83 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); local
84 while (cmsg != NULL) {
85 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) {
86 cred = (struct ucred*)CMSG_DATA(cmsg);
89 cmsg = CMSG_NXTHDR(&hdr, cmsg);
/frameworks/native/libs/nativewindow/
H A DAHardwareBuffer.cpp184 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); local
185 cmsg->cmsg_level = SOL_SOCKET;
186 cmsg->cmsg_type = SCM_RIGHTS;
187 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fdCount);
188 int* fdData = reinterpret_cast<int*>(CMSG_DATA(cmsg));
190 msg.msg_controllen = cmsg->cmsg_len;
252 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); local
253 if (!cmsg) {
259 const int* fdData = reinterpret_cast<const int*>(CMSG_DATA(cmsg));
/frameworks/native/libs/vr/libpdx_uds/
H A Dipc_helper.cpp311 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); local
312 while (cmsg) {
313 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS &&
314 cred && cmsg->cmsg_len == CMSG_LEN(sizeof(ucred))) {
316 memcpy(cred, CMSG_DATA(cmsg), sizeof(ucred));
317 } else if (cmsg->cmsg_level == SOL_SOCKET &&
318 cmsg->cmsg_type == SCM_RIGHTS) {
319 socklen_t payload_len = cmsg->cmsg_len - CMSG_LEN(0);
320 const int* fds = reinterpret_cast<const int*>(CMSG_DATA(cmsg));
[all...]
/frameworks/base/core/jni/
H A Dandroid_net_LocalSocketImpl.cpp140 "invalid cmsg length");
254 struct cmsghdr *cmsg; local
278 // See "man cmsg" really
281 cmsg = CMSG_FIRSTHDR(&msg);
282 cmsg->cmsg_level = SOL_SOCKET;
283 cmsg->cmsg_type = SCM_RIGHTS;
284 cmsg->cmsg_len = CMSG_LEN(sizeof fds);
285 memcpy(CMSG_DATA(cmsg), fds, sizeof fds);

Completed in 157 milliseconds