Lines Matching refs:mcopy
126 struct mbuf *mcopy = m_gethdr(M_NOWAIT, m->m_type); in ip_redir_alloc() local
128 if (mcopy == NULL) in ip_redir_alloc()
134 if (m_dup_pkthdr(mcopy, m, M_NOWAIT) == 0) { in ip_redir_alloc()
141 m_free(mcopy); in ip_redir_alloc()
144 mcopy->m_len = min(ntohs(ip->ip_len), M_TRAILINGSPACE(mcopy)); in ip_redir_alloc()
145 mcopy->m_pkthdr.len = mcopy->m_len; in ip_redir_alloc()
146 m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t)); in ip_redir_alloc()
165 return (mcopy); in ip_redir_alloc()
216 struct mbuf *mcopy = NULL; in ip_tryforward() local
445 mcopy = ip_redir_alloc(m, ip, dest, &redest.s_addr); in ip_tryforward()
519 if (mcopy != NULL) { in ip_tryforward()
520 icmp_error(mcopy, ICMP_REDIRECT, ICMP_REDIRECT_HOST, redest.s_addr, 0); in ip_tryforward()
521 mcopy = NULL; /* Freed by caller */ in ip_tryforward()
525 if (mcopy != NULL) in ip_tryforward()
526 m_freem(mcopy); in ip_tryforward()