Date: Wed, 24 Sep 2003 13:55:35 -0300 From: "Giovanni P. Tirloni" <gpt@tirloni.org> To: freebsd-hackers@freebsd.org Cc: jtoung@arc.nasa.gov Subject: Re: mbuf doubts Message-ID: <20030924165535.GA79874@pixies.tirloni.org> In-Reply-To: <200309240821.26331.jtoung@arc.nasa.gov> References: <20030924021219.GV34641@pixies.tirloni.org> <200309240821.26331.jtoung@arc.nasa.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
* Jerry Toung (jtoung@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030924165535.GA79874>