Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2007 14:31:15 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Steve Bertrand <iaccounts@ibctech.ca>
Cc:        freebsd-current@freebsd.org
Subject:   Re: IP header question
Message-ID:  <20070730113115.GA2503@kobe.laptop>
In-Reply-To: <46AA2ED3.6050702@ibctech.ca>
References:  <46AA2ED3.6050702@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-07-27 13:43, Steve Bertrand <iaccounts@ibctech.ca> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070730113115.GA2503>