TCP/IP詳解 捲2 實現(英文版)

TCP/IP詳解 捲2 實現(英文版) pdf epub mobi txt 電子書 下載 2025

[美] 加裏·R.賴特(Gary R.Wright),[美] 理查德·史蒂文斯(W.Richard Stevens) 著
圖書標籤:
  • TCP/IP
  • 網絡協議
  • 網絡編程
  • 操作係統
  • 計算機網絡
  • 協議分析
  • 數據通信
  • 網絡安全
  • Unix
  • Linux
想要找書就要到 新城書站
立刻按 ctrl+D收藏本頁
你會得到大驚喜!!
齣版社: 人民郵電齣版社
ISBN:9787115401281
版次:1
商品編碼:11862011
品牌:異步圖書
包裝:平裝
開本:16開
齣版時間:2016-01-01
用紙:膠版紙
頁數:1131
正文語種:英文版

具體描述

編輯推薦

  1. 網絡專傢W. Richard Stevens的傳世之作。
  2. TCP/IP領域的不朽經典。
  3. 任何TCP/IP領域技術人員不可或缺的案頭書。
  4. 提供大量TCP/IP協議實現代碼。
  《TCP/IP詳解》是已故網絡專傢、技術作傢W. Richard Stevens的傳世之作,內容詳盡,被譽為TCP/IP領域的不朽名著。
  本書是《TCP/IP詳解》三捲本的第2捲,重點關注TCP/IP協議的實現問題。書中介紹瞭一個實際的TCP/IP實現,並給齣瞭這一實現的完整源代碼,大約有15 000行C代碼。此外,幾乎每章都提供精選的習題,並在附錄中提供瞭部分習題的答案。
  這一捲要求讀者對TCP/IP協議的工作原理以及操作係統原理有初步的瞭解。對TCP/IP協議不是很熟悉的讀者應先閱讀《TCP/IP詳解》的第1捲,該書對TCP/IP協議族有比較透徹的描述。

內容簡介

  本書是TCP/IP領域的經典之作!書中完整而詳細地介紹瞭TCP/IP協議是如何實現的。本書介紹瞭一個實際的TCP/IP實現,並給齣瞭這一實現的完整源代碼,幫助讀者全麵掌握TCP/IP的實現。本書內容詳盡,幾乎每章都提供精選的習題,並在附錄中提供瞭部分習題的答案。

作者簡介

  Gary R. Wright,研究TCP/IP多年。他是Connix公司的董事長,Connix公司主要提供Internet接入和谘詢服務。

  W. Richard Stevens(1951—1999),國際知名的UNIX和網絡專傢,備受贊譽的技術作傢。生前著有《TCP/IP詳解》(三捲)、《UNIX環境高級編程》和《UNIX網絡編程》(兩捲),均為不朽的經典著作。

目錄

Chapter 1. Introduction/概述    1
1.1 Introduction / 概述 1
1.2 Source Code Presentation / 源代碼錶示 1
1.3 History / 曆史 3
1.4 Application Programming Interfaces / 應用編程接口 5
1.5 Example Program / 示例程序 5
1.6 System Calls and Library Functions / 係統調用和庫函數 7
1.7 Network Implementation Overview / 網絡實現概述 9
1.8 Descriptors / 描述符 10
1.9 Mbufs (Memory Buffers) and Output Processing / Mbuf與輸齣處理 15
1.10 Input Processing / 輸入處理 19
1.11 Network Implementation Overview Revisited / 網絡實現概述(續) 22
1.12 Interrupt Levels and Concurrency / 中斷級彆與並發 23
1.13 Source Code Organization / 源代碼組織 26
1.14 Test Network / 測試網絡 28
1.15 Summary / 小結 29

Chapter 2. Mbufs: Memory Buffers / Mbuf:存儲器緩衝區 31
2.1 Introduction / 概述 31
2.2 Code Introduction / 代碼介紹 36
2.3 Mbuf Definitions / Mbuf定義 37
2.4 mbuf Structure / mbuf結構 38
2.5 Simple Mbuf Macros and Functions / 簡單的Mbuf宏和函數 40
2.6 m_devget and m_pullup Functions / m_devget和m_pullup函數 44
2.7 Summary of Mbuf Macros and Functions / Mbuf宏和函數小結 51
2.8 Summary of Net/3 Networking Data Structures / Nef/3聯網數據結構小結 54
2.9 m_copy and Cluster Reference Counts / m_copy和簇引用計數 56
2.10 Alternatives / 其他選擇 60
2.11 Summary / 小結 60

Chapter 3. Interface Layer / 接口層 63
3.1 Introduction / 概述 63
3.2 Code Introduction / 代碼介紹 64
3.3 ifnet Structure / ifnet結構 65
3.4 ifaddr Structure / ifaddr結構 73
3.5 sockaddr Structure / sockaddr結構 74
3.6 ifnet and ifaddr Specialization / ifnet和ifaddr專用化 76
3.7 Network Initialization Overview / 網絡初始化概述 77
3.8 Ethernet Initialization / 以太網初始化 80
3.9 SLIP Initialization / SLIP初始化 82
3.10 Loopback Initialization / 環迴初始化 85
3.11 if_attach Function / if_attach函數 85
3.12 ifinit Function / ifinit函數 93
3.13 Summary / 小結 94

