Date: Mon, 24 Feb 2003 16:17:11 -0500 From: Hiten Pandya <hiten@unixdaemons.com> To: Harti Brandt <brandt@fokus.fraunhofer.de> Cc: Hiten Pandya <hiten@unixdaemons.com>, Craig Rodrigues <rodrigc@attbi.com>, freebsd-current@FreeBSD.ORG Subject: Re: Problem with M_COPY_PACKET Message-ID: <20030224211711.GA63301@unixdaemons.com> In-Reply-To: <20030224204521.G54577@beagle.fokus.gmd.de> References: <20030224170702.GA1059@attbi.com> <20030224191824.GA52283@unixdaemons.com> <20030224204521.G54577@beagle.fokus.gmd.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Harti Brandt (Mon, Feb 24, 2003 at 08:46:13PM +0100) wrote:
> On Mon, 24 Feb 2003, Hiten Pandya wrote:
>
> HP>Craig Rodrigues (Mon, Feb 24, 2003 at 12:07:02PM -0500) wrote:
> HP>> The code in question looks like:
> HP>> =========================================================================
> HP>> struct mbuf *
> HP>> copy_mbuf(struct mbuf *m)
> HP>> {
> HP>> struct mbuf *new;
> HP>>
> HP>> MGET(new, M_DONTWAIT, MT_DATA);
> HP>> if(new == NULL)
> HP>> return NULL;
> HP>> if(m->m_flags & M_PKTHDR)
> HP>> M_COPY_PKTHDR(new, m);
> HP>
> HP>What you need, is m_dup_pkthdr(). M_COPY_PKTHDR has been
> HP>deprecated for several reasons, that are outlined in the
> HP>commit log of rev. 1.109 of sys/sys/mbuf.h.
>
> I wrote that code. It must be a M_MOVE_PKTHDR, because m is just disposed
> afterwards.
OK. This was mentioned in the comment in sys/mbuf.h and the commit log
too. :-)
--
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?20030224211711.GA63301>
