From owner-freebsd-current@FreeBSD.ORG Mon Jul 30 11:50:59 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EF4A16A417 for ; Mon, 30 Jul 2007 11:50:59 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 919A413C46B for ; Mon, 30 Jul 2007 11:50:58 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile.ondsl.gr [83.235.244.135]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l6UBVe7e029687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 30 Jul 2007 14:31:47 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l6UBVGvr002705; Mon, 30 Jul 2007 14:31:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l6UBVGBe002704; Mon, 30 Jul 2007 14:31:16 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 30 Jul 2007 14:31:15 +0300 From: Giorgos Keramidas To: Steve Bertrand Message-ID: <20070730113115.GA2503@kobe.laptop> References: <46AA2ED3.6050702@ibctech.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46AA2ED3.6050702@ibctech.ca> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.893, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.51, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-current@freebsd.org Subject: Re: IP header question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2007 11:50:59 -0000 On 2007-07-27 13:43, Steve Bertrand wrote: > First of all, sorry for being off topic here, but I know there are > many people in this list that know the network stack inside and out. It is kind of off topic, but that's ok. In the future, if you are unsure about the topicality of a subject for a particular mailing list, it will generally be 'safer' to post to freebsd-questions; that's the "catch all" mailing list for general FreeBSD questions. > I have (hopefully) a couple very easy questions: > > When the term 'header stripping' is used as a packet is passed up > the stack, what really happens? I don't understand how if a layers > header is 'stripped off' as it goes up, it will know where to be > sent to as it goes back down. What 'header stripping' means depends on the context, and the level of detail you want to go into. As packets traverse the layers of the BSD networking stack, they are stored in flexible in-kernel structures called "mbufs". The internals of the networking implementation of the BSD systems, including all the details about where, how, when packets are stored in "mbufs" and how the layout and design of these "mbufs" helps implement the semantics of the higher level protocols, are explained in a great deal of detail in the classic book of Gary A. Wright and Richard W. Stevens: Gary A. Wright, Richard W. Stevens "TCP/IP Illustrated: Volume II (The Implementation)" Addison Wesley (6 Mar 1995) ISBN: 978-0201633542 [ http://www.amazon.co.uk/TCP-IP-Illustrated-Implementation-APC/dp/020163354X/ ] This book will help you understand a *lot* more than just 'header stripping', so if you are genuinely interested in the way the BSD networking stack is designed and the way its internals work, you should try to read this book at least once :) - Giorgos