From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 24 09:55:42 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D75216A4C3 for ; Wed, 24 Sep 2003 09:55:42 -0700 (PDT) Received: from pixies.tirloni.org (pixies.tirloni.org [200.203.183.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id D54E943FD7 for ; Wed, 24 Sep 2003 09:55:38 -0700 (PDT) (envelope-from tirloni@tirloni.org) Received: from localhost (pixies [200.203.183.37]) by pixies.tirloni.org (Postfix) with ESMTP id 1133C1E146F; Wed, 24 Sep 2003 13:55:37 -0300 (BRT) Received: from pixies.tirloni.org ([200.203.183.37]) by localhost (pixies.tirloni.org [200.203.183.37]) (amavisd-new, port 10024) with ESMTP id 32613-08; Wed, 24 Sep 2003 13:55:35 -0300 (BRT) Received: by pixies.tirloni.org (Postfix, from userid 1000) id 9B9E81E1426; Wed, 24 Sep 2003 13:55:35 -0300 (BRT) Date: Wed, 24 Sep 2003 13:55:35 -0300 From: "Giovanni P. Tirloni" To: freebsd-hackers@freebsd.org Message-ID: <20030924165535.GA79874@pixies.tirloni.org> Mail-Followup-To: freebsd-hackers@freebsd.org, jtoung@arc.nasa.gov, justin@mac.com References: <20030924021219.GV34641@pixies.tirloni.org> <200309240821.26331.jtoung@arc.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200309240821.26331.jtoung@arc.nasa.gov> X-Info: http://www.tirloni.org User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at tirloni.org cc: jtoung@arc.nasa.gov Subject: Re: mbuf doubts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 16:55:42 -0000 * 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 Fingerprint: 8C3F BEC5 79BD 3E9B EDB8 72F4 16E8 BA5E D031 5C26