The Linux kernel supports many Layer three (L3) protocols, such as AppleTalk, DECnet, and IPX, but this book talks just about the one that dominates modern networking: IP. While IPv4 will be described in detail, IPv6 will be only briefly mentioned as needed. I will not spend much time on the theory behind these protocols, with which you should be somewhat familiar, but I will describe the implementation in Linux. I will focus on aspects of the design that are not obvious or that differ substantially from other operating systems. I will also explain the main drawbacks of version 4 of the IP protocol and show how IPv6 tries to address them. Therefore, while there is both some background theory and some code, I expect the reader to be familiar with the basic IP protocol behavior. Here is what is covered in each chapter:
Chapter 18, Internet Protocol Version 4 (IPv4): Concepts
Introduces the major tasks of the IP layer, and the strategies used.
Chapter 19 Internet Protocol Version 4 (IPv4): Linux Foundations and Features
Shows how the IP-layer reception routine processes ingress packets, and how IP options are taken care of.
Chapter 20 Internet Protocol Version 4 (IPv4): Forwarding and Local Delivery
Shows how ingress IP packets are delivered locally to the L4 protocol handler, or are forwarded when the destination IP address does not belong to the local host but the host has enabled forwarding.
Chapter 21 Internet Protocol Version 4 (IPv4): Transmission
Shows how L4 protocols interface to the IP layer to request transmission.
Chapter 22 Internet Protocol Version 4 (IPv4): Handling Fragmentation
Shows how fragmentation and defragmentation are handled.
Chapter 23 Internet Protocol Version 4 (IPv4): Miscellaneous Topics
Shows how configuration tools such as those in the IPROUTE2 package interface to the kernel, shows how the IP header's ID field is initialized on egress packets, and provides a detailed description of the data structures used at the IP layer.
Chapter 24 Layer Four Protocol and Raw IP Handling
Shows how L4 protocols register a handler for ingress traffic.
Chapter 25 Internet Control Message Protocol (ICMPv4)
Describes the implementation of the ICMP protocol.