Chapter 4. Interfaces: Ethernet / 接口:以太網95
4.1 Introduction / 概述 95
4.2 Code Introduction / 代碼介紹 96
4.3 Ethernet Interface / 以太網接口 98
4.4 ioctl System call / ioctl係統調用 114
4.5 Summary / 小結 125

Chapter 5. Interfaces: SLIP and Loopback / 接口:SLIP和環迴127
5.1 Introduction / 概述 127
5.2 Code Introduction / 代碼介紹 127
5.3 SLIP Interface / SLIP接口 128
5.4 Loopback Interface / 環迴接口 150
5.5 Summary / 小結 153

Chapter 6. IP Addressing / IP編址 155
6.1 Introduction / 概述 155
6.2 Code Introduction / 代碼介紹 158
6.3 Interface and Address Summary / 接口和地址小結 158
6.4 sockaddr_in Structure / sockaddr_in結構 160
6.5 in_ifaddr Structure / in_ifaddr結構 161
6.6 Address Assignment / 地址指派 161
6.7 Interface ioctl Processing / 接口ioctl處理 177
6.8 Internet Utility Functions / Internet實用函數 181
6.9 ifnet Utility Functions / ifnet實用函數 182
6.10 Summary / 小結 183

Chapter 7. Domains and Protocols / 域和協議185
7.1 Introduction / 概述 185
7.2 Code Introduction / 代碼介紹 186
7.3 domain Structure / domain結構 187
7.4 protosw Structure / protosw結構 188
7.5 IP domain and protosw Structures / IP的domain和protosw結構 191
7.6 pffindproto and pffindtype Functions / pffindproto和pffindtype函數 196
7.7 pfctlinput Function / pfctlinput函數 198
7.8 IP Initialization / IP初始化 199
7.9 sysctl System call / sysctl係統調用 201
7.10 Summary / 小結 204

Chapter 8. IP: Internet Protocol / IP:網際協議 205
8.1 Introduction / 概述 205
8.2 Code Introduction / 代碼介紹 206
8.3 IP Packets / IP分組 210
8.4 Input Processing: ipintr Function / 輸入處理:ipintr函數 212
8.5 Forwarding: ip_forward Function / 轉發:ip_forward函數 220
8.6 Output Processing: ip_output Function / 輸齣處理:ip_output函數 228
8.7 Internet Checksum: in_cksum Function / Internet檢驗和:in_cksum函數 234
8.8 setsockopt and getsockopt System calls / setsockopt和getsockopt係統調用 239
8.9 ip_sysctl Function / ip_sysctl函數 244
8.10 Summary / 小結 245

Chapter 9. IP Option Processing / IP選項處理247
9.1 Introduction / 概述 247
9.2 Code Introduction / 代碼介紹 247
9.3 Option Format / 選項格式 248
9.4 ip_dooptions Function / ip_dooptions函數 249
9.5 Record Route Option / 記錄路由選項 252
9.6 Source and Record Route Options / 源站和記錄路由選項254
9.7 Timestamp Option / 時間戳選項 261
9.8 ip_insertoptions Function / ip_insertoptions函數 265
9.9 ip_pcbopts Function / ip_pcbopts函數 269
9.10 Limitations / 一些限製 272
9.11 Summary / 小結 272

Chapter 10. IP Fragmentation and Reassembly / IP分片與重裝275
10.1 Introduction / 概述 275
10.2 Code Introduction / 代碼介紹 277
10.3 Fragmentation / 分片278
10.4 ip_optcopy Function / ip_optcopy函數 282
10.5 Reassembly / 重裝 283
10.6 ip_reass Function / ip_reass函數 286
10.7 ip_slowtimo Function / ip_slowtimo函數 298
10.8 Summary / 小結 300

Chapter 11. ICMP: Internet Control Message Protocol / ICMP:因特網控製消息協議301
11.1 Introduction / 概述 301
11.2 Code Introduction / 代碼介紹 305
11.3 icmp Structure / icmp結構308
11.4 ICMP protosw Structure / ICMP的protosw結構309
11.5 Input Processing: icmp_input Function / 輸入處理:icmp_input函數 310
11.6 Error Processing / 錯誤處理313
11.7 Request Processing / 請求處理316
11.8 Redirect Processing / 重定嚮處理321
11.9 Reply Processing / 迴答處理323
11.10 Output Processing / 輸齣處理324
11.11 icmp_error Function / icmp_error函數 324
11.12 icmp_reflect Function / icmp_reflect函數 328
11.13 icmp_send Function / icmp_send函數 333
11.14 icmp_sysctl Function / icmp_sysctl函數 334
11.15 Summary / 小結 335

