TCP/IP详解,卷3:TCP事务协议、HTTP、NNTP和UNIX域协议(英文版)
作者 : (美)W.Richard Stevens
丛书名 : 经典原版书库
出版日期 : 2002-01-01
ISBN : 7-111-09503-0
定价 : 28.00元
教辅资源下载
扩展信息
语种 : 英文
页数 : 356
开本 : 16开
原书名 : TCP/IP Illustrated, Volume 3: TCP for Transactions,HTTP,NNTP,and the UNIX Domain Protocols
原出版社: Addison-Wesley
属性分类: 教材
包含CD :
绝版 :
图书简介

Praised by Reviewers and practicing TCP/IP programmers alike, the TCP/IP Illustrated series examines the many facets of the TCP/IP protocol suite using a unique and highly-effective visual approach that describes the inner workings of TCP/IP with detail, insight, and clarity.
  TCP/IP Illustrated, Volume 3: TCP for Transactions, HTTP, NNTP, and the UNIX Domain Protocols provides detailed coverage of four essential topics with which today's TCP/IP programmers and network administrators must be thoroughly familiar:T/TCP, an extension to TCP that makes client-server transactions faster, more efficient, and more reliable; HTTP, the foundation for the rapidly expanding WWW; NNTP, the basis for the Usenet news system; and UNIX Domain Protocols, a set of protocols used heavily in UNIX implementations.

图书前言

Introduetion and Organization of the Book
   This book is a logical continuation of the TCP/IP Illustrated series: [Stevens 1994], which we refer to as Volume 1, and [Wright and Stevens 1995], which we refer to as Volume 2.This book is divided into three parts, each covering a different topic:
  l. TCP for transactions, commonly called T/TCP. This is an extension to TCPdesigned to make client-server transactions faster, more efficient, and reliable.This is done by omitting TCP's three-way handshake at the beginning of a connection and shortening the TIME_WAIT state at the end of a connection. We'Il see that T/TCP can match UDP's performance for a client-server transaction and that T/TCP provides reliability and adaptability, both major improvements over UDP.
  A transaction is defined to be a client request to a server, followed by the server's reply. (The term transaction does not mean a database transaction, with locking, two-phase commit, and backout.)
  2. TCP/IP applications, specifically HTTP (the Hypertext Transfer Protocol, the foundation of the World Wide Web) and NNTP (the Network News Transfer Protocol, the basis for the Usenet news system).
  3. The Unix domain protocols. These protocols are provided by all Unix TCP/IP implementations and on many non-Unix implementations. They provide a form of interprocess communication (IPC) and use the same sockets Interface used with TCP/IP. When the client and server are on the same host, the Unix domain protocols are often twice as fast as TCP/IP.
  Part 1, the presentation of T/TCP, is in two pieces. Chapters 1--4 describe the protocol and provide numerous examples of how it works. This material is a major expansion of the brief presentation of T/TCP in Section 24.7 of Volume 1. The second piece,Chapters 5--12, describes the actual implementation of T/TCP within the 4.4BSD-Lite networking code (i.e., the codc presented in Volume 2). Since the first T/TCP implementation was not releascd until September 1994, about one year after Volume 1 was published dnd right as Volume 2 was being completed, the detailed presentation of T/TCP, with examples and all the implemel1tation details, had to wait for another volume in the scries.
  Part 2, the HTTP, and NNTP applications, are a continuation of the TCP/lP applications Presentcd in Chapters 25--30 of Volume 1. In the two years sincc Yblume 1 was publishcd, the popularity of HTTP has grown enormously, as the lnternet has exploded,and the use of NNTP has been growing about 75% per year for more than 10 years.HTTP is also a wonderful candidate for T/TCP, given its typical use of TCP: short connections with small amounts of data transferred, wherc the total time is often dominated by the conncction setup and teardown. The heavy use of HTTP (and therefore TCP) on a busy Web server by thousands of different and varied clients also provides a umique opportunity to examine the actual packets at the server (Chapter 14) and look at many features of TCP/IP that were presented in Volumes 1 and 2.
  The Unix domain protocols in Part 3 were originally considered for Volume 2 but omitted when its size reached 1200 pages. While it may seem odd to cover protocols othcr than TCP/IP in a series titled TCP/P Illu5trated, the Unix domain protocols were implemented almost 15 years ago in 4.2BSD alongside the first implementation of BSD TCP/IP They are used heavily today in any Berkeley-derived kernel, but their use is typically "under the covers," and most users are unaware of their presence. Besides being the foundation for Unix pipes on a Berkeley-derived kernel, another heavy user is the X Window System, when the client and server are on the same host (i.e., on typical workstations). Unix domain sockets are also used to pass descriptors between processes, a powerful technique for interprocess communication. Since the sockets API (application program interface) used with the Unix domain protocols is nearly identical to the sockets API used with TCP/IP, the Unix domain protocols provide an easy way to enhance the performance of Iocal applications with minimal code changes.
  Each of the three parts can be read by itself.

