did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780130320711

Internetworking with TCP/IP, Vol. III Client-Server Programming and Applications, Linux/Posix Sockets Version

by ;
  • ISBN13:

    9780130320711

  • ISBN10:

    0130320714

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2000-09-11
  • Publisher: Pearson

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

List Price: $89.99 Save up to $22.50
  • Buy Used
    $67.49
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Internetworking with TCP/IP, Volume IIIdescribes the fundamental concepts of client-server computing used to build all distributed computing systems, and presents an in-depth guide to the Posix sockets standard utilized by Linux and other operating systems. Dr. Douglas E. Comer compares leading server designs, and describes the key tools and techniques used to build clients and servers, including Remote Procedure Call (RPC). The book contains examples of running programs that illustrate each approach.Comer introduces the client-server model and its software design implications; the role of concurrent processing and threads; the Socket API, and differences that impact Linux programmers. Understand the key algorithms and issues associated with client and server software design; then review three leading approaches: iterative, connectionless servers (UPD); and both iterative and concurrent connection-oriented servers (TCP). The book contains extensive coverage of threading, including a new chapter on using threads for concurrency; as well as coverage of single-threaded and multi-threaded concurrent servers. Comer introduces multi-protocol and multi-service services; reviews client concurrency; tunneling at the transport and application levels; and external data representation (XDR). He reviews RPC, distributed program generation, NFS concepts and protocol; Telnet; streaming media transport; and finally, techniques for avoiding deadlock and starvation in client-server systems.For everyone who wants to master TCP/IP and understand how the Internet works.

Author Biography

Douglas E. Comer is a professor at Purdue University where he teaches popular computer networking courses.

Table of Contents

