Lines Matching refs:cmsg
67 static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) in scm_fp_copy() argument
69 int *fdp = (int*)CMSG_DATA(cmsg); in scm_fp_copy()
74 num = (cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)))/sizeof(int); in scm_fp_copy()
135 struct cmsghdr *cmsg; in __scm_send() local
138 for_each_cmsghdr(cmsg, msg) { in __scm_send()
149 if (!CMSG_OK(msg, cmsg)) in __scm_send()
152 if (cmsg->cmsg_level != SOL_SOCKET) in __scm_send()
155 switch (cmsg->cmsg_type) in __scm_send()
160 err=scm_fp_copy(cmsg, &p->fp); in __scm_send()
169 if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct ucred))) in __scm_send()
171 memcpy(&creds, CMSG_DATA(cmsg), sizeof(struct ucred)); in __scm_send()