Lines Matching defs:control
502 struct mbuf *control)
508 if (control) {
510 error = unp_internalize(control, curproc);
540 if (control) {
541 if (sbappendcontrol(so2, &so2->so_rcv, m, control)) {
542 control = NULL;
567 if (control && error)
568 unp_dispose(control);
571 m_freem(control);
579 struct mbuf *control)
586 if (control) {
588 error = unp_internalize(control, curproc);
620 if (sbappendaddr(so2, &so2->so_rcv, from, m, control)) {
623 control = NULL;
635 if (control && error)
636 unp_dispose(control);
639 m_freem(control);
1052 * control message type on unix sockets. Enforce this here.
1156 * `f_count' reference which is now shared between control
1208 unp_internalize(struct mbuf *control, struct proc *p)
1211 struct cmsghdr *cm = mtod(control, struct cmsghdr *);
1222 if (control->m_len < CMSG_LEN(0) || cm->cmsg_len < CMSG_LEN(0))
1225 !(cm->cmsg_len == control->m_len ||
1226 control->m_len == CMSG_ALIGN(cm->cmsg_len)))
1241 control->m_len;
1242 if (neededspace > m_trailingspace(control)) {
1245 if (control->m_flags & M_EXT) {
1251 tmp = malloc(control->m_len, M_TEMP, M_WAITOK);
1252 memcpy(tmp, mtod(control, caddr_t), control->m_len);
1255 MCLGET(control, M_WAIT);
1256 if ((control->m_flags & M_EXT) == 0) {
1257 free(tmp, M_TEMP, control->m_len);
1263 cm = mtod(control, struct cmsghdr *);
1264 memcpy(cm, tmp, control->m_len);
1265 free(tmp, M_TEMP, control->m_len);
1271 control->m_len = CMSG_SPACE(nfds * sizeof(struct fdpass));