Lines Matching refs:mcopy
112 struct mbuf *mcopy; in ip_redir_alloc() local
169 mcopy = m_gethdr(M_NOWAIT, m->m_type); in ip_redir_alloc()
170 if (mcopy == NULL) in ip_redir_alloc()
173 if (m_dup_pkthdr(mcopy, m, M_NOWAIT) == 0) { in ip_redir_alloc()
180 m_free(mcopy); in ip_redir_alloc()
183 mcopy->m_len = min(ip_len, M_TRAILINGSPACE(mcopy)); in ip_redir_alloc()
184 mcopy->m_pkthdr.len = mcopy->m_len; in ip_redir_alloc()
185 m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t)); in ip_redir_alloc()
187 return (mcopy); in ip_redir_alloc()
244 struct mbuf *mcopy = NULL; in ip_tryforward() local
469 mcopy = ip_redir_alloc(m, nh, ip_len, &osrc, &redest); in ip_tryforward()
541 if (mcopy != NULL) { in ip_tryforward()
542 icmp_error(mcopy, ICMP_REDIRECT, ICMP_REDIRECT_HOST, redest.s_addr, 0); in ip_tryforward()
543 mcopy = NULL; /* Was consumed by callee. */ in ip_tryforward()
547 if (mcopy != NULL) in ip_tryforward()
548 m_freem(mcopy); in ip_tryforward()