Lines Matching refs:cmsg
109 struct cmsghdr *cmsg; in multiprocessing_sendfd() local
127 cmsg = CMSG_FIRSTHDR(&msg); in multiprocessing_sendfd()
128 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in multiprocessing_sendfd()
129 cmsg->cmsg_level = SOL_SOCKET; in multiprocessing_sendfd()
130 cmsg->cmsg_type = SCM_RIGHTS; in multiprocessing_sendfd()
131 * (int *) CMSG_DATA(cmsg) = fd; in multiprocessing_sendfd()
149 struct cmsghdr *cmsg; in multiprocessing_recvfd() local
167 cmsg = CMSG_FIRSTHDR(&msg); in multiprocessing_recvfd()
168 cmsg->cmsg_level = SOL_SOCKET; in multiprocessing_recvfd()
169 cmsg->cmsg_type = SCM_RIGHTS; in multiprocessing_recvfd()
170 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in multiprocessing_recvfd()
171 msg.msg_controllen = cmsg->cmsg_len; in multiprocessing_recvfd()
181 (cmsg = CMSG_FIRSTHDR(&msg)) == NULL || in multiprocessing_recvfd()
182 cmsg->cmsg_level != SOL_SOCKET || in multiprocessing_recvfd()
183 cmsg->cmsg_type != SCM_RIGHTS || in multiprocessing_recvfd()
184 cmsg->cmsg_len < CMSG_LEN(sizeof(int))) { in multiprocessing_recvfd()
191 fd = * (int *) CMSG_DATA(cmsg); in multiprocessing_recvfd()