understandinglinuxnetworkinternals
about linux kernel network protocol implementation detail.Understanding linux Network InternalsTable of contentsPrefaceThe Audience for This book.Background Information.Organization of the material.Conventions used in This book15Using Code examples16Wed Like to hear from you17Safari enabled18Acknowledgments19Part I: General Background……39Chapter 1 Introduction.541. 1. Basic Terminology.1. 2. Common Coding1.3. User-Space571. 4. Browsing the Source code641.5. When a Feature Is offered as a patch67Chapter 2. Critical Data Structures.682.1. The Socket buffer: sk buff Structure2.2. net device structure.2.3. Files mentioned in This Chapter…..,…Chapter3.User- Space-to- Kernel interface...….….….…….…….….33.1. Overview.……3.2. procfs Versus sysctl.…….….…,…,…,…,……33. ioctL4. Netlink3.5. Serializing Configuration ChangesPart Ic: System Initialization.,,,…,…9Chapter4. Notification chains...….….….…..…..941. Reasons for notification chains音。垂,垂垂1042. Overview104.3. Defining a Chain..........4. 4. Registering with a Chain........4,4,在击124.5. Notifying Events on a134.6. Notification Chains for the Networking Subsystems………84.7. Tuning via/ proc Filesystem.....,.….……184.8.上 unctions and v ariables Featured in This Chapter.………,……,…….……,194.9. Files and directories Featured in This chapter21Chapter5. Network device initialization.………245.1. System Initialization Overview275.2. Device Registration and Initialization............................285,3. Basic Goals of nic initialization.295.4. Interaction Between Devices and Kernel.295.5. Initialization Options······*:305.6. Module options5.7. Initializing the Device Handling Layer: net_dev_init.......335.8. User-Space Helpers.335.9. Virtual Devices355.10. Tuning via /proc Filesystem.375. 11. Functions and Variables Featured in This Chapter..............................375. 12. Files and Directories Featured in This Chapter37Understanding Linux Network InternalsTable of contentsPart ll: System InitializationChapter 6. The PCI Layer and Network Interface Cards.386. 1. Data Structures Featured in This Chapter......386.2. Registering a PCi nic Device driver...436.3. Power Management and Wake-on-LAN………………2466. 4. Example of PCI NIC Driver Registration506.5 The big picture6.6. Tuning via /proc Filesystem6.7. Functions and Variables Featured in This Chapter6.8. Files and Directories Featured in This Chapter7Chapter 7. Kernel Infrastructure for Component Initialization577.1. Boot-Time Kernel Options587. 2. Module initialization Code597.3. Optimized Macro-Based Tagging7. 4. Boot-Time Initialization routines7.5. Memory Optimizations..637.6. Tuning via/proc Filesystem687.7. Functions and Variables Featured in This Chapter........707.8. Files and Directories Featured in This Chapter72Chapter 8 Device Registration and initialization··.778. 1. When a device is registered788. 2. When a device ls unregistered...ww818.3. Allocating8.4. Skeleton of nic registration and unregistration878.5. Device initialization8.6. Organization of net device Structures8.7. Device state938.8. Registering and unregistering devices…………………………………938.9. Device registration948.10. Device unregistration8.11. Enabling and disabling a Network device28.12. Updating the Device Queuing Discipline State........28.13. Configuring Device- Related Information from User Space.………,8. 14. Virtual devices8. 15. Locking98.16. Tuning via/proc Filesystem328. 17. Functions and Variables Featured in This Chapter.8.18. Files and Directories Featured in This Chapter.……,…,…,,Part l: Transmission and reception..,..,…………,34Chapter 9 Interrupts and Network drivers.349.1. Decisions and Traffic Direction9.2. Notifying Drivers When Frames Are Received469.3. Interrupt handlers4994. softnet data Structure59Chapter 10. Frame Reception............................6010.I. Interactions with other Features6010.2. Enabling and Disabling a Device.7710.3. Queues........,…7810.4. Notifying the Kernel of Frame Reception: NAPI and netif_rx7910.5. Old Interface Between Device Drivers and Kernel: First Part of netif rx ..........................8010.6. Congestion Management81Understanding linux Network InternalsTable of contentsPart Ill: Transmission and reception10.7. Processing the NET_RX_ soFtirQ: net_rx_action82Chapterll.FrameTransmisson......,.,…Figure 11-1. Scheduling a device:(a) for reception(RX);(b)for transmission(TX).2911. 1. Enabling and Disabling Transmissions.94Chapter 12. General and Reference Material about Interrupts.12.1. Statistics9712.2. Tuning via/proc and sysfs Filesystems.109123. Functions and v ariables featured in This part of the book100912. 4. Files and Directories featured in This part of the book.110Chapter 13. Protocol Handlers13. 1. Overview of Network Stack13.2. Executing the Right Protocol Handler.……13.3. Protocol Handler Organization...........13. 4. Protocol handler registration.135. Ethernet versus ieee 802. 3 frames44,13.6. Tuning via/ proc Filesystem....,…,…13.7. Functions and Variables Featured in This Chapter.13. 8. Files and Directories Featured in This Chapter.Part Iv: Bridging.…,,,,,,..,,...,,,.,,.…,,,13Chapter I4. Bridging: Concepts..,…,,…,…,…,…,…,,………….…1-414.1. Repeaters, Bridges, and Routers......1514.2. Bridges versus switches17143. Hosts23144. Merging lans with bridges......,.,…,.,,,…,…,…,…,…,…………………….2714.5. Bridging Different LAN Technologies3114.6. Address learning…,,…3714.7. Multiple brid43Chapter 15. Bridging: The Spanning Tree15.1. Basic Terminology....,…,………音。垂,垂垂4915.2. Example of Hierarchical Switched L2 Topolog ).5015.3. Basic elements of the Spanning Tree F' rotocol-…..…,…,…,,…,…………,…….5215. 4. Bridge and Port ids4,4,在击5315.5. Bridge Protocol Data Units (BPdUs5615.6. Defining the Active Topology.5715.7. Timers6115.8. Topology changes6215.9. BPDU Encapsulation15.10. Transmitting Configuration BPDUS..,.,.,…,…,…6315.11. Processing Ingress Frames15.12 Convergence Time.............6515.13. Overview of Newer Spanning Tree ProtocolsChapter 16. Bridging: Linux Implementation.....16. 1. Bridge Device abstraction.······*:6916.2. Important Data Structures.16.3. Initialization of Bridging Code16. 4. Creating bridge devices and bridge ports7316.5. Creating a new bridge device.....….….….….….….….….….……7516.6. Bridge Device Setup routine.8016.7. Deleting a bridge8016.8. Adding Ports to a bridge90Understanding Linux Network InternalsTable of contentsPart IV: Bridging16.9. Enabling and Disabling a bridge device9116.10. Enabling and Disabling a Bridge Port16.11 Changing State on a Bridge Port816. 12. The Big Picture16.13 Forwarding database10016.14 Handling Ingress Traffic...10016.15. Transmitting on a Bridge Device10516.16 Spanning Tree Protocol (STP)10716.17. netdevice Notification Chain··..··Chapter 17. Bridging: Miscellaneous Topics17.1. User-Space Configuration Tools17. 2. Tuning via/proc Filesystem17.3. Tuning via /sys Filesystem.17. 4. Statistics1317.5 Data Structures Featured in This part of the book2317.6. Functions and variables featured in This part of the book917.7. Files and Directories Featured in This Part of the Book.29Part V: Internet Protocol Version 4(IPv4).13Chapter18. Internet Protocol version4(IPV4): Concepts…………4218.1. IP Protocol: The Big Picture………………5318.2. IP Header. .............................................................................................................5318.3. IP Options18.4. Packet Fragmentation/Defragmentation.6018. 5. Checksums61Chapter 19. Internet Protocol Version 4(IPv4) Linux Foundations and Features.619.1. Main IPv4 Data structures9619.2. General Packet handling……19.3. IP Options...,,…,…,…105Chapter20. Internet protocol version4(IPV4) Forwarding and local delivery……………11820.1. Forwarding....11820.2. Local Delivery.…...,.……,….………,…,…,…,………………122Chapter 21. Internet Protocol Version 4(Pv4): Transmission12321.1. Key functions That Perform transmission12721.2. Interface to the Neighboring Subsystem.133Chapter22. Internet protocol version4(IPv4): Handling Fragmentation…………………1332.1. IP Fragmentation..,.,.,.,.,.,…,…,13522.2. IP Defragmentation垂音B音b138Chapter23. Internet protocol version4(lPv4): Miscellaneous Topics……………垂垂垂14823.1. Long-Living IP Peer Information1523. 2. Selecting the IP Header's ID Field……,……….15223.3. IP Statistics15223.4. IP Configuration .,.................15423.5. IP-over-IP15823.6. IPv4: What's Wrong with It?23.7. Tuning via /proc23. 8. Data structures featured in This part of the book16623.9. Functions and variables featured in This Part of the book16723.10. Files and Directories Featured in This Part of the book..168Chapter 24 Layer Four Protocol and Raw IP handlin168241. Available l4 protocols170Understanding linux Network InternalsTable of contentsPart V: Internet Protocol Version 4(Pv4)24.2.L4 Protocol registration17124.3. L3 to L4 Delivery: ip_local_deliver_finish...…18124. 4. IPv4 Versus IPv618424.5. Tuning via/proc Filesystem.∴18524.6. Functions and Variables Featured in This Chapter18624.7. Files and Directories Featured in This Chapter.188Chapter 25. Internet Control Message Protocol(ICMPv4)20625. 1. ICMP Header20825. 2. ICMP Payload20925.3. ICMP Types25.4. Applications of the ICMP ProtocoL.21125.5. The Big Picture…25.6. Protocol initialization25.7. Data Structures Featured in This Chapter.…,……,…2.5.8. Transmitting ICMP Messages25.9. ICMP Statistics25.10 Passing Error Notifications to the Transport Layer.............135.11. Tuning via/ proc Filesystem...….….….…..…….….….….1525. 12. Functions and Variables Featured in This Chapter.....1825.13 Files and Directories Featured in This Chapter.....6Part VI: Neighboring Subsystem.eee6Chapter 26. Neighboring Subsystem: Concepts26. 1. What Is a neighbor?“··4126.2. Reasons That Neighboring Protocols Are Needed.26.3. Linux Implementation.4626.4. Proxying the Neighboring Protocol…………4826.5. When Solicitation Requests Are Transmitted and Processed.....5426.6. Neighbor States and Network Unreachability Detection (NUD)158Chapter27. Neighboring Subsystem: Infrastructure.…….….….…..….….….….…….……..6127.1. Main Data structures6327.2. Common Interface Between l3 Protocols and Neighboring protocols .....,........ 6627.3. Gencral Tasks of the Neighboring Infrastructure4,4,在击16927.4. Reference Counts on neighbour Structures. ....................................7227.5. Creating a neighbour Entry27.6. Neighbor Deletion.……………7527.7. Acting As a Proxy………………,…27.8. L2 Header Caching音,垂日面奋8027.9. Protocol Initialization and Cleanup……,…,…,…,…,…,…,…,…,…,…,………8127.10. Interaction with Other Subsystems.8727. 11. Interaction Between Neighboring Protocols and l3 Transmission Functions.......9027.12.QuLeuingChapter 28. Neighboring Subsystem: Address Resolution Protocol(ARP).......9928.1. ARP Packet Format······*:10728.2. Example of an ARP Transaction28. 3. Gratuitous ARPl1428.4. Responding from Multiple interfaces11528.5. Tunable ARP Options...........,.,,…,……………,11728.6. ARP Protocol Initialization11928.7. Initialization of a neighbour Structure…11928.8. Transmitting and Receiving ARP Packetsl19Understanding Linux Network InternalsTable of contentsPart VI: Neighboring Subsystem28.9. Processing Ingress ARP Packets.12328.10. Proxy are.…...……,……12928.11. xamples.…15128.12 External events28.13.ARPD228 14. Reverse Address Resolution Protocol (RARP)28.15. Improvements in ND(IPv6)over ARP (IPv4)Chapter 29. Neighboring Subsystem: Miscellaneous Topics29.1. System Administration of Neighbors……………29.2. Tuning via/proc Filesystem.23293. Data Structures Featured in This part of the Book2629. 4. Files and Directories Featured in This Part of the book.27Part vIl: Routing.....Chapter 30 Routing: Concepts....34Figure 30-1. Relationship between the routing subsystem and the other main networksubsystems4030.1. Routers, Routes, and Routing tables.4430.2. Essential Elements of routing··30.3. Routing table4730.4. Lookups……5230.5. Packet Reception Versus Packet Transmission53Chapter 31. Routing: Ac垂垂量5431.1. Concepts Behind Policy Routing....5731.2. Concepts Behind Multipath Routing....,…,,…,,……6131.3. Interactions with Other Kernel subsystems.6431.4. Routing protocol daemons6531.5. Verbose monitoring6731.6. ICMP REDIRECT Messages.…6831.7. Reverse path FilteringChapter 32. Routing: Li nux Implementation.8332.1. Kernel options.………………….8532.2. Main Data structures.8532.3. Route and Address scopes8632.4. Primary and Secondary IP Addresses..8732.5. Generic Helper Routines and Macros..,,………………………932.6. Global Locksl0132.7. Routing Subsystem Initialization.10632.8. Extenal Events垂垂垂l0832.9. Interactions with Other Subsystems....117Chapter 33. Routing: The routing Cache833.1. Routing Cache initialization11833. 2. Hash Table organization12533.3. Major Cache Operations126334. Multipath Cachin......….…..…….….….…..13133.5. Interface between the dst and calling protocols13233.6. Flushing the Routing Cache…13333.7. Garbage collection…13333. 8. Egress ICMP redirect Rate limiting.134Chapter34. Routing;: Routing tables.………14034.1. Organization of routing Hash tables.……140Understanding linux Network InternalsTable of contentsPart vIl: routing34.2. Routing Table initialization.14434.3. Adding and Removing routes14534 4. Policy routing and its effects on routing table definitions154Chapter35. Routing: Lookups…………16235.1. High-Level View of Lookup Functions16535.2. Helper Routines166353. The table lookup: fn_hash_lookup.………1683.5.4. fib_lookup Function17135.5. Setting Functions for Reception and Transmission.……,…,…,…,…,…,…,…,…,…,…,,….…,.,17135.6. General Structure of the Input and Output Routing Routines........17735.7. Input Routing17835.8. Output Routing18935.9. Effects of Multipath on Next Hop Selection.19135.10. Policy routing……………21535.11 Source routing1935.12 Policy Routing and Routing Table Based Classifier220Chapter 36. Routing: Miscellaganeous Topi2036. 1. User-Space Configuration Tools..22036.2. Statistics22336.3. Tuning via/ proc Filesystem.………22836.4. Enabling and disabling上 forwarding.………,…,…,…,…,…,…,…,…………,…,…,……23036.5, Data structures featured in this part of the book23536.6. Functions and variables featured in This part of the book23636.7. Files and directories featured in this part of the book241242244Index2552566262IndexIndex275ndex276Index283·;····4········..;··;·······“.:·288Index292IndexIndex294Index295Index295Index.…… titlendexitleIndextitlendex着垂垂垂垂titleIndextitleIndex…itletitleIndex.IndextitleUnderstanding linux Network Internals
下载地址
用户评论
这个不好,特别是很多有破折号的地方都使空的,使得很多词连起来了。