Re: IP header question

From: Giorgos Keramidas <keramida_at_ceid.upatras.gr>
Date: Mon, 30 Jul 2007 14:31:15 +0300
On 2007-07-27 13:43, Steve Bertrand <iaccounts_at_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
Received on Mon Jul 30 2007 - 09:50:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC