Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2002 16:52:08 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Skye Poier <skye@ffwd.cx>
Cc:        hackers@freebsd.org
Subject:   Re: mbuf chains
Message-ID:  <Pine.BSF.4.21.0201181651020.93091-100000@InterJet.elischer.org>
In-Reply-To: <20020118164617.L99893@ffwd.cx>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 18 Jan 2002, Skye Poier wrote:

> What are the rules around mbuf chain construction?
> (I've read man mbuf, doesnt go into much detail)
> 
> In particular, I'm assuming:
> - all mbufs must be same type
> - the head mbuf must have M_PKTHDR set
> - the head mbuf.m_pkthdr.len must be the len of the entire chain
> Anything to add?
> 
> My confusion is around splitting/concatenating -
> 
> When splitting an mbuf chain, the two resultant chains must be as above
> (heads have M_PKTHDR and mbuf.m_pkthdr.len set) right?

That depends on why yuo need to split them.

> 
> When concatenating chains, what do you do with the M_PKTHDR that is now
> in the middle of the chain?  m_cat doesn't seem very sophisticated in
> this regard.  And of course update head mbuf.m_pkthdr.len
> 
> Thanks
> Skye
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0201181651020.93091-100000>