Subject: Re: m_copy - doesn't copy if M_EXT is set.
To: Ignatios Souvatzis <>
From: Dennis Ferguson <>
List: tech-net
Date: 10/04/1999 15:03:37
> On Sun, Oct 03, 1999 at 05:23:24PM -0700, Justin C. Walker wrote:
> >    You're correct about the behavior of m_copy()/m_copym(), but not  
> > about it's having changed.  This is old behavior.
> From before 4.4BSD, even, I think. Does anybody have a 4.3BSD book handy?

It has been like this since 4.2BSD when mbufs and mclusters were first
implemented, I think.  It was done this way for TCP, which wants to copy
data into packets while keeping a copy of the data on the send queue until
it is acknowledged.  Fragmentation and multicast also make advantageous use
of this.

This is also the reason why m_pullup() always copies the header out of a
cluster even if the header was originally contiguous in the cluster.

Dennis Ferguson