Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2003 14:18:24 -0500
From:      Hiten Pandya <hiten@unixdaemons.com>
To:        Craig Rodrigues <rodrigc@attbi.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Problem with M_COPY_PACKET
Message-ID:  <20030224191824.GA52283@unixdaemons.com>
In-Reply-To: <20030224170702.GA1059@attbi.com>
References:  <20030224170702.GA1059@attbi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Craig Rodrigues (Mon, Feb 24, 2003 at 12:07:02PM -0500) wrote:
> The code in question looks like:
> =========================================================================
> struct mbuf *
> copy_mbuf(struct mbuf *m)
> {
>         struct mbuf *new;
> 
>         MGET(new, M_DONTWAIT, MT_DATA);
>         if(new == NULL)
>                 return NULL;
>         if(m->m_flags & M_PKTHDR)
>                 M_COPY_PKTHDR(new, m);

What you need, is m_dup_pkthdr().  M_COPY_PKTHDR has been
deprecated for several reasons, that are outlined in the
commit log of rev. 1.109 of sys/sys/mbuf.h.

Cheers.

-- 
Hiten Pandya (hiten@unixdaemons.com, hiten@uk.FreeBSD.org)
http://www.unixdaemons.com/~hiten/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030224191824.GA52283>