Readers
  As with the previous two volumes in the series, this volume is intended for anyone wishing to understand how the TCP/IP protocols operatet programmers writing network applications, system administrators responsible for maintaining computer systems and networks utilizing TCP/IP, and users who deal with TCP/IP applications on a daily basis.
  Parts 1 and 2 assume a basic understanding of how the TCP/IP protocols work.Readers unfamiliar with TCP/IP should consult the first volume in this series, [Stevens1994], for a thorough description of the TCP/IP protocol suite. The first half of Part 1(Chapters1--4,theconcepts behine T/TCP along with examples)can be read independent of Volume 2,but the remainder of Part 1(Chapters 5-12,the implementation of T/TCP)assumes familiarity with the 4.4BSD-Litenetworking code ,as provided with Volume 2.
  Many forward and backward referentces are provided throughout the text. to both topics within this text, and to relevant sections of Volumes l and 2 for readers interested in more details. A thorough index is provided, and a list of all the acronyms used throughout the text, along with the compound term for the acronym. appears on the inside front covers. The inside back covers contain an alphabetical cross-reference of all the structures. functions. and macros described in the book and the starting page number of the description. This cross-reference also refers to definitions in VoIume2. when that object is referenced from the code in this volume.

Acknowledgments
  First and foremost I thank my family, Sally, Bill, Ellen, and David, who have endured another book along with an my haveling during the past year. This time, however, it really is a "small" book.
  I thank the technical reviewers who read the manuscript and provided important feedback on a tight timetable: Sami Boulos, Alan Cox, Tony DeSimone, Pete Haverlock,Chris Heigham, Mukesh Kacker, Brian Kernighan, Art Mellor, Jeff Mogul, Marianne Mueller, Andras Olah, Craig Partridge, Vern Paxson, Keith Sklower, lan Lance Taylor,and Gary Wright. A special thanks to the consulting editor, Brian Kernighan, for his rapid, thorough, and helpful reviews throughout the course of the book, and for his continued encouragement and support.
  Special thanks are also due Vern Paxson and Andras Olah for their incredibly detailed reviews of the entire manuscript, finding many errors and providing valuable technical suggestions. My thanks also to Vern Paxson for making available his software for analyzing Tcpdump traces, and to Andras Olah for his help with T/TCP over the past year. My thanks also to Bob Braden, the designer of T/TCP who provided the reference source code implementation on which Part l of this book is based.
  Others helped in significant ways. Cary Wright and Jim Hogue provided the system on which the data for Chapter 14 was collected. Doug Schmidt provided a copy of the public domain TTCP program that uses Unix domain sockets, for the timing measurements in Chapter 16. Craig Partridge provided a copy of the RDP source code to examine. Mike Karels answered lots of questions.
  My thanks once again to the National Optical Astronomy Observatories (NOAO),Sidney Wolff, Richard Wolff, and Steve Grandi, for providing access to their networks and hosts.
  Finally, my thanks to all the staff at Addison-Wesley, who have helped over the past years, especially my editor John Wait.
  As usual, camera-ready copy of the book was produced by the author, a Troff diehard, using the Groff package written by James Clark. I welcome electronic mail from any readers with comments, suggestions, or bug fixes.
  
