Searched refs:cmsg (Results 1 – 9 of 9) sorted by relevance
55 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in SendFileDescriptorVector() local56 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() local120 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 …]
91 "cmsg.cpp",136 "cmsg.cpp",
40 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in SendFd() local41 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() local85 if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { in ReceiveFd()90 return *(int*)CMSG_DATA(cmsg); in ReceiveFd()
77 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in HandleData() local78 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()
97 char cmsg[CMSG_SPACE(sizeof(fd))]; in send() member101 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()
135 struct cmsghdr *cmsg; in ion_share_test() local149 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() local189 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()
68 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in uevent_kernel_recv() local69 if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { in uevent_kernel_recv()74 cred = (struct ucred*)CMSG_DATA(cmsg); in uevent_kernel_recv()
113 cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); in run() local114 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() local142 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()
768 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in ctrl_data_read() local769 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()