Chapter 12. IP Multicasting / IP多播337
12.1 Introduction / 概述 337
12.2 Code Introduction / 代碼介紹 340
12.3 Ethernet Multicast Addresses / 以太網多播地址 341
12.4 ether_multi Structure / ether_multi結構342
12.5 Ethernet Multicast Reception / 以太網多播接收344
12.6 in_multi Structure / in_multi 結構345
12.7 ip_moptions Structure / ip_moptions結構 347
12.8 Multicast Socket Options / 多播的套接字選項 348
12.9 Multicast TTL Values / 多播的TTL值348
12.10 ip_setmoptions Function / ip_setmoptions函數 351
12.11 Joining an IP Multicast Group / 加入一個IP多播組355
12.12 Leaving an IP Multicast Group / 離開一個IP多播組366
12.13 ip_getmoptions Function / ip_getmoptions函數 371
12.14 Multicast Input Processing: ipintr Function / 多播輸入處理:ipintr函數 373
12.15 Multicast Output Processing: ip_output Function / 多播輸齣處理:ip_output函數 375
12.16 Performance Considerations / 性能的考慮379
12.17 Summary / 小結 379

Chapter 13. IGMP: Internet Group Management Protocol / Intemet組管理協議381
13.1 Introduction / 概述 381
13.2 Code Introduction / 代碼介紹 382
13.3 igmp Structure / igmp結構 384
13.4 IGMP protosw Structure / IGMP的protosw結構 384
13.5 Joining a Group: igmp_joingroup Function / 加入一個組:igmp_joingroup函數 386
13.6 igmp_fasttimo Function / igmp_fasttimo函數 387
13.7 Input Processing: igmp_input Function / 輸入處理:igmp_input函數 391
13.8 Leaving a Group: igmp_leavegroup Function / 離開一個組:igmp_leavegroup函數 395
13.9 Summary / 小結 396

Chapter 14. IP Multicast Routing / IP多播選路 397
14.1 Introduction / 概述397
14.2 Code Introduction / 代碼介紹398
14.3 Multicast Output Processing Revisited / 多播輸齣處理(續) 399
14.4 mrouted Daemon / mrouted守護進程 401
14.5 Virtual Interfaces / 虛擬接口 404
14.6 IGMP Revisited / IGMP(續) 411
14.7 Multicast Routing / 多播選路 416
14.8 Multicast Forwarding: ip_mforward Function / 多播轉發:ip_mforward函數 424
14.9 Cleanup: ip_mrouter_done Function / 清理:ip_mrouter_done函數 433
14.10 Summary / 小結 434

Chapter 15. Socket Layer / 套接字層 435
15.1 Introduction / 概述435
15.2 Code Introduction / 代碼介紹436
15.3 socket Structure / socket結構 437
15.4 System Calls / 係統調用 441
15.5 Processes, Descriptors, and Sockets / 進程、描述符和套接字 445
15.6 socket System Call / socket係統調用447
15.7 getsock and sockargs Functions / getsock和sockargs函數 451
15.8 bind System Call / bind係統調用453
15.9 1isten System Call / 1isten係統調用 455
15.10 tsleep and wakeup Functions / tsleep和wakeup函數 456
15.11 accept System Call / accept係統調用457
15.12 sonewconn and soisconnected Functions / sonewconn和soisconnected函數 461
15.13 connect System call / connect係統調用 464
15.14 shutdown System call / shutdown係統調用 468
15.15 c1ose System call / c1ose係統調用 471
15.16 Summary / 小結 474

Chapter 16. Socket I/O / 套接字I/O 475
16.1 Introduction / 概述475
16.2 Code Introduction / 代碼介紹475
16.3 Socket Buffers / 套接字緩衝區 476
16.4 write, writev, sendto, and sendmsg System calls / write、writev、sendto和sendmsg係統調用480
16.5 sendmsg System call / sendmsg係統調用 483
16.6 sendit Function / sendit函數 485
16.7 sosend Function / sosend函數 489
16.8 read, readv, recvfrom, and recvmsg System calls / read、readv、recvfrom和recvmsg係統調用 500
16.9 recvmsg System call / recvmsg係統調用 501
16.10 recvit Function / recvit函數 503
16.11 soreceive Function / soreceive函數 505
16.12 soreceive Code / soreceive代碼510
16.13 se1ect System call / se1ect係統調用 524
16.14 Summary / 小結 534

Chapter 17. Socket Options / 套接字選項 537
17.1 Introduction / 概述537
17.2 Code Introduction / 代碼介紹 538
17.3 setsockopt System call / setsockopt係統調用 539
17.4 getsockopt System call / getsockopt係統調用 545
17.5 font1 and ioct1 System call / font1和ioct1係統調用 548
17.6 getsockname System call / getsockname係統調用 554
17.7 getpeername System call / getpeername係統調用 554
17.8 Summary / 小結 557

Chapter 18. Radix Tree Routing Tables / Radix樹選路錶559
18.1 Introduction / 概述559
18.2 Routing Table Structure / 選路錶結構 560
18.3 Routing Sockets / 選路套接字 569
18.4 Code Introduction / 代碼介紹570
18.5 Radix Node Data Structures / Radix節點數據結構 573
18.6 Routing Structures / 選路結構 578
18.7 Initialization: route_init and rtable_init Functions / 初始化:route_init和rtable_init函數 581
18.8 Initialization: rn_init and rn_inithead Functions / 初始化:rn_init和rn_inithead函數 584
18.9 Duplicate Keys and Mask Lists / 重復鍵和掩碼列錶 587
18.10 rn_match Function / rn_match函數 591
18.11 rn_search Function / rn_search函數 599
18.12 Summary / 小結 599

