Lines Matching refs:cmsg
58 struct cmsghdr *cmsg; in server() local
67 cmsg = CMSG_FIRSTHDR(&msg); in server()
68 cmsg->cmsg_level = SOL_SOCKET; in server()
69 cmsg->cmsg_type = SCM_RIGHTS; in server()
70 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * 2); in server()
71 ((int *)CMSG_DATA(cmsg))[0] = fd1; in server()
72 ((int *)CMSG_DATA(cmsg))[1] = fd2; in server()
95 struct cmsghdr *cmsg = &control_un.cm; in client() local
130 cmsg = CMSG_FIRSTHDR(&msg); in client()
131 while (cmsg) { in client()
132 if (cmsg->cmsg_level == SOL_SOCKET && in client()
133 cmsg->cmsg_type == SCM_RIGHTS && in client()
134 cmsg->cmsg_len == CMSG_LEN(sizeof(int) * 2)) { in client()
135 fd1 = ((int *)CMSG_DATA(cmsg))[0]; in client()
136 fd2 = ((int *)CMSG_DATA(cmsg))[1]; in client()
139 cmsg = CMSG_NXTHDR(&msg, cmsg); in client()