From owner-freebsd-current Mon Feb 24 11:18:31 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6947437B401 for ; Mon, 24 Feb 2003 11:18:30 -0800 (PST) Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CAAD43F93 for ; Mon, 24 Feb 2003 11:18:29 -0800 (PST) (envelope-from hiten@angelica.unixdaemons.com) Received: from angelica.unixdaemons.com (hiten@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.7/8.12.1) with ESMTP id h1OJIPeG052878; Mon, 24 Feb 2003 14:18:25 -0500 (EST) Received: (from hiten@localhost) by angelica.unixdaemons.com (8.12.7/8.12.1/Submit) id h1OJIO5j052877; Mon, 24 Feb 2003 14:18:24 -0500 (EST) (envelope-from hiten) Date: Mon, 24 Feb 2003 14:18:24 -0500 From: Hiten Pandya To: Craig Rodrigues Cc: freebsd-current@FreeBSD.ORG Subject: Re: Problem with M_COPY_PACKET Message-ID: <20030224191824.GA52283@unixdaemons.com> References: <20030224170702.GA1059@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030224170702.GA1059@attbi.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD i386 X-Public-Key: http://www.pittgoth.com/~hiten/pubkey.asc X-URL: http://www.unixdaemons.com/~hiten X-PGP: http://pgp.mit.edu:11371/pks/lookup?search=Hiten+Pandya&op=index Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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