Chapter 19. Routing Requests and Routing Messages / 選路請求和選路消息601
19.1 Introduction / 概述601
19.2 rtalloc and rtallocl Functions / rtalloc和rtallocl函數 601
19.3 RTFREE Macro and rtfree Function / RTFREE宏和rtfree函數 604
19.4 rtrequest Function / rtrequest函數 607
19.5 rt_setgate Function / rt_setgate函數 612
19.6 rtinit Function / rtinit函數 615
19.7 rtredirect Function / rtredirect函數 617
19.8 Routing Message Structures / 選路消息結構 621
19.9 rt_missmsg Function / rt_missmsg函數 625
19.10 rt_ifmsg Function / rt_ifmsg函數 627
19.11 rt_newaddrmsg Function / rt_newaddrmsg函數 628
19.12 rt_msg1 Function / rt_msg1函數 630
19.13 rt_msg2 Function / rt_msg2函數 632
19.14 sysctl_rtable Function / sysctl_rtable函數 635
19.15 sysctl_dumpentry Function / sysctl_dumpentry函數 640
19.16 sysctl_iflist Function / sysctl_iflist函數 642
19.17 Summary / 小結 644

Chapter 20. Routing Sockets / 選路套接字 645
20.1 Introduction / 概述645
20.2 routedomain and protosw Structures / routedomain和protosw結構 646
20.3 Routing Control Blocks / 選路控製塊 647
20.4 raw_init Function / raw_init函數 647
20.5 route_output Function / route_output函數 648
20.6 rt_xaddrs Function / rt_xaddrs函數 660
20.7 rt_setmetrics Function / rt_setmetrics函數 661
20.8 raw_input Function / raw_input函數 662
20.9 route_usrreq Function / route_usrreq函數 664
20.10 raw_usrreq Function / raw_usrreq函數 666
20.11 raw_attach, raw_detach, and raw_disconnect Functions / raw_attach、raw_detach和raw_disconnect函數 671
20.12 Summary / 小結 672

Chapter 21. ARP: Address Resolution Protocol / ARP:地址解析協議 675
21.1 Introduction / 概述675
21.2 ARP and the Routing Table / ARP及選路錶 675
21.3 Code Introduction / 代碼介紹678
21.4 ARP Structures / ARP結構 681
21.5 arpwhohas Function / arpwhohas函數 683
21.6 arprequest Function / arprequest函數 684
21.7 arpintr Function / arpintr函數 687
21.8 in_arpinput Function / in_arpinput函數 688
21.9 ARP Timer Functions / ARP定時器函數 694
21.10 arpresolve Function / arpresolve函數 696
21.11 arplookup Function / arplookup函數 701
21.12 Proxy ARP / 代理ARP 703
21.13 arp_rtrequest Function / arp_rt request函數 704
21.14 ARP and Multicasting / ARP和多播 710
21.15 Summary / 小結 711

Chapter 22. Protocol Control Blocks / 協議控製塊 713
22.1 Introduction / 概述713
22.2 Code Introduction / 代碼介紹715
22.3 inpcb Structure / inpcb結構716
22.4 in_pcballoc and in_pcbdetach Functions / in_pcballoc和in_pcbdetach函數 717
22.5 Binding, Connecting, and Demultiplexing / 綁定、連接和多路分配 719
22.6 in_pcblookup Function / in_pcblookup函數 724
22.7 in_pcbbind Function / in_pcbbind函數 728
22.8 in_pcbconnect Function / in_pcbconnect函數 735
22.9 in_pcbdisconnect Function / in_pcbdisconnect函數 741
22.10 in_setsockaddr and in_setpeeraddr Functions / in_setsockaddr和in_setpeeraddr函數 741
22.11 in_pcbnotify, in_rtchange, and in_losing Functions / in_pcbnotify、in_rtchange和 in_losing函數 742
22.12 Implementation Refinements / 實現細化 750
22.13 Summary / 小結 751

Chapter 23. UDP: User Datagram Protocol / UDP:用戶數據報協議755
23.1 Introduction / 概述755
23.2 Code Introduction / 代碼介紹755
23.3 UDP protosw Structure / UDP的protosw結構 758
23.4 UDP Header / UDP首部 759
23.5 udp_init Function / udp_init函數 760
23.6 udp_output Function / udp_output函數 760
23.7 udp_input Function / udp_input函數 769
23.8 udp_saveopt Function / udp_saveopt函數 781
23.9 udp_ct1input Function / udp_ct1input函數 782
23.10 udp_usrreq Function / udp_usrreq函數 784
23.11 udp_sysct1 Function / udp_sysct1函數 790
23.12 Implementation Refinements / 實現細化 791
23.13 Summary / 小結 793

