Lines Matching refs:mcopy
113 struct mbuf *mcopy; in ip_redir_alloc() local
170 mcopy = m_gethdr(M_NOWAIT, m->m_type); in ip_redir_alloc()
171 if (mcopy == NULL) in ip_redir_alloc()
174 if (m_dup_pkthdr(mcopy, m, M_NOWAIT) == 0) { in ip_redir_alloc()
181 m_free(mcopy); in ip_redir_alloc()
184 mcopy->m_len = min(ip_len, M_TRAILINGSPACE(mcopy)); in ip_redir_alloc()
185 mcopy->m_pkthdr.len = mcopy->m_len; in ip_redir_alloc()
186 m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t)); in ip_redir_alloc()
188 return (mcopy); in ip_redir_alloc()
245 struct mbuf *mcopy = NULL; in ip_tryforward() local
478 mcopy = ip_redir_alloc(m, nh, ip_len, &osrc, &redest); in ip_tryforward()
550 if (mcopy != NULL) { in ip_tryforward()
551 icmp_error(mcopy, ICMP_REDIRECT, ICMP_REDIRECT_HOST, redest.s_addr, 0); in ip_tryforward()
552 mcopy = NULL; /* Was consumed by callee. */ in ip_tryforward()
556 if (mcopy != NULL) in ip_tryforward()
557 m_freem(mcopy); in ip_tryforward()