Tucson, Arizona W. Richard Stevens
November 1995 rstevens@noao . edu
http : //www.noao . edu/~rstevens

作者简介

(美)W.Richard Stevens:W.Richard Stevens: W. Richard Stevens (1951~1999) 是一位非常受人尊敬的专家,除了《TCP/IP详解》三卷本外,他还有其他两部最为畅销的作品:《UNIX环境高级编程》和《UNIX网络编程》(两卷本)。

图书目录

Part 1. TCP for Transactions
Chapter 1 . T/TCP Introduetion
1 .1 Introduction
1 .2 UDP Client-Server
1 .S TCP Client-Server
1 .4 T/TCP Client-Server
1 .5 Test Network
1 .6 Timing Example
1 .7 Applications
1 .8 History
1 .9 Implementations
1 .10 Summary
Chapter 2. T/TCP Protocol
2.1 Introduction
2.2 New TCP Options for T/TCP
2.3 T/TCP Implementation Variables
2.4 State Transition Diagram
2.5 T/TCP Extended States
2.6 Summary
Chapter 3. T/TCP Examples
3.1 Introduction
3.2 Client Reboot
3.9 Normal T/TCP Transaction
3.4 Server Receives Old Duplicate SYN
3.5 Server Reboot
3.6 Request or Reply Exceeds MSS
3.7 Backward Compatibility
3.8 Summary
Chapter 4. T/TCP Protocol (Continued)
4.1 Introduction
4.2 Client Port Numbers and TIME_WAIT State
4.9 Purpose of the TIME_WAIT State
4.4 TIME_WAIT State Truncation
4.5 Avoiding the Three-Way Handshake with TAO
4.6 Summary
Chapter 5. T/TCP Implementation: Socket Layer
5.1 Introduction
5.2 Constants
5.3 sosend Function
5.4 Summary
Chapter 6. T/TCP Implementation: Routing Table
6.1 Introduction
6.2 Code Introduction
6.3 radix_node_head Structure
6.4 rtentry Structure
6.5 rt_metrics Structure
6.6 in inithead Function
6.7 in_addroute Function
6.8 in_matroute Function
6.9 in_clsroute Function
6.1O in_rtqtimo Function
6.11 in_rtqkill Function
6.12 Summary
Chapter 7. T/TCP Implementation: Protocol Control Blocks
7.1 Introduction
7.2 in_pcbladdr Function
7.3 in_pcbconnect Function
7.4 Summary
Chapter 8. TnCP Implementation: TCP Overview
8. 1 Introduction
8.2 Gode Introduction
8.3 TCP protosw Structure
8.4 TCP Control Block
8.5 tcp_init Function
B.6 tcp_slowtimo Function
B.7 Summary
Chapter 9. T/TCP Implementation: TCP Output
9.1 introduction
9.2 tcp_output Function
9.3 Summary
Chapter 10. T/TCP Implementation: TCP Functiens
10.1 Introduction
10.2 tcp_newtcpcb Function
10.3 tcp_rtlookup Function
10.4 tcp_gettaocache Function
10.5 Retransmission Timeout Calculations
10.6 tcp_close Function
10.7 tcp_msssend Function
10.8 tcp_mssrcvd Function
10.9 tcp_dooptions Function
10.10 tcp_reass Function
10.1 1 Summaty
Chapter 11. T/TCP Implementation: TCP Input
11 .1 Introdudion
11 .2 Preliminary Processing
11 .3 Header Prediction
11 .4 Initiation of Passive Open
11 .5 Initiation of Active Open
11 .6 PAWS: Protection Against Wrapped Sequence Numbers
11 .7 ACK Processing
11.8 Completion of Passive Opens and Simultaneous Opens
11 .9 ACK Processing (Continued) .
11 .10 FIN Processing
11.11 Summary
Chapter 12. T/TCP Implementation: TCP User Requests
12.1 Introduction
12.2 PRU_CONNECT Request
12.3 tcp_connect Function
12.4 PRU_SEND and PRU_SEND_EOF Requests
12.5 tcp_usrclosed Function
12.6 tcp_sysctl Function
12.7 T/TCP Futures
12.8 Summary
Part 2. Additional TCP Applications
Chapter 19. HTTP: Hypertext Transfer Protocol
13.1 Introduction
13.2 Introduction to HTTP and HTML
13.3 HTTP Protocol
13.4 An Example
13.5 HTTP Statistics
13.6 Performance Problems
13.7 Summary
Chapter 14. Packets Found on an HTTP Server
14.1 Introduction
14.2 Multiple HTTP Servers
14.3 Client SYN Interarrival Time
14.4 RTT Measurements
14.5 listen Backlog Queue
14.6 Client SYN Options
14.7 Client SYN Retransmissions
14.8 Domain Names
14.8 Timing Out Persist Probes
14.10 Simulation of T/TCP Routing Table Size
14.11 Mbuf Interaction
14.12 TCP PCB Cache and Header Prediction
14.13 Summary
Chapter 15. NNTP: Network News Transter Protocol
15.1 Introduction
15.2 NNTP Protocol
15.3 A Simple News Client
15.4 A More Sophisticated News Client
15.5 NNTP Statistics
15.6 Summary
Part 3. The Unix Domain Protocols
Chapter 16. Unix Domain Protocols: Introduction
16.1 Introduction
16.2 Usage
16.3 Performance
16.4 Coding Examples
16.5 Summary
Chapter 17. Unix Domain Protocols: Implementation
17.1 Introduction
17.2 Code Introduction
17.3 Unix domain and protosw Structures
17.4 Unix Domain Socket Address Structures
17.5 Unix Domain Protocol Control Blocks
17.e uipc_usrreq Function
17.7 PRU_ATTACH Request and unp_attach Function
17.8 PRU_DETACH Request and unp_detach Function
17.8 PRU_BIND Request and unp_bind Function
17.10 PRU_CORNECT Request and unp_connect Function
17.11 PRU_CONNECT2 Request and unp_connect2 Function
17.12 socketpair System Call
17.13 pipe System Call
17.14 PRU_ACCEPT Request
17.15 PRU_DISCONNECT Request and unp_disconnect Function
17.16 PRU_SHUTDOWN Request and unp_shutdown Function
17.17 PRU_ABORT Request and unp_drop Function
17.18 Miscellaneous Requests
17.19 Summary
Chapter 18. Unix Domain Protocols: I/O and Descriptor Passing
18.1 Introduction
18.2 PRU_SENO and PRU_RCVD Requests
18.3 Descriptor Passing
18.4 unp_internalize Function
18.5 unp_externalize Function
IB.6 unp_discard Function
18.7 unp_dispose Function
18.8 unp_scan Function
18.9 unp_gc Function .
18.10 unp_mark Function
18.11 Performance (Revisited)
18.12 Summary
Appendix A. Measuring Network Times
A.1 RTT Measurements Using Ping
A.2 Protocol Stack Measurements
A.3 Latency and Bandwidth
Appendix B.' Coding Applications for T/TCP
Bibliography
Index

教学资源推荐
作者: 熊建强 黄文斌 彭庆喜 主编
作者: [美]拉里·L. 彼得森(Larry L. Peterson),[美]布鲁斯·S. 戴维(Bruce S. Davie) 著
作者: 吴英 杨凯 刘博 编著
参考读物推荐
作者: 吴功宜 吴英 编著
作者: 山金孝 潘晓华 刘世民 著
作者: [美]布鲁斯·施奈尔〔Bruce Schneier〕 著
作者: 孙燕唐等译