Chapter 24. TCP: Transmission Control Protocol / TCP:傳輸控製協議 795
24.1 Introduction / 概述795
24.2 Code Introduction / 代碼介紹795
24.3 TCP protosw Structure / TCP的protosw結構801
24.4 TCP Header / TCP首部 801
24.5 TCP Control Block / TCP控製塊 803
24.6 TCP State Transition Diagram / TCP狀態變遷圖 805
24.7 TCP Sequence Numbers / TCP序列號807
24.8 tcp_init Function / tcp_init函數 812
24.9 Summary / 小結 815

Chapter 25. TCP Timers / TCP定時器817
25.1 Introduction / 概述817
25.2 Code Introduction / 代碼介紹819
25.3 tcp_canceltimers Function / tcp_canceltimers函數 821
25.4 tcp_fasttimo Function / tcp_fasttimo函數 821
25.5 tcp_s1owtimo Function / cp_s1owtimo函數 822
25.6 tcp_timers Function / cp_timers函數 824
25.7 Retransmission Timer Calculations / 重傳定時器計算 831
25.8 tcp_newtcpcb Function / tcp_newtcpcb函數 833
25.9 tcp_setpersist Function / tcp_setpersist函數 835
25.10 tcp_xmit_timer Function / tcp_xmit_timer函數 836
25.11 Retransmission Timeout: tcp_timers Function / 重傳超時:tcp_timers函數 841
25.12 An RTT Example / RTT示例846
25.13 Summary / 小結 848

Chapter 26. TCP Output / TCP輸齣 851
26.1 Introduction / 概述851
26.2 tcp_output Overview / tcp_output概述 852
26.3 Determine if a Segment Should be Sent / 確定一個段是否應該發送852
26.4 TCP Options / TCP選項 864
26.5 Window Scale Option / 窗口縮放選項 866
26.6 Timestamp Option / 時間戳選項 866
26.7 Send a Segment / 發送一個段 871
26.8 tcp_template Function / tcp_template函數 884
26.9 tcp_respond Function / tcp_respond函數 885
26.10 Summary / 小結 888

Chapter 27. TCP Functions / TCP函數 891
27.1 Introduction / 概述891
27.2 tcp_drain Function / tcp_drain函數 892
27.3 tcp_drop Function / tcp_drop函數 892
27.4 tcp_close Function / tcp_close函數 893
27.5 tcp_mss Function / tcp_mss函數 897
27.6 tcp_ctlinput Function / tcp_ctlinput函數 904
27.7 tcp_notify Function / tcp_notify函數 904
27.8 tcp_quench Function / tcp_quench函數 906
27.9 TCP_REASS Macro and tcp_reass Function / TCP_REASS宏tcp_reass函數 906
27.10 tcp_trace Function / tcp_trace函數 916
27.11 Summary / 小結 920

Chapter 28. TCP Input / TCP輸入923
28.1 Introduction / 概述923
28.2 Preliminary Processing / 初步處理925
28.3 tcp_dooptions Function / tcp_dooptions函數 933
28.4 Header Prediction / 首部預測 934
28.5 TCP Input: Slow Path Processing / TCP輸入:慢路徑處理 941
28.6 Initiation of Passive Open, Completion of Active Open / 被動打開的開始,主動打開的完成 942
28.7 PAWS: Protection Against Wrapped Sequence Numbers / PAWS:包裝序列號保護 951
28.8 Trim Segment so Data is Within Window / 修剪段使數據在窗口中 954
28.9 Self-Connects and Simultaneous Opens / 自連接和同時打開 960
28.10 Record Timestamp / 記錄時間戳 963
28.11 RST Processing / RST處理 963
28.12 Summary / 小結 965

Chapter 29. TCP Input (Continued) / TCP輸入(續)967
29.1 Introduction / 概述967
29.2 ACK Processing Overview / ACK處理概述 967
29.3 Completion of Passive Opens and Simultaneous Opens / 被動打開和同時打開的完成967
29.4 Fast Retransmit and Fast Recovery Algorithms / 快速重傳及快速恢復算法 970
29.5 ACK Processing / ACK處理974
29.6 Update Window Information / 更新窗口信息 981
29.7 Urgent Mode Processing / 緊急模式處理983
29.8 tcp_pulloutofband Function / tcp_pulloutofband函數 986
29.9 Processing of Received Data / 接收到的數據的處理 988
29.10 FIN Processing / FIN處理990
29.11 Final Processing / 最終處理992
29.12 Implementation Refinements / 實現細化994
29.13 Header Compression / 首部壓縮 995
29.14 Summary / 小結 1004

Chapter 30. TCP User Requests / TCP用戶請求1007
30.1 Introduction / 概述1007
30.2 tcp_usrreq Function / tcp_usrreq函數 1007
30.3 tcp_attach Function / tcp_attach函數 1018
30.4 tcp_disconnect Function / tcp_disconnect函數 1019
30.5 tcp_usrclosed Function / tcp_usrclosed函數 1021
30.6 tcp_ctloutput Function / tcp_ctloutput函數 1022
30.7 Summary / 小結 1025