Foreword xxiii
Preface xxv
Introduction And Overview
1(8)
Internet Applications Using TCP/IP
1(1)
Designing Applications For A Distributed Environment
1(1)
Standard And Nonstandard Application Protocols
2(1)
An Example Of Standard Application Protocol Use
2(1)
An Example TELNET Connection
3(1)
Using TELNET To Access An Alternative Service
4(1)
Application Protocols And Software Flexibility
5(1)
Viewing Services From The Provider's Perspective
6(1)
The Remainder Of This Text
6(1)
Summary
7(2)
The Client Server Model And Software Design
9(14)
Introduction
9(1)
Motivation
10(1)
Terminology And Concepts
10(10)
Clients And Servers
11(1)
Privilege And Complexity
11(1)
Standard Vs. Nonstandard Client Software
12(1)
Parameterization Of Clients
12(1)
Connectionless Vs. Connection-Oriented Servers
13(1)
Stateless Vs. Stateful Servers
14(1)
A Stateless File Server Example
15(1)
A Stateful File Server Example
15(1)
Identifying A Client
16(2)
Statelessness Is A Protocol Issue
18(1)
Servers As Clients
19(1)
Summary
20(3)
Concurrent Processing In Client-Server Software
23(16)
Introduction
23(1)
Concurrency In Networks
23(2)
Concurrency In Servers
25(1)
Terminology And Concepts
26(3)
The Process Concept
26(1)
Sharing Of Local And Global Variables
27(1)
Procedure Calls
28(1)
An Example Of Concurrent Process Creation
29(5)
A Sequential C Example
29(1)
A Concurrent Version
30(1)
Timeslicing
31(1)
Singly-Threaded Process Assumption
32(1)
Making Processes Diverge
33(1)
Executing New Code
34(1)
Context Switching And Protocol Software Design
34(1)
Concurrency and Asynchronous I/O
35(1)
Summary
36(3)
Application Interface To Protocols
39(8)
Introduction
39(1)
Loosely Specified Protocol Software Interface
39(1)
Advantages And Disadvantages
40(1)
Interface Functionality
40(1)
Conceptual Interface Specification
41(1)
System Calls
42(1)
Two Basic Approaches To Network Communication
43(1)
The Basic I/O Functions Available In Linux
43(2)
Using Linux I/O With TCP/IP
45(1)
Summary
45(2)
The Socket API
47(16)
Introduction
47(1)
Berkeley Sockets
47(1)
Specifying A Protocol Interface
48(1)
The Socket Abstraction
49(3)
Socket Descriptors And File Descriptors
49(1)
System Data Structures For Sockets
50(1)
Making A Socket Active Or Passive
51(1)
Specifying An Endpoint Address
52(1)
A Generic Address Structure
52(2)
Major System Calls In The Socket API
54(4)
The Socket Call
54(1)
The Connect Call
54(1)
The Send Call
55(1)
The Recv Call
55(1)
The Close Call
55(1)
The Bind Call
56(1)
The Listen Call
56(1)
The Accept Call
56(1)
Using Read And Write With Sockets
56(1)
Summary Of Socket Calls
57(1)
Utility Routines For Integer Conversion
58(1)
Using Socket Calls In A Program
58(1)
Symbolic Constants For Socket Call Parameters
59(1)
Summary
60(3)
Algorithms And Issues In Client Software Design
63(18)
Introduction
63(1)
Learning Algorithms Instead Of Details
63(1)
Client Architecture
64(1)
Identifying The Location Of A Server
64(2)
Parsing An Address Argument
66(1)
Looking Up A Domain Name
67(1)
Looking Up A Well-Known Port By Name
68(1)
Port Numbers And Network Byte Order
68(1)
Looking Up A Protocol By Name
69(1)
The TCP Client Algorithm
69(1)
Allocating A Socket
70(1)
Choosing A Local Protocol Port Number
71(1)
A Fundamental Problem In Choosing A Local IP Address
71(1)
Connecting A TCP Socket To A Server
72(1)
Communicating With The Server Using TCP
72(1)
Receiving A Response From A TCP Connection
73(1)
Closing A TCP Connection
74(1)
The Need For Partial Close
74(1)
A Partial Close Operation
74(1)
Programming A UDP Client
75(1)
Connected And Unconnected UDP Sockets
76(1)
Using Connect With UDP
76(1)
Communicating With A Server Using UDP
76(1)
Closing A Socket That Uses UDP
77(1)
Partial Close For UDP
77(1)
A Warning About UDP Unreliability
77(1)
Summary
77(4)
Example Client Software
81(20)
Introduction
81(1)
The Importance Of Small Examples
81(1)
Hiding Details
82(1)
An Example Procedure Library For Client Programs
82(1)
Implementation Of ConnectTCP
83(1)
Implementation Of ConnectUDP
84(1)
A Procedure That Forms Connections
85(3)
Using The Example Library
88(1)
The DAYTIME Service
88(1)
Implementation Of A TCP Client For DAYTIME
89(1)
Reading From A TCP Connection
90(1)
The TIME Service
91(1)
Accessing the TIME Service
91(1)
Accurate Times And Network Delays
92(1)
A UDP Client For The TIME Service
92(2)
The ECHO Service
94(1)
A TCP Client For The ECHO Service
94(2)
A UDP Client For The ECHO Service
96(2)
Summary
98(3)
Algorithms And Issues In Server Software Design
101(24)
Introduction
101(1)
The Conceptual Server Algorithm
101(1)
Concurrent Vs. Iterative Servers
102(1)
Connection-Oriented Vs. Connectionless Access
102(1)
Transport Protocol Semantics
103(1)
TCP Semantics
103(1)
UDP Semantics
103(1)
Choice Of Transport
104(1)
Connection-Oriented Servers
104(1)
Connectionless Servers
105(1)
Failure, Reliability, And Statelessness
106(1)
Optimizing Stateless Servers
106(3)
Four Basic Types Of Servers
109(1)
Request Processing Time
109(1)
Iterative Server Algorithms
110(1)
An Iterative, Connection-Oriented Server Algorithm
110(1)
Binding To A Well-Known Address Using INADDR_ANY
111(1)
Placing The Socket In Passive Mode
112(1)
Accepting Connections And Using Them
112(1)
An Iterative, Connectionless Server Algorithm
112(1)
Forming A Reply Address In A Connectionless Server
113(1)
Concurrent Server Algorithms
114(1)
Master And Slaves
114(1)
A Concurrent, Connectionless Server Algorithm
115(1)
A Concurrent, Connection-Oriented Server Algorithm
116(1)
Implementations Of Server Concurrency
117(1)
Using Separate Programs As Slaves
118(1)
Apparent Concurrency Using A Single Thread
118(1)
When To Use Each Server Type
119(1)
A Summary of Server Types
120(1)
The Important Problem Of Server Deadlock
121(1)
Alternative Implementations
122(1)
Summary
122(3)
Iterative, Connectionless Servers (UDP)
125(10)
Introduction
125(1)
Creating A Passive Socket
125(4)
Process Structure
129(1)
An Example TIME Server
130(2)
Summary
132(3)
Iterative, Connection-Oriented Servers (TCP)
135(8)
Introduction
135(1)
Allocating A Passive TCP Socket
135(1)
A Server For The DAYTIME Service
136(1)
Process Structure
136(1)
An Example DAYTIME Server
137(3)
Closing Connections
140(1)
Connection Termination And Server Vulnerability
140(1)
Summary
141(2)
Concurrent, Connection-Oriented Servers (TCP)
143(8)
Introduction
143(1)
ECHO Service
143(1)
Iterative Vs. Concurrent Implementations
144(1)
Process Structure
144(1)
An Example Concurrent ECHO Server
145(4)
Cleaning Up Errant Processes
149(1)
Summary
150(1)
Using Threads For Concurrency (TCP)
151(12)
Introduction
151(1)
Overview Of Linux Threads
151(1)
Advantages Of Threads
152(1)
Disadvantages Of Threads
153(1)
Descriptors, Delay, And Exit
153(1)
Thread Exit
154(1)
Thread Coordination And Synchronization
154(2)
Mutex
154(1)
Semaphore
155(1)
Condition Variable
155(1)
An Example Server Using Threads
156(4)
Monitor And Control
160(1)
Summary
161(2)
Single-Thread, Concurrent Servers (TCP)
163(8)
Introduction
163(1)
Data-driven Processing In A Server
163(1)
Data-Driven Processing With A Single Thread
164(1)
Process Structure Of A Single-Thread Server
165(1)
An Example Single-Thread ECHO Server
166(2)
Summary
168(3)
Multiprotocol Servers (TCP, UDP)
171(8)
Introduction
171(1)
The Motivation For Reducing The Number Of Servers
171(1)
Multiprotocol Server Design
172(1)
Process Structure
172(1)
An Example Multiprotocol DAYTIME Server
173(4)
The Concept Of Shared Code
177(1)
Concurrent Multiprotocol Servers
177(1)
Summary
178(1)
Multiservice Servers (TCP, UDP)
179(20)
Introduction
179(1)
Consolidating Servers
179(1)
A Connectionless, Multiservice Server Design
180(1)
A Connection-Oriented, Multiservice Server Design
181(1)
A Concurrent, Connection-Oriented, Multiservice Server
182(1)
A Single-Thread, Multiservice Server Implementation
182(1)
Invoking Separate Programs From A Multiservice Server
183(2)
Multiservice, Multiprotocol Designs
185(1)
An Example Multiservice Server
185(7)
Static and Dynamic Server Configuration
192(1)
The Super Server, Inetd
193(2)
An Example Inetd Server
195(2)
A List Of Server Variations
197(1)
Summary
197(2)
Uniform, Efficient Management Of Server Concurrency
199(14)
Introduction
199(1)
Choosing Between An Iterative And A Concurrent Design
199(1)
Level Of Concurrency
200(1)
Demand-Driven Concurrency
201(1)
The Cost Of Concurrency
201(1)
Overhead And Delay
202(1)
Small Delays Can Matter
202(2)
Slave Preallocation
204(4)
Preallocation In Linux
204(1)
Preallocation In A Connection-Oriented Server
205(1)
Mutex, File Locking, and Concurrent Calls To Accept
206(1)
Preallocation In A Connectionless Server
207(1)
Preallocation, Bursty Traffic, And NFS
208(1)
Preallocation On A Multiprocessor
208(1)
Delayed Slave Allocation
208(2)
The Uniform Basis For Both Techniques
210(1)
Combining Techniques
210(1)
Summary
211(2)
Concurrency In Clients
213(14)
Introduction
213(1)
The Advantages Of Concurrency
213(1)
The Motivation For Exercising Control
214(1)
Concurrent Contact With Multiple Servers
215(1)
Implementing Concurrent Clients
216(1)
Single-Thread Implementations
217(1)
An Example Concurrent Client That Uses ECHO
218(4)
Execution Of The Concurrent Client
222(2)
Concurrency In The Example Code
224(1)
Summary
224(3)
Tunneling At The Transport And Application Levels
227(10)
Introduction
227(1)
Multiprotocol Environments
227(2)
Mixing Network Technologies
229(1)
Dynamic Circuit Allocation
230(1)
Encapsulation And Tunneling
231(1)
Tunneling Through An IP Internet
232(1)
Application-Level Tunneling Between Clients And Servers
232(1)
Tunneling, Encapsulation, And Dialup Phone Lines
233(1)
Summary
234(3)
Application Level Gateways
237(20)
Introduction
237(1)
Clients And Servers In Constrained Environments
237(1)
The Reality Of Limited Access
237(1)
Computers With Limited Functionality
238(1)
Connectivity Constraints That Arise From Security
238(1)
Using Application Gateways
238(2)
Interoperability Through A Mail Gateway
240(1)
Implementation Of A Mail Gateway
240(1)
A Comparison Of Application Gateways And Tunneling
241(2)
Application Gateways And Limited Internet Connectivity
243(2)
Application Gateways Used For Security
245(1)
Application Gateways And The Extra Hop Problem
245(2)
An Example Application Gateway
247(1)
Implementation Of An Application Gateway
248(2)
Code For The Application Gateway
250(1)
An Example Gateway Exchange
251(1)
Using Rfcd With forward Or Slocal
252(1)
A General-Purpose Application Gateway
253(1)
Operation Of SLIRP
253(1)
How SLIRP Handles Connections
254(1)
IP Addressing And SLIRP
254(1)
Summary
255(2)
External Data Representation (XDR)
257(14)
Introduction
257(1)
Representations Of Data
257(1)
Asymmetric Conversion And The N-Squared Problem
258(1)
Network Standard Byte Order
259(2)
A De Facto Standard External Data Representation
261(1)
XDR Data Types
261(2)
Implicit Types
263(1)
Software Support For Using XDR
263(1)
XDR Library Routines
263(1)
Building A Message One Piece At A Time
264(1)
Conversion Routines In The XDR Library
265(2)
XDR Streams, I/O, and TCP
267(1)
Records, Record Boundaries, And Datagram I/O
268(1)
Summary
268(3)
Remote Procedure Call Concept (RPC)
271(24)
Introduction
271(1)
Remote Procedure Call Model
271(1)
Two Paradigms For Building Distributed Programs
272(1)
A Conceptual Model For Conventional Procedure Calls
273(1)
An Extension Of the Procedural Model
274(1)
Execution Of Conventional Procedure Call And Return
274(1)
The Procedural Model In Distributed Systems
275(1)
Analogy Between Client-Server And RPC
276(1)
Distributed Computation As A Program
277(1)
Sun Microsystems' Remote Procedure Call Definition
278(1)
Remote Programs And Procedures
278(1)
Reducing The Number Of Arguments
279(1)
Identifying Remote Programs And Procedures
279(1)
Accommodating Multiple Versions Of A Remote Program
280(1)
Mutual Exclusion For Procedures In A Remote Program
281(1)
Communication Semantics
282(1)
At Least Once Semantics
282(1)
RPC Retransmission
283(1)
Mapping A Remote Program To A Protocol Port
283(1)
Dynamic Port Mapping
284(1)
RPC Port Mapper Algorithm
285(2)
ONC RPC Message Format
287(1)
Marshaling Arguments For A Remote Procedure
288(1)
Authentication
288(2)
An Example Of RPC Message Representation
290(1)
An Example Of The UNIX Authentication Field
290(1)
Summary
291(4)
Distributed Program Generation (Rpcgen Concept)
295(12)
Introduction
295(1)
Using Remote Procedure Calls
296(1)
Programming Mechanisms To Support RPC
297(1)
Dividing A Program Into Local And Remote Procedures
298(1)
Adding Code For RPC
299(1)
Stub Procedures
299(1)
Multiple Remote Procedures And Dispatching
300(1)
Name Of The Client-Side Stub Procedure
301(1)
Using Rpcgen To Generate Distributed Programs
302(1)
Rpcgen Output And Interface Procedures
302(2)
Rpcgen Input And Output
304(1)
Using Rpcgen To Build A Client And Server
304(1)
Summary
305(2)
Distributed Program Generation (Rpcgen Example)
307(40)
Introduction
307(1)
An Example To Illustrate Rpcgen
308(1)
Dictionary Operations
308(1)
Eight Steps To A Distributed Application
309(1)
Build A Conventional Application Program
310(4)
Divide The Program Into Two Parts
314(6)
Create An Rpcgen Specification
320(2)
Run Rpcgen
322(1)
The .h File Produced By Rpcgen
322(3)
The XDR Conversion File Produced By Rpcgen
325(1)
The Client Code Produced By Rpcgen
326(2)
The Server Code Produced By Rpcgen
328(3)
Write Stub Interface Procedures
331(4)
Client-Side Interface Routines
331(2)
Server-Side Interface Routines
333(2)
Compile And Link The Client Program
335(4)
Compile And Link The Server Program
339(2)
Start The Server And Execute The Client
341(1)
Using The Make Utility
341(3)
Summary
344(3)
Network File System Concepts (NFS)
347(30)
Introduction
347(1)
Remote File Access Vs. Transfer
347(1)
Operations On Remote Files
348(1)
File Access Among Heterogeneous Computers
348(1)
Stateless Servers
349(1)
NFS And UNIX File Semantics
349(1)
Review Of The UNIX File System
349(14)
Basic Definitions
350(1)
A Byte Sequence Without Record Boundaries
350(1)
A File's Owner And Group Identifiers
350(1)
Protection And Access
351(1)
The Open-Read-Write-Close Paradigm
352(1)
Data Transfer
353(1)
Permission To Search A Directory
353(1)
Random Access
354(1)
Seeking Beyond The End Of File
354(1)
File Position And Concurrent Access
355(1)
Semantics Of Write During Concurrent Access
356(1)
File Names And Paths
356(1)
Inode: Information Stored With A File
357(1)
Stat Operation
358(1)
The File Naming Mechanism
359(1)
File System Mounts
360(2)
File Name Resolution
362(1)
Symbolic Links
363(1)
Files Under NFS
363(1)
NFS File Types
364(1)
NFS File Modes
364(1)
NFS File Attributes
365(1)
NFS Client And Server
366(1)
NFS Client Operation
367(1)
NFS Client And UNIX Systems
368(1)
NFS Mounts
369(1)
File Handle
370(1)
Handles Replace Path Names
370(2)
File Positioning With A Stateless Server
372(1)
Operations On Directories
372(1)
Reading A Directory Statelessly
372(1)
Multiple Hierarchies In An NFS Server
373(1)
The Mount Protocol
374(1)
Transport Protocols For NFS
374(1)
Summary
375(2)
Network File System Protocols (NFS, Mount)
377(20)
Introduction
377(1)
Using RPC To Define A Protocol
377(1)
Defining A Protocol With Data Structures And Procedures
378(1)
NFS Constant, Type, And Data Declarations
379(4)
NFS Constants
379(1)
NFS Typedef Declarations
380(1)
NFS Data Structures
380(3)
NFS Procedures
383(2)
Semantics Of NFS Operations
385(4)
NFSPROC3_NULL (Procedure 0)
385(1)
NFSPROC3_GETATTR (Procedure 1)
385(1)
NFSPROC3_SETATTR (Procedure 2)
385(1)
NFSPROC3_LOOKUP (Procedure 3)
385(1)
NFSPROC3_ACCESS (Procedure 4)
385(1)
NFSPROC3_READLINK (Procedure 5)
385(1)
NFSPROC3_READ (Procedure 6)
386(1)
NFSPROC3_WRITE (Procedure 7)
386(1)
NFSPROC3_CREATE (Procedure 8)
386(1)
NFSPROC3_MKDIR (Procedure 9)
386(1)
NFSPROC3_SYMLINK (Procedure 10)
386(1)
NFSPROC3_MKNOD (Procedure 11)
386(1)
NFSPROC3_REMOVE (Procedure 12)
387(1)
NFSPROC3_RMDIR (Procedure 13)
387(1)
NFSPROC3_RENAME (Procedure 14)
387(1)
NFSPROC3_LINK (Procedure 15)
387(1)
NFSPROC3_READDIR (Procedure 16)
387(1)
NFSPROC3_READDIRPLUS (procedure 17)
388(1)
NFSPROC3_FSSTAT (Procedure 18)
388(1)
NFSPROC3_FSINFO (Procedure 19)
388(1)
NFSPROC3_PATHCONF (Procedure 20)
388(1)
NFSPROC3_COMMIT (Procedure 21)
389(1)
The Mount Protocol
389(2)
Mount Constant Definitions
389(1)
Mount Type Definitions
389(1)
Mount Data Structures
390(1)
Procedures In The Mount Protocol
391(1)
Semantics of Mount Operations
391(2)
MOUNTPROC3_NULL (Procedure 0)
392(1)
MOUNTPROC3_MNT (Procedure 1)
392(1)
MOUNTPROC3_DUMP (Procedure 2)
392(1)
MOUNTPROC3_UMNT (Procedure 3)
392(1)
MOUNTPROC3_UMNTALL (Procedure 4)
392(1)
MOUNTPROC3_EXPORT (Procedure 5)
392(1)
NFS And Mount Authentication
393(1)
File Locking
394(1)
Changes In NFS Between Versions 3 And 4
394(1)
Summary
395(2)
A Telnet Client (Program Structure)
397(38)
Introduction
397(1)
Overview
398(2)
The User's Terminal
398(1)
Command And Control Information
398(1)
Terminals, Windows, and Files
398(1)
The Need For Concurrency
399(1)
A Process Model For A TELNET Client
400(1)
A TELNET Client Algorithm
400(1)
Terminal I/O In Linux
401(2)
Controlling A Device Driver
402(1)
Establishing Terminal Modes
403(2)
Global Variable Used For Stored State
405(1)
Restoring Terminal Modes Before Exit
406(1)
Client Suspension And Resumption
407(1)
Finite State Machine Specification
408(1)
Embedding Commands In A TELNET Data Stream
409(1)
Option Negotiation
410(1)
Request/Offer Symmetry
410(1)
TELNET Character Definitions
411(1)
A Finite State Machine For Data From The Server
412(1)
Transitions Among States
413(2)
A Finite State Machine Implementation
415(1)
A Compact FSM Representation
415(2)
Keeping The Compact Representation At Run-Time
417(1)
Implementation Of A Compact Representation
417(2)
Building An FSM Transition Matrix
419(2)
The Socket Output Finite State Machine
421(2)
Definitions For The Socket Output FSM
423(1)
The Option Subnegotiation Finite State Machine
424(1)
Definitions For The Option Subnegotiation FSM
425(1)
FSM Initialization
426(1)
Arguments For The TELNET Client
427(1)
The Heart Of The TELNET Client
428(4)
Implementation Of The Main FSM
432(1)
Summary
433(2)
A TELNET Client (Implementation Details)
435(32)
Introduction
435(1)
The FSM Action Procedures
435(1)
Recording The Type Of An Option Request
436(1)
Performing No Operation
437(1)
Responding To WILL/WONT For The Echo Option
437(2)
Responding To WILL/WONT For Unsupported Options
439(1)
Responding To WILL/WONT For The No Go-Ahead Option
439(2)
Generating DO/DONT For Binary Transmission
441(1)
Responding To DO/DONT For Unsupported Options
442(1)
Responding To DO/DONT For Transmit Binary Option
442(2)
Responding To DO/DONT For The Terminal Type Option
444(1)
Option Subnegotiation
445(1)
Sending Terminal Type Information
446(2)
Terminating Subnegotiation
448(1)
Sending A Character To The Server
448(2)
Displaying Incoming Data On The User's Terminal
450(3)
Using Termcap To Control The User's Terminal
453(2)
Writing A Block Of Data To The Server
455(1)
Interacting With The Client Process
456(1)
Responding To Illegal Commands
456(1)
Scripting To A File
457(1)
Implementation Of Scripting
457(1)
Initialization Of Scripting
458(1)
Collecting Characters Of The Script File Name
459(1)
Opening A Script File
460(2)
Terminating Scripting
462(1)
Printing Status Information
463(1)
Summary
464(3)
Streaming Audio And Video Transport (RTP Concept And Design)
467(20)
Introduction
467(1)
Streaming Service
467(1)
Real-Time Delivery
468(1)
Protocol Compensation For Jitter
468(1)
Retransmission, Loss, And Recovery
469(1)
Real-Time Transport Protocol
470(1)
Stream Translation And Mixing
471(1)
Delayed Playback And Jitter Buffers
471(1)
RTP Control Protocol (RTCP)
472(2)
Synchronizing Multiple Streams
474(1)
RTP Transport And Many-To-Many Transmission
475(1)
Sessions, Streams, Protocol Ports, And Demultiplexing
476(1)
Basic Approaches To Encoding
477(1)
Conceptual Organization Of RTP Software
478(1)
Process/Thread Structure
479(2)
Semantics Of The API
481(1)
Jitter Buffer Design And Rebuffering
482(1)
Event Handling
483(1)
Playback Anomaly And Timestamp Complications
483(1)
Size of An Example Real-Time Library
484(1)
An Example MP3 Player
484(1)
Summary
485(2)
Streaming Audio And Video Transport (Example RTP Implementation)
487(28)
Introduction
487(1)
An Integrated Implementation
487(1)
Program Architecture
488(1)
RTP Definitions
488(4)
Manipulation Of Time Values
492(1)
RTP Sequence Space Processing
493(1)
RTP Packet Queue Manipulation
494(2)
RTP Input Processing
496(3)
Keeping Statistics For RTCP
499(1)
RTP Initialization
500(4)
RTCP Definitions
504(2)
Receiving RTCP Sender Reports
506(1)
Generating RTCP Receiver Reports
507(2)
RTCP Header Creation
509(1)
RTCP Delay Computation
510(1)
Generation Of An RTCP Bye Message
511(1)
Size Of An Integrated Implementation
511(1)
Summary
512(3)
Practical Hints And Techniques For Linux Servers
515(18)
Introduction
515(1)
Operating In Background
515(1)
Programming A Server To Operate In Background
516(1)
Open Descriptors And Inheritance
517(1)
Programming A Server To Close Inherited Descriptors
518(1)
Signals From The Controlling TTY
518(1)
Programming A Server To Change Its Controlling TTY
519(1)
Moving To A Safe And Known Directory
519(1)
Programming A Server To Change Directories
520(1)
The Linux Umask
520(1)
Programming A Server To Set Its Umask
521(1)
Process Groups
521(1)
Programming A Server To Set Its Process Group
521(1)
Descriptors For Standard I/O
522(1)
Programming A Server To Open Standard Descriptors
522(1)
Mutual Exclusion For The Server
522(1)
Programming A Server To Avoid Multiple Copies
523(1)
Recording A Server's Process ID
524(1)
Programming A Server To Record Its Process ID
524(1)
Waiting For A Child Process To Exit
524(1)
Programming A Server To Wait For Each Child To Exit
525(1)
Extraneous Signals
525(1)
Programming A Server To Ignore Extraneous Signals
525(1)
Using A System Log Facility
525(6)
Generating Log Messages
525(1)
The Advantage Of Indirection And Standard Error
526(1)
Limitations Of I/O Redirection
527(1)
A Client-Server Solution
527(1)
The Syslog Mechanism
528(1)
Syslog Message Classes
528(1)
Syslog Facilities
528(1)
Syslog Priority Levels
529(1)
Using Syslog
529(1)
An Example Syslog Configuration File
530(1)
Summary
531(2)
Deadlock And Starvation In Client-Server Systems
533(10)
Introduction
533(1)
Definition Of Deadlock
534(1)
Difficulty Of Deadlock Detection
534(1)
Deadlock Avoidance
535(1)
Deadlock Between A Client And Server
535(1)
Avoiding Deadlock In A Single Interaction
536(1)
Starvation Among A Set Of Clients And A Server
536(1)
Busy Connections And Starvation
537(1)
Avoiding Blocking Operations
538(1)
Processes, Connections, And Other Limits
538(1)
Cycles Of Clients And Servers
539(1)
Documenting Dependencies
540(1)
Summary
540(3)
Appendix 1 System Calls And Library Routines Used With Sockets 543(30)
Appendix 2 Manipulation Of Linux File And Socket Descriptors 573(4)
Bibliography 577(8)
Index 585

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

