mbuf doubts
Giovanni P. Tirloni
gpt at tirloni.org
Wed Sep 24 09:55:42 PDT 2003
* Jerry Toung (jtoung at arc.nasa.gov) wrote:
> Giovani,
>
> you will find the answer to your question in "tcp/ip illustrated, volume 2:
> the implementation" in chapter 2.
>
> But to briefly answer your question, yes, there are 4 different types of
> mbufs, depending on the m_flags value.
> 1) m_flags = 0 and mbuf contains only data up to 108 bytes.
> 2) m_flags = M_PKTHDR to designate a packet header.
> 3)m_flags = M_EXT. In a situation where a user process write() in a buffer >
> 256 bytes, the system allocates a cluster to hold that data.
> 4) m_flags = M_EXT|M_PKTHDR
>
> and yes when using clusters, the memory in the mbuf is unsed.
>
> hop that helped.
Thank you very much Justin and Jerry for the answers. They were very
helpful.
I'm already getting my copy of Steven's :-)
--
Giovanni P. Tirloni <gpt at tirloni.org>
Fingerprint: 8C3F BEC5 79BD 3E9B EDB8 72F4 16E8 BA5E D031 5C26
More information about the freebsd-hackers
mailing list