Chapter 31. BPF: BSD Packet Filter / BPF:BSD分組過濾程序1027
31.1 Introduction / 概述1027
31.2 Code Introduction / 代碼介紹1028
31.3 bpf_if Structure / bpf_if結構 1029
31.4 bpf_d Structure / bpf_d結構 1032
31.5 BPF Input / BPF輸入 1040
31.6 BPF Output / BPF輸齣1046
31.7 Summary / 小結 1047

Chapter 32. 原始IP 1049
32.1 Introduction / 概述1049
32.2 Code Introduction / 代碼介紹1050
32.3 Raw IP protosw Structure / 原始IP的protosw結構1051
32.4 rip_init Function / rip_init函數 1053
32.5 rip_input Function / rip_input函數 1053
32.6 rip_output Function / rip_output函數 1056
32.7 rip_usrreq Function / rip_usrreq函數 1058
32.8 rip_ctloutput Function / rip_ctloutput函數 1063
32.9 Summary / 小結 1065

Epilogue / 後記1067

Appendix A. Solutions to Selected Exercises / 精選習題的解答1069

Appendix B. Source Code Availability / 源代碼的獲取1093

Appendix C. RFC 1122 Compliance / RFC 1122的有關內容1097
C.1 Link-Layer Requirements / 鏈路層要求1097
C.2 IP Requirements / IP要求1098
C.3 IP Options Requirements / IP選項要求 1102
C.4 IP Fragmentation and Reassembly Requirements / 分片和組裝要求1104
C.5 ICMP Requirements / ICMP要求1105
C.6 Multicasting Requirements / 多播要求 1110
C.7 IGMP Requirements / IGMP 要求1111
C.8 Routing Requirements / 選路要求1111
C.9 ARP Requirements / ARP要求 1113
C. 10 UDP Requirements / UDP要求 1113
C. 11 TCP Requirements / TCP要求 1115

Bibliography / 參考文獻 1125

前言/序言


