没有合适的资源?快使用搜索试试~ 我知道了~
understanding-linux-network-internals.pdf
1星 需积分: 26 13 下载量 41 浏览量
2020-11-10
13:23:16
上传
评论
收藏 18.17MB PDF 举报
温馨提示
试读
1052页
understanding-linux-network-internals understanding-linux-network-internals understanding-linux-network-internals 学习资料
资源详情
资源评论
资源推荐
Understanding Linux Network Internals
Table of Contents
Preface......................................................................................................................................................1
The Audience for This Book.............................................................................................................1
Background Information...................................................................................................................2
Organization of the Material.............................................................................................................2
Conventions Used in This Book......................................................................................................15
Using Code Examples.....................................................................................................................16
We'd Like to Hear from You...........................................................................................................17
Safari Enabled.................................................................................................................................18
Acknowledgments...........................................................................................................................19
Part I: General Background............................................................................................................................39
Chapter 1. Introduction..........................................................................................................................54
1.1. Basic Terminology...................................................................................................................55
1.2. Common Coding Patterns........................................................................................................55
1.3. User-Space Tools.....................................................................................................................57
1.4. Browsing the Source Code.......................................................................................................64
1.5. When a Feature Is Offered as a Patch......................................................................................67
Chapter 2. Critical Data Structures........................................................................................................68
2.1. The Socket Buffer: sk_buff Structure........................................................................................1
2.2. net_device Structure...................................................................................................................2
2.3. Files Mentioned in This Chapter................................................................................................2
Chapter 3. User-Space-to-Kernel Interface..............................................................................................3
3.1. Overview....................................................................................................................................4
3.2. procfs Versus sysctl....................................................................................................................5
3.3. ioctl.............................................................................................................................................6
3.4. Netlink........................................................................................................................................7
3.5. Serializing Configuration Changes............................................................................................9
Part II: System Initialization.............................................................................................................................9
Chapter 4. Notification Chains................................................................................................................9
4.1. Reasons for Notification Chains...............................................................................................10
4.2. Overview..................................................................................................................................10
4.3. Defining a Chain......................................................................................................................11
4.4. Registering with a Chain..........................................................................................................12
4.5. Notifying Events on a Chain....................................................................................................13
4.6. Notification Chains for the Networking Subsystems...............................................................18
4.7. Tuning via /proc Filesystem.....................................................................................................18
4.8. Functions and Variables Featured in This Chapter..................................................................19
4.9. Files and Directories Featured in This Chapter........................................................................21
Chapter 5. Network Device Initialization..............................................................................................24
5.1. System Initialization Overview................................................................................................27
5.2. Device Registration and Initialization......................................................................................28
5.3. Basic Goals of NIC Initialization.............................................................................................29
5.4. Interaction Between Devices and Kernel.................................................................................29
5.5. Initialization Options................................................................................................................30
5.6. Module Options........................................................................................................................31
5.7. Initializing the Device Handling Layer: net_dev_init..............................................................33
5.8. User-Space Helpers..................................................................................................................33
5.9. Virtual Devices.........................................................................................................................35
5.10. Tuning via /proc Filesystem...................................................................................................37
5.11. Functions and Variables Featured in This Chapter................................................................37
5.12. Files and Directories Featured in This Chapter......................................................................37
Understanding Linux Network Internals
i
Table of Contents
Part II: System Initialization
Chapter 6. The PCI Layer and Network Interface Cards.......................................................................38
6.1. Data Structures Featured in This Chapter................................................................................38
6.2. Registering a PCI NIC Device Driver......................................................................................43
6.3. Power Management and Wake-on-LAN..................................................................................46
6.4. Example of PCI NIC Driver Registration................................................................................50
6.5. The Big Picture.........................................................................................................................53
6.6. Tuning via /proc Filesystem.....................................................................................................56
6.7. Functions and Variables Featured in This Chapter..................................................................56
6.8. Files and Directories Featured in This Chapter........................................................................57
Chapter 7. Kernel Infrastructure for Component Initialization.............................................................57
7.1. Boot-Time Kernel Options.......................................................................................................58
7.2. Module Initialization Code.......................................................................................................59
7.3. Optimized Macro-Based Tagging............................................................................................59
7.4. Boot-Time Initialization Routines............................................................................................62
7.5. Memory Optimizations.............................................................................................................63
7.6. Tuning via /proc Filesystem.....................................................................................................68
7.7. Functions and Variables Featured in This Chapter..................................................................70
7.8. Files and Directories Featured in This Chapter........................................................................72
Chapter 8. Device Registration and Initialization..................................................................................77
8.1. When a Device Is Registered...................................................................................................78
8.2. When a Device Is Unregistered................................................................................................81
8.3. Allocating net_device Structures..............................................................................................83
8.4. Skeleton of NIC Registration and Unregistration....................................................................87
8.5. Device Initialization.................................................................................................................91
8.6. Organization of net_device Structures.....................................................................................92
8.7. Device State..............................................................................................................................93
8.8. Registering and Unregistering Devices....................................................................................93
8.9. Device Registration..................................................................................................................94
8.10. Device Unregistration...............................................................................................................1
8.11. Enabling and Disabling a Network Device..............................................................................2
8.12. Updating the Device Queuing Discipline State........................................................................2
8.13. Configuring Device-Related Information from User Space.....................................................3
8.14. Virtual Devices.........................................................................................................................7
8.15. Locking...................................................................................................................................29
8.16. Tuning via /proc Filesystem...................................................................................................32
8.17. Functions and Variables Featured in This Chapter................................................................33
8.18. Files and Directories Featured in This Chapter......................................................................34
Part III: Transmission and Reception............................................................................................................34
Chapter 9. Interrupts and Network Drivers............................................................................................34
9.1. Decisions and Traffic Direction...............................................................................................40
9.2. Notifying Drivers When Frames Are Received.......................................................................46
9.3. Interrupt Handlers.....................................................................................................................49
9.4. softnet_data Structure...............................................................................................................59
Chapter 10. Frame Reception................................................................................................................60
10.1. Interactions with Other Features............................................................................................60
10.2. Enabling and Disabling a Device...........................................................................................77
10.3. Queues....................................................................................................................................78
10.4. Notifying the Kernel of Frame Reception: NAPI and netif_rx..............................................79
10.5. Old Interface Between Device Drivers and Kernel: First Part of netif_rx.............................80
10.6. Congestion Management........................................................................................................81
Understanding Linux Network Internals
ii
Table of Contents
Part III: Transmission and Reception
10.7. Processing the NET_RX_SOFTIRQ: net_rx_action..............................................................82
Chapter 11. Frame Transmission...........................................................................................................82
Figure 11-1. Scheduling a device: (a) for reception (RX); (b) for transmission (TX)....................89
11.1. Enabling and Disabling Transmissions..................................................................................94
Chapter 12. General and Reference Material About Interrupts.............................................................95
12.1. Statistics..................................................................................................................................97
12.2. Tuning via /proc and sysfs Filesystems................................................................................109
12.3. Functions and Variables Featured in This Part of the Book.................................................109
12.4. Files and Directories Featured in This Part of the Book......................................................110
Chapter 13. Protocol Handlers.................................................................................................................1
13.1. Overview of Network Stack.....................................................................................................1
13.2. Executing the Right Protocol Handler......................................................................................1
13.3. Protocol Handler Organization.................................................................................................3
13.4. Protocol Handler Registration..................................................................................................4
13.5. Ethernet Versus IEEE 802.3 Frames........................................................................................4
13.6. Tuning via /proc Filesystem.....................................................................................................6
13.7. Functions and Variables Featured in This Chapter..................................................................6
13.8. Files and Directories Featured in This Chapter........................................................................9
Part IV: Bridging..............................................................................................................................................13
Chapter 14. Bridging: Concepts.............................................................................................................14
14.1. Repeaters, Bridges, and Routers.............................................................................................15
14.2. Bridges Versus Switches........................................................................................................17
14.3. Hosts.......................................................................................................................................23
14.4. Merging LANs with Bridges..................................................................................................27
14.5. Bridging Different LAN Technologies..................................................................................31
14.6. Address Learning...................................................................................................................37
14.7. Multiple Bridges.....................................................................................................................43
Chapter 15. Bridging: The Spanning Tree Protocol..............................................................................47
15.1. Basic Terminology.................................................................................................................49
15.2. Example of Hierarchical Switched L2 Topology...................................................................50
15.3. Basic Elements of the Spanning Tree Protocol......................................................................52
15.4. Bridge and Port IDs................................................................................................................53
15.5. Bridge Protocol Data Units (BPDUs)....................................................................................56
15.6. Defining the Active Topology................................................................................................57
15.7. Timers.....................................................................................................................................61
15.8. Topology Changes..................................................................................................................62
15.9. BPDU Encapsulation..............................................................................................................63
15.10. Transmitting Configuration BPDUs.....................................................................................63
15.11. Processing Ingress Frames...................................................................................................64
15.12. Convergence Time...............................................................................................................65
15.13. Overview of Newer Spanning Tree Protocols......................................................................65
Chapter 16. Bridging: Linux Implementation........................................................................................68
16.1. Bridge Device Abstraction.....................................................................................................69
16.2. Important Data Structures......................................................................................................70
16.3. Initialization of Bridging Code...............................................................................................71
16.4. Creating Bridge Devices and Bridge Ports.............................................................................73
16.5. Creating a New Bridge Device...............................................................................................75
16.6. Bridge Device Setup Routine.................................................................................................80
16.7. Deleting a Bridge....................................................................................................................80
16.8. Adding Ports to a Bridge........................................................................................................90
Understanding Linux Network Internals
iii
剩余1051页未读,继续阅读
jizhiming666
- 粉丝: 0
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- onenet_chongwukanhu_v06.apk
- 2022NOC软件创意编程赛项真题C++初中-决赛(有解析)
- 2022NOC软件创意编程赛项真题python初中-决赛(有解析)
- openLayer-本地数据加载 (day5)
- A题-正弦信号发生器.xdf
- 2022NOC软件创意编程赛项真题python小学高年级-决赛(有解析)
- mathml转换latex需要的xsl文件
- 2022NOC软件创意编程赛项真题图形化小学高年级-决赛(有解析)
- gbase驱动下载gbase-connector-java-8.3.81.53驱动下载
- 2022NOC软件创意编程赛项真题图形化小学低年级-决赛(有解析)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1