Create bookmark
Understanding Linux Network Internals
Notes
Please login to add notes
- Table of Contents
-
+
Preface
- Part I
-
+
Introduction
- Basic Terminology
-
+
Common Coding Patterns
- Memory Caches
- Caching and Hash Tables
- Reference Counts
- Garbage Collection
- Function Pointers and Virtual Function Tables (VFTs)
- goto Statements
- Vector Definitions
- Conditional Directives (#ifdef and family)
- Compile-Time Optimization for Condition Checks
- Mutual Exclusion
- Conversions Between Host and Network Order
- Catching Bugs
- Statistics
- Measuring Time
- User-Space Tools
- + Browsing the Source Code
- When a Feature Is Offered as a Patch
-
+
Critical Data Structures
-
+
User-Space-to-Kernel Interface
- Part II
- + Notification Chains
-
+
Network Device Initialization
- System Initialization Overview
- Device Registration and Initialization
- Basic Goals of NIC Initialization
- + Interaction Between Devices and Kernel
- Initialization Options
- Module Options
- + Initializing the Device Handling Layer: net_dev_init
- + User-Space Helpers
- + Virtual Devices
- Tuning via /proc Filesystem
- Functions and Variables Featured in This Chapter
- Files and Directories Featured in This Chapter
- + The PCI Layer and Network Interface Cards
- + Kernel Infrastructure for Component Initialization
-
+
Device Registration and Initialization
- When a Device Is Registered
- When a Device Is Unregistered
- Allocating net_device Structures
- Skeleton of NIC Registration and Unregistration
- + Device Initialization
- + Organization of net_device Structures
- + Device State
- + Registering and Unregistering Devices
- + Device Registration
- + Device Unregistration
- Enabling and Disabling a Network Device
- + Updating the Device Queuing Discipline State
- + Configuring Device-Related Information fromUserSpace
- Virtual Devices
- Locking
- Tuning via /proc Filesystem
- Functions and Variables Featured in This Chapter
- Files and Directories Featured in This Chapter
- Part III
-
+
Interrupts and Network Drivers
- + Frame Reception
-
+
Frame Transmission
- + General and Reference Material About Interrupts
- + Protocol Handlers
- Part IV
-
+
Bridging: Concepts
-
+
Bridging: The Spanning Tree Protocol
- Basic Terminology
- Example of Hierarchical Switched L2 Topology
- + Basic Elements of the Spanning Tree Protocol
- Bridge and Port IDs
- + Bridge Protocol Data Units (BPDUs)
- + Defining the Active Topology
- + Timers
- + Topology Changes
- BPDU Encapsulation
- Transmitting Configuration BPDUs
- + Processing Ingress Frames
- Convergence Time
- + Overview of Newer Spanning Tree Protocols
-
+
Bridging: Linux Implementation
- Bridge Device Abstraction
- Important Data Structures
- Initialization of Bridging Code
- Creating Bridge Devices and Bridge Ports
- Creating a New Bridge Device
- Bridge Device Setup Routine
- Deleting a Bridge
- + Adding Ports to a Bridge
- Enabling and Disabling a Bridge Device
- Enabling and Disabling a Bridge Port
- Changing State on a Bridge Port
- The Big Picture
- + Forwarding Database
- + Handling Ingress Traffic
- Transmitting on a Bridge Device
- + Spanning Tree Protocol (STP)
- netdevice Notification Chain
- + Bridging: Miscellaneous Topics
- Part V
- + Internet Protocol Version 4 (IPv4): Concepts
-
+
Internet Protocol Version 4 (IPv4): Linux Foundations and Features
- + Internet Protocol Version 4 (IPv4): Forwarding and Local Delivery
-
+
Internet Protocol Version 4 (IPv4): Transmission
-
+
Key Functions That Perform Transmission
- Multicast Traffic
- Relevant Socket Data Structures for Local Traffic
- + The ip_queue_xmit Function
-
+
The ip_append_data Function
- Basic memory allocation and buffer organization for ip_append_data
- Memory allocation and buffer organization for ip_append_data withScatterGather I/O
- Key routines for handling fragmented buffers
- Further handling of the buffers
- Setting the context
- Getting ready for fragment generation
- Copying data into the fragments: getfrag
- Buffer allocation
- Main loop
- L4 checksum
- The ip_append_page Function
- The ip_push_pending_frames Function
- Putting Together the Transmission Functions
- Raw Sockets
- Interface to the Neighboring Subsystem
-
+
Key Functions That Perform Transmission
- + Internet Protocol Version 4 (IPv4): Handling Fragmentation
-
+
Internet Protocol Version 4 (IPv4): Miscellaneous Topics
- + Long-Living IP Peer Information
- Selecting the IP Header’s ID Field
- IP Statistics
- + IP Configuration
- IP-over-IP
- IPv4: What’s Wrong with It?
- Tuning via /proc Filesystem
- + Data Structures Featured in This Part of the Book
- Functions and Variables Featured in This Part oftheBook
- Files and Directories Featured in This Part of the Book
-
+
Layer Four Protocol and Raw IP Handling
-
+
Internet Control Message Protocol (ICMPv4)
- ICMP Header
- ICMP Payload
- + ICMP Types
- + Applications of the ICMP Protocol
- The Big Picture
- Protocol Initialization
- + Data Structures Featured in This Chapter
- + Transmitting ICMP Messages
- + Receiving ICMP Messages
- ICMP Statistics
- Passing Error Notifications to the Transport Layer
- Tuning via /proc Filesystem
- Functions and Variables Featured in This Chapter
- Files and Directories Featured in This Chapter
- Part VI
-
+
Neighboring Subsystem: Concepts
-
+
Neighboring Subsystem: Infrastructure
- Main Data Structures
-
+
Common Interface Between L3 Protocols andNeighboring Protocols
- + General Tasks of the Neighboring Infrastructure
- Reference Counts on neighbour Structures
- + Creating a neighbour Entry
- + Neighbor Deletion
- + Acting As a Proxy
- + L2 Header Caching
- Protocol Initialization and Cleanup
- + Interaction with Other Subsystems
- Interaction Between Neighboring Protocols and L3 Transmission Functions
- + Queuing
-
+
Neighboring Subsystem: Address Resolution Protocol (ARP)
- + ARP Packet Format
- Example of an ARP Transaction
- + Gratuitous ARP
- Responding from Multiple Interfaces
- + Tunable ARP Options
- + ARP Protocol Initialization
- + Initialization of a neighbour Structure
- + Transmitting and Receiving ARP Packets
- + Processing Ingress ARP Packets
- + Proxy ARP
- Examples
- + External Events
- + ARPD
- Reverse Address Resolution Protocol (RARP)
- Improvements in ND (IPv6) over ARP (IPv4)
-
+
Neighboring Subsystem: Miscellaneous Topics
- Part VII
-
+
Routing: Concepts
-
+
Routing: Advanced
- + Routing: Linux Implementation
- + Routing: The Routing Cache
- + Routing: Routing Tables
-
+
Routing: Lookups
- High-Level View of Lookup Functions
- Helper Routines
- + The Table Lookup: fn_hash_lookup
- fib_lookup Function
- + Setting Functions for Reception and Transmission
- General Structure of the Input and Output Routing Routines
- + Input Routing
- + Output Routing
- + Effects of Multipath on Next Hop Selection
- + Policy Routing
- Source Routing
- + Policy Routing and Routing Table Based Classifier
-
+
Routing: Miscellaneous Topics
- Index
If you've ever wondered how Linux carries out the complicated tasks assigned to it by the IP protocols -- or if you just want to learn about modern networking through real-life examples -- Understanding Linux Network Internals is for you.
Like the popular O'Reilly book, Understanding the Linux Kernel, this book clearly explains the underlying concepts and teaches you how to follow the actual C code that implements it. Although some background in the TCP/IP protocols is helpful, you can learn a great deal from this text about the protocols themselves and their uses. And if you already have a base knowledge of C, you can use the book's code walkthroughs to figure out exactly what this sophisticated part of the Linux kernel is doing.
Part of the difficulty in understanding networks -- and implementing them -- is that the tasks are broken up and performed at many different times by different pieces of code. One of the strengths of this book is to integrate the pieces and reveal the relationships between far-flung functions and data structures. Understanding Linux Network Internals is both a big-picture discussion and a no-nonsense guide to the details of Linux networking. Topics include:
Key problems with networking
Network interface card (NIC) device drivers
System initialization
Layer 2 (link-layer) tasks and implementation
Layer 3 (IPv4) tasks and implementation
Neighbor infrastructure and protocols (ARP)
Bridging
Routing
ICMP
Author Christian Benvenuti, an operating system designer specializing in networking, explains much more than how Linux code works. He shows the purposes of major networking features and the trade-offs involved in choosing one solution over another. A large number of flowcharts and other diagrams enhance the book's understandability.
Test the closed alpha on paperc.com
Book Details
Authors
Categories
Computers > Operating Systems > Linux
Publishers
Publication year : 2008
License: All rights reserved ©
Times read: 803