深入理解網絡通信的基石:TCP/IP協議棧的底層實現機製 在當今互聯互通的世界中,網絡通信已成為無處不在的基礎設施。從我們日常瀏覽網頁、發送電子郵件,到企業級的數據傳輸和分布式係統運行,一切都離不開TCP/IP協議棧的支撐。然而,在網絡技術飛速發展的背後,其核心的TCP/IP協議棧是如何工作的?它的每一個層是如何協作,又是如何在復雜的網絡環境中實現可靠、高效的數據傳輸的?對於那些希望深入探究網絡通信本質,而非僅僅停留在應用層麵的專業人士、開發者和研究者而言,理解TCP/IP協議棧的底層實現機製至關重要。 本書將帶領您踏上一段深入剖析TCP/IP協議棧實現細節的旅程。我們不會止步於對協議定義的描述,而是將重點放在這些協議是如何在實際操作係統中被實現齣來的。通過對Unix/Linux等主流操作係統的網絡實現進行細緻的講解,本書旨在為您揭示TCP/IP協議棧在網絡接口層、IP層、TCP層以及UDP層等關鍵環節的內部運作原理。 網絡接口層:網絡通信的起點與終點 任何網絡通信的起點都始於網絡接口層,它負責將上層協議封裝的數據包轉換為可以在物理介質上傳輸的比特流,並在接收端將比特流重新組裝成數據幀。本書將深入探討這一層的關鍵組件,包括各種網絡接口設備(如以太網卡、Wi-Fi適配器)的工作方式、鏈路層協議(如ARP, RARP, ICMP)的實現細節。您將瞭解到地址解析協議(ARP)是如何在IP地址和MAC地址之間建立映射關係的,以及反嚮地址解析協議(RARP)在某些特殊場景下的作用。同時,我們還將剖析網際控製報文協議(ICMP)在網絡診斷和錯誤報告中的關鍵作用,例如ping命令背後所依賴的ICMP Echo Request/Reply消息的實現原理。 IP層:無連接的全局尋址與路由 互聯網協議(IP)作為TCP/IP協議棧的核心,負責在網絡中為數據包提供無連接的、不可靠的尋址和路由功能。本書將詳細闡述IP數據包的結構,包括IP頭部中的各種字段(版本、頭部長度、服務類型、總長度、標識、標誌、片偏移、生存時間、協議類型、頭部校驗和、源IP地址、目的IP地址等),並深入分析它們在數據包傳輸過程中的作用。我們將重點講解IP層的路由機製,包括路由錶的構建、查找以及數據包的轉發過程。您將理解路由器是如何根據目的IP地址選擇最佳路徑來傳遞數據包的,以及IP層如何處理分片和重組以適應不同網絡的最大傳輸單元(MTU)。此外,我們還會探討IP地址的分配、子網劃分以及IPv4嚮IPv6的過渡性技術。 TCP層:可靠的麵嚮連接的數據傳輸 傳輸控製協議(TCP)是TCP/IP協議棧中最復雜的協議之一,它提供瞭可靠的、麵嚮連接的數據流服務。本書將對TCP的實現機製進行最詳盡的解讀。我們將從TCP三次握手和四次揮手的過程入手,深入解析TCP連接建立和終止的細節,以及其中的各種標誌位(SYN, ACK, FIN, RST)的含義和作用。 在數據傳輸階段,我們將重點分析TCP的擁塞控製和流量控製機製。您將瞭解到TCP如何通過各種擁塞避免算法(如慢啓動、擁塞避免、快重傳、快恢復)來動態調整發送速率,以避免網絡擁塞。同時,我們也會詳細講解滑動窗口機製,包括發送窗口和接收窗口的工作原理,以及如何通過確認應答(ACK)和超時重傳機製來保證數據的可靠傳輸。本書還將深入探討TCP的序列號和確認號機製,這是TCP實現有序、無損數據傳輸的關鍵。您將理解TCP如何確保接收到的數據段是按照正確的順序進行組裝,以及如何處理可能發生的重復數據段。 此外,我們還將介紹TCP的其他重要特性,如緊急數據處理、端口號的作用以及TCP的性能優化。對於網絡應用程序開發者而言,理解TCP的這些底層實現原理,將有助於他們編寫齣更健壯、更高效的網絡應用。 UDP層:快速的無連接數據報服務 與TCP的可靠性不同,用戶數據報協議(UDP)提供瞭一種快速、無連接的數據報服務。本書將介紹UDP數據報的結構,以及它在哪些場景下是比TCP更優的選擇。您將瞭解到UDP的頭部非常簡潔,隻包含源端口、目的端口、長度和校驗和。我們將分析UDP的實現原理,並探討其在DNS查詢、流媒體傳輸、在綫遊戲等對實時性要求高但對丟包容忍度較高的應用中的使用。 操作係統網絡棧的實現細節 除瞭對各個協議的深入剖析,本書還將特彆關注這些協議在實際操作係統中的實現細節。我們將以Unix/Linux係統為例,講解網絡套接字(socket)接口是如何與TCP/IP協議棧進行交互的。您將瞭解到應用程序通過socket API發齣的請求是如何被內核的網絡堆棧接收、處理,並最終轉化為網絡數據包發送齣去的。反之,當數據包到達時,內核又是如何解析並將其傳遞給相應的應用程序的。 我們將探討內核如何管理網絡緩衝區、套接字描述符,以及如何處理中斷和軟中斷來高效地接收和發送數據。對於那些對操作係統內核和網絡編程感興趣的讀者,本書將提供寶貴的洞察。 貫穿始終的實踐視角 本書並非純理論的堆砌,而是力求將理論知識與實際應用相結閤。通過大量的代碼示例和僞代碼,讀者可以直觀地理解協議的設計意圖和實現方式。我們還將提及一些用於網絡調試和性能分析的工具,例如tcpdump, Wireshark等,並演示如何利用這些工具來觀察和分析TCP/IP協議棧的實際運行情況,從而更好地診斷和解決網絡問題。 誰將從中受益? 網絡工程師和係統管理員: 深入理解TCP/IP協議棧的運作機製,能夠更有效地配置、維護和排查網絡設備和服務器。 網絡應用開發者: 掌握TCP/IP協議棧的底層實現,有助於編寫齣更高效、更可靠的網絡應用程序,並能更好地利用網絡資源。 操作係統開發者: 為從事操作係統網絡部分的開發和優化提供堅實的基礎。 計算機科學專業學生和研究者: 深入理解網絡通信的核心原理,為進一步學習更高級的網絡技術奠定堅實基礎。 總結 TCP/IP協議棧是現代互聯網的基石,理解其底層實現機製是掌握網絡通信技術的關鍵。本書將以嚴謹的邏輯、詳盡的講解和豐富的實踐指導,帶領您深入探索TCP/IP協議棧的內部世界。通過閱讀本書,您將不僅能夠理解“是什麼”,更能理解“為什麼”以及“如何”。讓我們一同開啓這場揭示網絡奧秘的深入之旅,為構建更穩定、更高效的網絡世界貢獻力量。

用戶評價

評分

收到《TCP/IP詳解 捲2:實現》後,我迫不及待地翻閱瞭一下。這本書的厚度就已經說明瞭其內容的豐富程度,相信絕對能夠滿足那些對TCP/IP協議棧底層實現有著極高追求的讀者。我比較關注的部分是關於TCP的可靠傳輸機製,包括序列號、確認應答、超時重傳等。這些機製是如何協同工作,保證數據包不丟失、不重復、按序到達的,一直是我想深入瞭解的。書中對這些機製的詳細剖析,應該能夠讓我豁然開朗。此外,我也對TCP的流量控製和擁塞控製這兩個非常重要的方麵充滿瞭期待。瞭解這些控製機製的原理,對於在復雜的網絡環境中設計和部署高性能的網絡應用至關重要。這本書的“實現”二字,預示著它會從代碼和數據結構的角度去講解,這對於我這種更偏嚮於實踐的讀者來說,非常有吸引力。我希望通過這本書的學習,能夠對TCP/IP協議棧的內部運作有一個更加深刻和全麵的認識,從而在實際工作中遊刃有餘。

評分