Preface The Linux operating system is soaring in popularity, and especially important in the networking community as the system for many servers. This new version of Volume 3, which uses Linux, is aimed at programmers who want to understand how to create networking applications. Broadly speaking, it examines the question, "How does application software use TCP/IP protocols to communicate across an internet?" The text focuses on the client-server paradigm, and examines algorithms for both the client and server components of a distributed program. It shows an implementation that illustrates each design, and discusses techniques including application-level gateways and tunneling. In addition, it reviews several standard application protocols, and uses them to illustrate the algorithms and implementation techniques. Although this volume can be read and used alone, it forms part of a larger picture completed by two other volumes in the series. Volume 1 considers the question "What is a TCP/IP internet?" Volume 2 examines the question, "How does TCP/IP software work?" It presents more details, examines working code, and explores greater depth than the first volume. Thus, although a programmer can learn to create network applications from Volume 3 alone, the other volumes can be used to provide a better understanding of the underlying technologies. This version of Volume 3 includes the latest technologies. For example, a chapter explains how a Linux program can use the POSIX thread facilities to create a concurrent server. The chapter on NFS discusses version 3, the version that is about to emerge in the Linux community. In addition, sections have been included to explain concepts behind programs like slirpthat provide Internet access over a dialup telephone connection without requiring each computer to have a unique IP address. Two chapters that stand out as especially timely concentrate on streamingand the associated technologies used to send audio and video across the Internet. Chapter 28 describes fundamental concepts such as the Real-time Transport Protocol (RTP), encoding, and jitter buffers. Chapter 29 shows an implementation of RTP that is used to receive and play MP3 audio. The code for all examples in the text is available online. To access a copy via the Web, look for Volume 3 in the list of networking books at location: http://www.cs.purdue.edulhomes/comer/netbooks.html To access the code via FTP, use location: ftp://ftp.cs.purdue.edu/pub/Xinu/TCPIP-vol3.linux.dist.tar.Z The text is organized as follows. Beginning chapters introduce the client-server paradigm and the socket interface that application programs use to access TCP/IP protocol software. They also describe concurrent processes and the operating system functions used to create them. Chapters that follow the introductory material discuss client and server designs. The text explains that the myriad of possible designs are not random. Instead, they follow a pattern that can be understood by considering the choice of concurrency and transport. For example, one chapter discusses a nonconcurrent server design that uses connection-oriented transport (e.g., TCP), while another discusses a similar design that uses connectionless transport (e.g., UDP). We describe how each design fits into the space of possible implementations, but do not try to develop an abstract "theory" of client-server interactions. Instead, we emphasize practical design principles and techniques that are important to programmers. Each technique has advantages in some circumstances, and each has been used in working software. We believe that understanding the conceptual ties among the designs will help the reader appreciate the strengths and ''weaknesses of each approach, and will make it easier to choose among them. The text contains example programs that show how each design operates in practice. Most of the examples implement standard TCP/IP application protocols. In each case, we tried to select an application protocol that would convey a single design idea without being too complex to understand. Thus, while few of the example programs are exciting, they each illustrate one important concept. This version of Volume 3uses the Linux socket mechanism (i.e., socket API) in all programming examples; two other versions of the text contain many of the same examples using Microsoft''s Windows Sockets interface and AT&T''s TLI interface. Later chapters focus on middleware. They discuss the remote procedure call concept and describe how it can be used to construct distributed programs. The chapters relate the remote procedure call technique to the client-server model, and show how software can be used to generate client and server programs from a remote procedure call description. The chapters on TELNET show how small details dominate a production program and how complex the code can become for even a simple, character-oriented protocol. The section ends with the two chapters on streaming transport described earlier. Much of the text concentrates on concurrent processing. Many of the concepts described may seem familiar to students who have written concurrent programs because they apply to all concurrent programs, not only network applications. Students who have not written concurrent programs may find the concepts difficult. The text is suitable for a single semester undergraduate course on "socket programming" or a beginning graduate-level course on distributed computing. Because the text concentrates on how to use an internet rather than on how it works, students need little background in networking to understand the material. No particular concept is too difficult for an undergraduate course as long as the instructor proceeds at a suitable pace. A basic course in operating systems concepts or experience with concurrent programming may provide the best background. Students will not appreciate the material until they use it first hand. Thus, any course should have programming exercises that force the students to apply the ideas to practical programs. Undergraduates can learn the basics by repeating the designs on other application protocols. Graduate students should build more complex distributed programs that emphasize some of the subtle techniques (e.g., the concurrency management techniques in Chapter 16and the interconnection techniques in Chapters 18and 19). We thank many people for their help. Members of the Internet Research Group at Purdue contributed technical information and suggestions to the original text. Michael Evangelists proofread the text and wrote the RTP code. Gustavo Rodriguez-Rivera read several chapters, ran experiments to test details, and edited Appendix 1. Dennis Brylow commented on several chapters. Christine Comer edited the entire text and improved both wording and consistency. Douglas E. Comer David L. Stevens July, 2000

Rewards Program