- 积分
- 979
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2012-7-23
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
|
大家知道,TCP/IP已成为计算机网络的事实上的标准。在关于TCP/IP的论著中,最有影响的就是两部著作。一部是Douglas E. Comer的《用TCP/IP进行网际互连》,而另一部就是Stevens写的这3卷书。这两套巨著都很有名,各有其特点。无论是从事计算机网络的教师还是进行科研的技术人员,这两套书都应当是必读的。
《TCP/IP详解,卷1:协议》是一本完整而详细的TCP/IP协议指南。描述了属于每一层的各个协议以及它们如何在不同操作系统中运行。作者用Lawrence Berkeley实验室的tcpdump程序来捕获不同操作系统和TCP/IP实现之间传输的不同分组。对tcpdump输出的研究可以帮助理解不同协议如何工作。本书适合作为计算机专业学生学习网络的教材和教师参考书。也适用于研究网络的技术人员。
《TCP/IP详解 卷2:实现》完整而详细地介绍了TCP/IP协议是如何实现的。书中给出了约500个图例,15 000行实际操作的C代码,采用举例教学的方法帮助你掌握TCP/IP实现。本书不仅说明了插口API和协议族的关系以及主机实现与路由器实现的差别。还介绍了4.4BSD-Lite版的新的特点,如多播、长肥管道支持、窗口缩放、时间戳选项以及其他主题等等。读者阅读本书时,应当具备卷1中阐述的关于TCP/IP的基本知识。本书适用于希望理解TCP/TP协议如何实现的人,包括编写网络应用程序的程序员以及利用TCP/IP维护计算机网络的系统管理员。
《TCP-IP详解卷三TCP事务协议,HTTP,NNTP和UNIX域协议》是“TCP/IP详解系列”的延续。主要内容包括:TCP事务协议,即T/TCP,这是对TCP的扩展,使客户-服务器事务更快、更高效和更可靠;TCP/IP应用,主要是HTTP和NNTP;UNIX域协议,这些协议提供了进程之间通信的一种手段。当客户与服务器进程在同一台主机上时,UNIX域协议通常要比TCP/IP快一倍。本书同样采用了大量的实例和实现细节,并参考引用了卷2中的大量源程序。 本书适用于希望理解TCP/IP如何工作的人,包括编写网络应用程序的程序员以及利用TCP/IP维护计算机网络的系统管理员。
现在人人在谈网络,张口闭口INTERNET,那么这一切的基础是什么呢? TCP/IP!想学习TCP/IP最应该看的书又是什么呢? 当然是这套W.Richard Stevens所著的<TCP/IP详解>了!这套书无疑相关书籍之中的经典之作,极具收藏价值,如果多看一些TCP/IP方面的书,可以发现,本书经常被引用或推荐。 本书--卷一:协议 是整套书的基础.本书的组织结构相当合理,描述解释清楚细致,内容覆盖极广,并在每一章节的后面有帮助记忆的习题,相应的答案请见附录.
第一章概述介绍了基础和背景知识,但也提出了许多重要特性如:分层;TCP,UDP的根本区别;End to End与Hop by Hop;IP地址的分类和点分十进制表示法;数据封装过程;端口号...这些术语在后面的章节会有详细的解释.
第二章介绍了TCP/IP的链路层协议.以太网与IEEE802数据封装的比较;SLIP(现在还有人用么?)和PPP.文中作者提到"现在SLIP用户仍然比PPP用户多",是由于本书的写作时间比较早.另外本章还详细介绍了LOOPBACK,MTU等概念.
第三至十章详细介绍了IP.IP包结构;IP路由选择;子网及其掩码;ARP,RARP协议;ICMP,特别是时间戳和端口不可到达;详细讨论了PING,TRACEROUTE这两个常用的测试用程序;IP路由和动态选路(路由)协议,特别详细介绍了RIP,并简单介绍了OSPF,BGP.与一般的书不同的是本书没有提及CISCO的IGRP,EIGRP,毕竟这不是为CISCO认证编写的。
第十一章介绍UDP,起初觉得奇怪,因为夹在中间而不是和第十七章开始的TCP放在一起.后来才发现,从第十二章的广播开始UDP已经开始使用.
第十二,十三章对广播,多播(现在一般叫组播)和IGMP协议进行讨论.对各种广播形式进行描述,对组播及其IGMP协议论述相当详细,组播现在用的越来越多,大家可以好好学习一下。
第十四,十五,十六章分别介绍DNS,TFTP,BOOTP这些基于UDP的应用.对于大家自认为熟悉的这些应用,只有在读完之后,你才会说:原来是这么回事!
第十七至二十四章详细的讨论了TCP.TCP封装结构;TCP连接建立(三次握手)和拆除,其中介绍了很多一般书上没有出现的内容如半打开和半关闭;TCP数据交互和窗口机制;TCP超时与重传(可靠传输),并描述了多种实际算法;TCP的各种计时器;TCP的一些修改建议,并提出了T/TCP,详细的介绍和源代码在下一卷.
第二十五章介绍SNMP网管协议.详细讨论了MIB和TRAP.做网管的朋友们,这可是福音啊。
其余的章节用来讨论基于TCP的各种应用如远程登录的TELNET,RLOGIN,文件传输FTP,电子邮件用的SMTP,基于SUN RPC的NFS,和常用的一些FINGER,WHOIS,X WINDOW等应用程序.作者使用了大量的篇幅对每种应用进行了剖析.
在附录中,作者提供了书中经常提到的tcpdump,sock程序的相关内容;UNIX常用的配置选项;和大量的免费资源和参考文献.
本书的翻译一直遭到许多网友的批评,的确译文中有些术语的把握有些问题,但是还不会影响到读者的理解.毕竟本书的写作和翻译时间较早.
这是一本百读不厌的宝书,第一次看时可以是对TCP/IP有一个比较全面的了解过程,以后每次看都会发现还需要可以学到新的并发现可以进一步学习的东西.强烈推荐广大读者购买.无论你是初学者还是资深网络人士,只要想要一本TCP/IP的书,本书一定是首选!
可惜的是本书不会再有进一步的修改了,已成绝响。对于新技术如IPV6,就只有靠大家自己努力了。有兴趣进行进一步研究的编程人员,请继续关注卷二和卷三。[1]
图书目录 Preface xix
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 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 31
2.1 Introduction 31
2.2 Code Introduction 36
2.3 Mbuf Definitions 37
2.4 mbuf Structure 38
2.5 Simple Mbuf Macros and Functions 40
2.6 m_devget and m_pullup Functions 44
2.7 Summary of Mbuf Macros and Functions 51
2.8 Summary of Net/3 Networking Data Structures 54
2.9 m_copy and Cluster Reference Counts 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 65
3.4 ifaddr Structure 73
3.5 sockaddr Structure 74
3.6 ifnet and ifaddr Specialization 76
3.7 Network Initialization Overview 77
3.8 Ethernet Initialization 80
3.9 SLIP Initialization 82
3.10 Loopback Initialization 85
3.11 ifat tach Function 85
3.12 ifini tFunction 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 ioct1 System Call 114
4.5 Summary 125
Chapter 5. Interfaces: SLIP and Loopback 127
5.1 Introduction 127
5.2 Code Introduction 127
5.3 SLIP Interface 128
5.4 Loopback Interface 150
5.5 Summary 153
Chapter 6. IP Addressing 155
6.1 Introduction 155
6.2 Code Introduction 158
6.3 Interface and Address Summary 158
6.4 sockaddr in Structure 160
6.5 in ifaddr Structure 161
6.6 Address Assignment 161
6.7 Interface ioctl Processing 177
6.8 Internet Utility Functions 181
6.9 ifnet Utility Functions 182
6.10 Summary 183
Chapter 7. Domains and Protocols 185
7.1 Introduction 185
7.2 Code Introduction 186
7.3 domain Structure 187
7.4 protosw Structure 188
7.5 IP domain and protosw Structures 191
7.6 pffindproto and pff indtype Functions 196
7.7 pfcti input Function 198
7.8 IP Initialization 199
7.9 sysctl System Call 201
7.10 Summary 204
Chapter 8. IP: Internet Protocol 205
8.1 Introduction 2205
8.2 Code Introduction 2206
8.3 I P Packets 210
8.4 Input Processing: ipintr Function 2212
8.5 Forwarding: ip_forward Function 2220
8.6 Output Processing: ip_output 2Function 228
8.7 Internet Checksum: in cksum 2Function 234
8.8 setsockopt and getsockopt System Calls 2239
8.9 ip_syscti Function 2244
8.10 Summary 245
Chapter 9. IP Option Processing 247
9.1 Introduction 247
9.2 Code Introduction 247
9.3 Option Format 248
9.4 ip_doopt i ons Function 249
9.5 Record Route Option 252
9.6 Source and Record Route Options 254
9.7 Timestamp Option 261
9.8 ip_insertopt ions Function 265
9.9 ip_pcbopt s Function 269
9.10 Limitations 272
9.11 Summary 272
Chapter 10. IP Fragmentation and Reassembly 275
10.1 Introduction 275
10.2 Code Introduction 277
10.3 Fragmentation 278
10.4 ip_opt copy Function 282
10.5 Reassembly 283
10.6 ip_reass Function 286
10.7 ip_s 1 owt imo Function 298
10.8 Summary 300
Chapter 11. ICMP: Internet Control Message Protocol 301
11.1 Introduction 301
11.2 Code Introduction 305
11.3 icmp Structure 308
11.4 ICMP protosw Structure 309
11.5 Input Processing: icmp_input Function 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 324
11.12 icmp_re f1ect Function 328
11.13 icmp_send Function 333
11.14 i-icmp_sy sctl Function 334
11.15 Summary 335
Chapter 12. IP Multicasting 337
12.1 Introduction 337
12.2 Code Introduction 340
12.3 Ethernet Multicast Addresses 341
12.4 e_ther mu1ti Structure 342
12.5 Ethernet Multicast Reception 344
12.6 in_mu1ti Structure 345
12.7 ip_mopt ions Structure 347
12.8 Multicast Socket Options 348
12.9 Multicast TTL Values 348
12.10 ip_setmoptions Function 351
12.11 Joining an IP Multicast Group 355
12.12 Leaving an IP Multicast Group 366
12.13 ip_getmoptions Function 371
12.14 Multicast Input Processing: ipintr Function 373
12.15 Multicast Output Processing: ip_output Function 375
12.16 Performance Considerations 379
12.17 Summary 379
Chapter 13. IGMP: Internet Group Management Protocol 381
13.1 Introduction 381
13.2 Code Introduction 382
13.3 i_gmp Structu re 384
13.4 IGMP protosw Structure 384
13.5 Joining a Group: igmp_j oingroup Function 386
13.6 i_gmp_fast timo Function 387
13.7 Input Processing: igmp_input Function 391
13.8 Leaving a Group: igmp_leavegroup Function 395
13.9 Summary 396
Chapter 14. IP Multicast Routing 397
14.1 Introduction 397
14.2 Code Introduction 398
14.3 Multicast Output Processing Revisited 399
14.4 mrouted Daemon 401
14.5 Virtual Interfaces 404
14.6 IGMP Revisited 411
14.7 Multicast Routing 416
14.8 Multicast Forwarding: ip_mforward Function 424
14.9 Cleanup: ip_mrouter_done Function 433
14.10 Summary 434
Chapter 15. Socket Layer 435
15.1 Introduction 435
15.2 Code Introduction 436
15.3 socket Structure 437
15.4 System Calls 441
15.5 Processes, Descriptors, and Sockets 445
15.6 socket System Call 447
15.7 getsock and sockargs Functions 451
15.8 bind System Call 453
15.9 1isten System Call 455
15.10 t_sleep and wakeup Functions 456
15.11 accept System Call 457
15.12 sonewconn and soi sconnect ed Functions 461
15.13 connect System call 464
15.14 shut down System Call 468
15.15 c1ose System Call 471
15.16 Summary 474
Chapter 16. Socket 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 480
16.5 sendmsg System Call 483
16.6 sendit Function 485
16.7 sosend Function 489
16.8 read, readv, recvfrom, and recvmsg System Calls 500
16.9 recvmsg System Call 501
16.10 recvit Function 503
16.11 soreceive Function 505
16.12 soreceive Code 510
16.13 select System Call 524
16.14 Summary 534
Chapter 17. Socket Options 537
17.1 Introduction 537
17.2 Code Introduction 538
17.3 sets ockopt System Call 539
17.4 getsockopt System Call 545
17.5 font 1 and ioct 1 System Calls 548
17.6 getsockname System Call 554
17.7 getpeername System Call 554
17.8 Summary 557
Chapter 18. Radix Tree Routing Tables 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 573
18.6 Routing Structures 578
18.7 Initialization: route init and rtable init Functions 581
18.8 Initialization: rn init and rn inithead Functions 584
18.9 Duplicate Keys and Mask Lists 587
18.10 rn mat ch Function 591
18.11 rn search Function 599
18.12 Summary 599
Chapter 19. Routing Requests and Routing Messages 601
19.1 Introduction 601
19.2 rtalloc and rtallocl Functions 601
19.3 RTFREE Macro and rtfree Function 604
19.4 rtrequest Function 607
19.5 rt_setgate Function 612
19.6 rt_init Function 615
19.7 rtredirect Function 617
19.8 Routing Message Structures 621
19.9 rt_mi s smsg Function 625
19.10 rtifmsg Function 627
19.11 rt_newaddrms g Function 628
19.12 rt_ms_g 1 Function 630
19.13 rt_ms_g 2 Function 632
19.14 sysctl_rt abl e Function 635
19.15 sysctl_dumpent ry Function 640
19.16 sysctl iflist Function 642
19.17 Summary 644
Chapter 20. Routing Sockets 645
20.1 Introduction 645
20.2 routedomain and protosw Structures 646
20.3 Routing Control Blocks 647
20.4 raw init Function 647
20.5 rout e_output Function 648
20.6 rt_xaddrs Function 660
20.7 rt_setmetrics Function 661
20.8 raw_input Function 662
20.9 route_usrreq Function 664
20.10 raw_u s rreq Function 666
20.11 raw_attach, raw_detach, and raw_disconnect Functions 671
20.12 Summary 672
Chapter 21. ARP: Address Resolution Protocol 675
21.1 Introduction 675
21.2 ARP and the Routing Table 675
21.3 Code Introduction 678
21.4 ARP Structures 681
21.5 arpwhohas Function 683
21.6 arprequest Function 684
21.7 arp int r Function 687
21.8 in_arpinput Function 688
21.9 ARP Timer Functions 694
21.10 arpresolve Function 696
21.11 arpl ookup Function 701
21.12 Proxy ARP 703
21.13 arp_rt request Function 704
21.14 ARP and Multicasting 710
21.15 Summary 711
Chapter 22. Protocol Control Blocks 713
22.1 Introduction 713
22.2 Code Introduction 715
22.3 inpcb Structure 716
22.4 in_pcballoc and in_pcbdetach Functions 717
22.5 Binding, Connecting, and Demultiplexing 719
22.6 in pcblookup Function 724
22.7 in_gcbbind Function 728
22.8 in pcbconnect Function 735
22.9 in_pcbdisconnect Function 741
22.10 in_setsockaddr and in_setpeeraddr Functions 741
22.11 in_pcbnotify, in_rtchange, and in_losing Functions 742
22.12 Implementation Refinements 750
22.13 Summary 751
Chapter 23. UDP: User Datagram Protocol 755
23.1 Introduction 755
23.2 Code Introduction 755
23.3 UDP protosw Structure 758
23.4 UDP Header 759
23.5 udp init Function 760
23.6 udp_output Function 760
23.7 udp_input Function 769
23.8 udp_saveopt Function 781
23.9 udp_ctli nput Function 782
23.10 udp_usrreq Function 784
23.11 udp_sysct 1 Function 790
23.12 Implementation Refinements 791
23.13 Summary 793
Chapter 24. TCP: Transmission Control Protocol 795
24.1 Introduction 795
24.2 Code Introduction 795
24.3 TCP protosw Structure 801
24.4 TCP Header 801
24.5 TCP Control Block 803
24.6 TCP State Transition Diagram 805
24.7 TCP Sequence Numbers 807
24.8 tcp_init Function 812
24.9 Summary 815
Chapter 25. TCP Timers 817
25.1 Introduction 817
25.2 Code Introduction 819
25.3 tcp cancelt imers Function 821
25.4 tcp fast t imo Function 821
25.5 tcp_s 1 owt imo Function 822
25.6 tcp_t imers Function 824
25.7 Retransmission Timer Calculations 831
25.8 tcp newtcpcb Function 833
25.9 tcp_se tper sist Function 835
25.10 tcp_xmi t_t ime r Function 836
25.11 Retransmission Timeout: tcp_t imers Function 841
25.12 An RTT Example 846
25.13 Summary 848
Chapter 26. TCP Output 851
26.1 Introduction 851
26.2 tcp output Overview 852
26.3 Determine if a Segment Should be Sent 852
26.4 TCP Options 864
26.5 Window Scale Option 866
26.6 Timestamp Option 866
26.7 Send a Segment 871
26.8 tcp templ at a Function 884
26.9 tcp respond Function 885
26.10 Summary 888
Chapter 27. TCP Functions 891
27.1 Introduction 891
27.2 tcp_drain Function 892
27.3 tcp drop Function 892
27.4 tcp close Function 893
27.5 tcp mss Function 897
27.6 top cti input Function 904
27.7 tcp notify Function 904
27.8 tcp_quench Function 906
27.9 TCP REASS Macro and tcp_reass Functionv 906
27.10 tcp_trace Function 916
27.11 Summary 920
Chapter 28. TCP Input 923
28.1 Introduction 923
28.2 Preliminary Processing 925
28.3 tcp_doopt ions Function 933
28.4 Header Prediction 934
28.5 TCP Input: Slow Path Processing 941
28.6 Initiation of Passive Open, Completion of Active Open 942
28.7 PAWS: Protection Against Wrapped Sequence Numbers 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 963
28.12 Summary 965
Chapter 29. TCP Input (Continued) 967
29.1 Introduction 967
29.2 ACK Processing Overview 967
29.3 Completion of Passive Opens and Simultaneous Opens 967
29.4 Fast Retransmit and Fast Recovery Algorithms 970
29.5 ACK Processing 974
29.6 Update Window Information 981
29.7 Urgent Mode Processing 983
29.8 tcp_pul louto fband Function 986
29.9 Processing of Received Data 988
29.10 FIN Processing 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 1007
30.1 Introduction 1007
30.2 tcp_usrreq Function 1007
30.3 tcp attach Function 1018
30.4 tcp disconnect Function 1019
30.5 tcp_usrclosed Function 1021
30.6 t cp_ctloutput Function 1022
30.7 Summary 1025
BPF: BSD Packet Filter 1027
Chapter 31.BPF:BSO Packet Fllter
31.1 Introduction 1027
31.2 Code Introduction 1028
31.3 bp fif Structurev 1029
31.4 bp fd Structure 1032
31.5 BPF Input 1040
31.6 BPF Output 1046
31.7 Summary 1047
Raw IP 1049
Chapter 32.Raw IP
32.1 Introduction 1049
32.2 Code Introduction 1050
32.3 Raw IP protosw Structure 1051
32.4 rip_in it Function 1053
32.5 rip_input Function 1053
32.6 rip output Function 1056
32.7 rlp_usrreq Function 1058
32.8 ripct 1output Function 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 1097
C.1 Link-Layer Requirements 1097
C.2 IP Requirements 1098
C.3 IP Options Requirements 1102
C.4 IP Fragmentation and Reassembly Requirements 1104
C.5 ICMP Requirements 1105
C.6 Multicasting Requirements 1110
C.7 IGMP Requirements 1111
C.8 Routing Requirements 1111
C.9 ARP Requirements 1113
C.10 UDP Requirements 1113
C.11 TCP Requirements 1115
Bibliography 1125
Index 1133
下载链接:
该贴已经同步到 shining123的微博 |
评分
-
查看全部评分
|