對於任何一個希望在網絡領域有所建樹的工程師來說,《TCP/IP詳解 捲2:實現》都絕對是一本不容錯過的經典。從我初步翻閱的體驗來看,這本書的內容深度和廣度都令人驚嘆。它不僅僅是停留在協議定義的層麵,更重要的是深入到瞭協議的實際實現細節。我特彆期待書中關於IP層路由選擇、數據包轉發的講解,這涉及到網絡中最基礎也是最核心的部分。同時,TCP層中的各種擁塞控製算法,比如Tahoe、Reno、Cubic等,它們在不同網絡條件下的錶現和優缺點,也是我非常感興趣的內容。這本書的另一大亮點在於它強調“實現”,這意味著它會通過代碼示例、數據結構分析等方式來解釋協議的運作。這對於理解協議在操作係統中的具體落地非常有幫助。我計劃將這本書作為我近期學習的重點,認真地去理解每一個概念,並嘗試將書中的知識應用到實際的網絡編程和故障排除中。我相信,這本書的學習經曆將極大地提升我的網絡技術功底。

評分

我終於拿到瞭《TCP/IP詳解 捲2:實現》的英文原版,這真是一件令人激動的事情。一直以來,我對TCP/IP協議棧的底層實現原理都充滿瞭好奇,那些看似抽象的概念,背後到底是如何運作的?這本書的齣現,無疑為我揭開這層神秘麵紗提供瞭絕佳的機會。我迫不及待地翻開瞭第一頁,試圖從中一窺究竟。雖然我還沒有深入閱讀,但從目錄和章節標題中,我已經能感受到它磅礴的知識體係。從IP層的分片與重組,到TCP層的連接建立與關閉,再到UDP的簡單高效,每一個環節都似乎蘊含著精妙的設計。我特彆期待能夠理解那些關於擁塞控製、流量控製的算法,以及它們是如何在現實網絡中保證數據傳輸的穩定性和效率的。我知道這本書會包含大量的代碼示例和圖錶,這對我這樣一個喜歡動手實踐的讀者來說,無疑是巨大的福音。我相信,通過對這本書的學習,我能夠更深入地理解網絡通信的本質,並為日後的網絡編程和故障排查打下堅實的基礎。這本書不僅僅是一本技術書籍,更像是一張通往網絡世界深處的藏寶圖,等待我去探索和挖掘。

評分

這本書對於想要深入理解網絡協議棧的工程師來說,絕對是一筆寶貴的財富。我目前還在啃讀,但可以肯定地說,它所包含的信息量是巨大的,而且深入到瞭很多其他書籍不會觸及的細節。我尤其對書中關於TCP連接狀態機和各個狀態轉移的詳細闡述感到印象深刻,這對於理解TCP的可靠性保證至關重要。還有TCP的擁塞控製算法,書中對此的解讀應該是非常詳盡的,能夠幫助我們理解網絡是如何動態調整發送速率以避免擁塞的。另外,書中對IP分片和重組的處理機製的講解,也讓我對不同MTU的網絡環境下的數據傳輸有瞭更清晰的認識。對於那些對網絡底層工作原理感到睏惑,或者希望優化網絡性能、進行網絡調試的開發者來說,這本書的價值是難以估量的。它不僅僅是理論的堆砌,更強調的是“實現”,這意味著它會從代碼層麵去剖析協議的運作,這對於實際工作非常有指導意義。我打算花足夠的時間去消化這些內容,爭取把每一個細節都弄明白。

評分

拿到《TCP/IP詳解 捲2:實現》這本英文原版,我感到非常興奮。一直以來,我對網絡通信的底層原理都懷有極大的興趣,尤其是TCP/IP協議棧是如何在復雜的網絡環境中實現可靠、高效的數據傳輸的。這本書的副標題“實現”二字,讓我看到瞭它與眾不同之處。我預感這本書不會僅僅停留在協議定義的層麵,而是會深入到協議在操作係統中的具體實現細節,這對於我這樣喜歡刨根問底的讀者來說,無疑是巨大的吸引力。我特彆期待書中關於TCP連接管理,比如三次握手和四次揮手的詳細解釋,以及TCP是如何通過各種機製保證數據傳輸的可靠性和順序性的。此外,書中對UDP協議的講解,也讓我對它在某些場景下的優勢有瞭更深的認識。我相信,通過學習這本書,我將能夠更清晰地理解數據包在網絡中是如何被封裝、傳輸和解封裝的,以及各種網絡設備在其中扮演的角色。這本書將成為我深入理解網絡世界的強大助力。

評分

不錯。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

評分

給京東售後贊一個。從站點工作人員到售後老客氣咯。

評分

正版好書,值得收藏

評分

好好好好好好

評分

等得太辛苦瞭!文豪紀真的很給力!

評分

這本到手還算是新書

評分

第一捲五百多頁,協議這麼多頁相比,捲二的實現真的好多瞭,哈哈 迴頭慢慢啃

評分

不錯哦的選擇……

評分

這次包裝得很好,正品,非常棒,給五星好評!

相關圖書

本站所有內容均為互聯網搜尋引擎提供的公開搜索信息,本站不存儲任何數據與內容,任何內容與數據均與本站無關,如有需要請聯繫相關搜索引擎包括但不限於百度google,bing,sogou

© 2025 book.cndgn.com All Rights Reserved. 新城书站 版權所有