Lines Matching refs:cmsg
51 struct cmsghdr *cmsg = (struct cmsghdr *)&controlbuf; in main() local
52 assert(cmsg); in main()
59 cmsg->cmsg_level = SOL_SOCKET; in main()
60 cmsg->cmsg_type = SCM_RIGHTS; in main()
61 cmsg->cmsg_len = CMSG_LEN(kNumFds * sizeof(int)); in main()
62 memcpy(CMSG_DATA(cmsg), myfds, kNumFds * sizeof(int)); in main()
64 __msan_poison(&cmsg->cmsg_level, sizeof(cmsg->cmsg_level)); in main()
67 __msan_poison(&cmsg->cmsg_type, sizeof(cmsg->cmsg_type)); in main()
70 __msan_poison(&cmsg->cmsg_len, sizeof(cmsg->cmsg_len)); in main()
73 cmsg = (struct cmsghdr *)(&controlbuf[CMSG_SPACE(kNumFds * sizeof(int))]); in main()
74 assert(cmsg); in main()
79 cmsg->cmsg_level = SOL_SOCKET; in main()
80 cmsg->cmsg_type = SCM_CREDENTIALS; in main()
81 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred)); in main()
82 memcpy(CMSG_DATA(cmsg), &cred, sizeof(struct ucred)); in main()
84 __msan_poison(&cmsg->cmsg_level, sizeof(cmsg->cmsg_level)); in main()
87 __msan_poison(&cmsg->cmsg_type, sizeof(cmsg->cmsg_type)); in main()
90 __msan_poison(&cmsg->cmsg_len, sizeof(cmsg->cmsg_len)); in main()