UNIX Network Programming: The Sockets Networking API / Edition 3

Hardcover (Print)
Rent
Rent from BN.com
$14.46
(Save 82%)
Est. Return Date: 11/30/2014
Used and New from Other Sellers
Used and New from Other Sellers
from $29.99
Usually ships in 1-2 business days
(Save 62%)
Other sellers (Hardcover)
  • All (15) from $29.99   
  • New (9) from $53.35   
  • Used (6) from $29.99   

Overview

UNIX Network Programming, Volume 1: The Sockets Networking API, Third Edition

"Everyone will want this book because it provides a great mix of practical experience, historical perspective, and a depth of understanding that only comes from being intimately involved in the field. I've already enjoyed and learned from reading this book, and surely you will too."

--Sam Leffler

The classic guide to UNIX networking APIs... now completely updated!

To build today's highly distributed, networked applications and services, you need deep mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to-finish guidance for building robust, high-performance networked systems in any environment: UNIX Network Programming, Volume 1, Third Edition.

Building on the legendary work of W. Richard Stevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, implementations, and techniques. New topics include:

  • POSIX Single UNIX Specification Version 3
  • IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability)
  • The new SCTP transport protocol
  • IPsec-based Key Management Sockets
  • FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X implementations
  • New network program debugging techniques
  • Source Specific Multicast API, the key enabler for widespread IP multicast deployment

The authors also update and extend Stevens' definitive coverage of these crucial UNIX networking standards and techniques:

  • TCP and UDP transport
  • Sockets: elementary, advanced, routed, and raw
  • I/O: multiplexing, advanced functions, nonblocking, and signal-driven
  • Daemons and inetd
  • UNIX domain protocols
  • ioctl operations
  • Broadcasting and multicasting
  • Threads
  • Streams
  • Design: TCP iterative, concurrent, preforked, and prethreaded servers

Since 1990, network programmers have turned to one source for the insights and techniques they need: W. Richard Stevens' UNIX Network Programming. Now, there's an edition specifically designed for today's challenges--and tomorrow's.

A practical book that explains many of the details that have been considered a mystery, this guidebook focuses on the design, development, and coding of networking software under the UNIX operating system. It begins by showing how a fundamental basic for networking programming is interprocess communication (IPC), and a requisite for understanding IPC is a knowledge of what constitutes a process. Throughout, the text provides both a description and examples of how and why a particular solution is arrived at.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
For generations, one name’s been synonymous with UNIX networking: W. Richard Stevens. Tragically, Stevens passed away in 1999. He’s missed by UNIX professionals worldwide. But, miraculously, his work lives on.

In UNIX Network Programming, Volume 1, Third Edition, Bill Fenner and Andrew Rudoff have worked hard to update Stevens’ guide to Sockets, while matching his legendary clarity, detail, readability, and runnable code. They’ve succeeded.

Now there’s a “Stevens” that covers the official IPv6 standard, the latest Posix specs, SCTP, key management sockets, and current systems (from Mac OS X and Solaris 9 to Linux on Intel). This one will be a classic, too. Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2003 and Upgrading & Fixing Networks for Dummies, Second Edition.

Booknews
Tutorial on networking for those with a working knowledge of C and the UNIX system. Includes full descriptions for popular protocols such as TCP/IP, XNS, SNA, NetBIOS, OSI, and UUCP. Also includes case studies of real network applications, as well as approximately 15,000 lines of C source code, taken directly from their source files. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780131411555
  • Publisher: Addison-Wesley
  • Publication date: 10/22/2003
  • Series: Addison-Wesley Professional Computing Series
  • Edition description: Third Edition
  • Edition number: 3
  • Pages: 991
  • Sales rank: 641,304
  • Product dimensions: 7.30 (w) x 9.50 (h) x 1.45 (d)

Meet the Author

The late W. RICHARD STEVENS was the original author of UNIX Network Programming, First and Second Editions, widely recognized as the classic texts in UNIX networking. BILL FENNER is Principal Technical Staff Member at AT&T Labs in Menlo Park, CA, specializing in IP multicasting, network management, and measurement. He is one of the IETF's Routing Area Directors, responsible for approving all routing-related documents that get published as RFCs. ANDREW M. RUDOFF, Senior Software Engineer at Sun Microsystems, specializes in networking, operating systems internals, file systems, and high availability software architecture.

Read More Show Less

Read an Excerpt

PrefaceIntroduction

This book is for people who want to write programs that communicate with each otherusing an application program interface (API) known as sockets. Some readers may bevery familiar with sockets already, as that model has become synonymous with networkprogramming. Others may need an introduction to sockets from the ground up. Thegoal of this book is to offer guidance on network programming for beginners as well asprofessionals, for those developing new network-aware applications as well as thosemaintaining existing code, and for people who simply want to understand how the networkingcomponents of their system function.

All the examples in this text are actual, runnable code tested on Unix systems.However, many non-Unix systems support the sockets API and the examples arelargely operating system-independent, as are the general concepts we present. Virtuallyevery operating system (OS) provides numerous network-aware applications such asWeb browsers, email clients, and file-sharing servers. We discuss the usual partitioningof these applications into client and server and write our own small examples of thesemany times throughout the text.

Presenting this material in a Unix-oriented fashion has the natural side effect of providingbackground on Unix itself, and on TCP/IP as well. Where more extensive backgroundmay be interesting, we refer the reader to other texts. Four texts are so commonlymentioned in this book that we've assigned them the following abbreviations:


  • APUE: Advanced Programming in the UNIX Environment Stevens 1992
  • TCPv1: TCP/IP Illustrated, Volume 1 Stevens 1994
  • TCPv2:TCP/IP Illustrated, Volume 2 Wright and Stevens 1995
  • TCPv3: TCP/IP Illustrated, Volume 3 Stevens 1996

TCPv2 contains a high level of detail very closely related to the material in this book, asit describes and presents the actual 4.4BSD implementation of the network programmingfunctions for the sockets API (socket, bind, connect, and so on). If one understandsthe implementation of a feature, the use of that feature in an application makesmore sense.Changes from the Second Edition

Sockets have been around, more or less in their current form, since the 1980s, and it is atribute to their initial design that they have continued to be the network API of choice.Therefore, it may come as a surprise to learn that quite a bit has changed since the secondedition of this book was published in 1998. The changes we've made to the text aresummarized as follows:

  • This new edition contains updated information on IPv6, which was only in draft form at the time of publication of the second edition and has evolved somewhat.
  • The descriptions of functions and the examples have all been updated to reflect the most recent POSIX specification (POSIX 1003.1-2001), also known as the Single Unix Specification Version 3.
  • The coverage of the X/Open Transport Interface (XTI) has been dropped. That API has fallen out of common use and even the most recent POSIX specification does not bother to cover it.
  • The coverage of TCP for transactions (T/TCP) has been dropped.
  • Three chapters have been added to describe a relatively new transport protocol, SCTP. This reliable, message-oriented protocol provides multiple streams between endpoints and transport-level support for multihoming. It was originally designed for transport of telephony signaling across the Internet, but provides some features that many applications could take advantage of.
  • A chapter has been added on key management sockets, which may be used with Internet Protocol Security (IPsec) and other network security services.
  • The machines used, as well as the versions of their variants of Unix, have all been updated, and the examples have been updated to reflect how these machines behave. In many cases, examples were updated because OS vendors fixed bugs or added features, but as one might expect, we've discovered the occasional new bug here and there. The machines used for testing the examples in this book were:
  • Apple Power PC running MacOS/X 10.2.6
  • HP PA-RISC running HP-UX 11i
  • IBM Power PC running AIX 5.1
  • Intel x86 running FreeBSD 4.8
  • Intel x86 running Linux 2.4.7
  • Sun SPARC running FreeBSD 5.1
  • Sun SPARC running Solaris 9

See Figure 1.16 for details on how these machines were used.

Volume 2 of this UNIX Network Programming series, subtitled Interprocess Communications,builds on the material presented here to cover message passing, synchronization,shared memory, and remote procedure calls.Using This Book

This text can be used as either a tutorial on network programming or as a reference forexperienced programmers. When used as a tutorial or for an introductory class on networkprogramming, the emphasis should be on Part 2, ''Elementary Sockets'' (Chapters3 through 11), followed by whatever additional topics are of interest. Part 2 covers thebasic socket functions for both TCP and UDP, along with SCTP, I/O multiplexing,socket options, and basic name and address conversions. Chapter 1 should be read byall readers, especially Section 1.4, which describes some wrapper functions usedthroughout the text. Chapter 2 and perhaps Appendix A should be referred to as necessary,depending on the reader 's background. Most of the chapters in Part 3, ''AdvancedSockets,'' can be read independently of the others in that part of the book.

To aid in the use of this book as a reference, a thorough index is provided, alongwith summaries on the end papers of where to find detailed descriptions of all the functionsand structures. To help those reading topics in a random order, numerous referencesto related topics are provided throughout the text.Source Code and Errata Availability

The source code for all the examples that appear in the book is available on the Web atwww.unpbook.com. The best way to learn network programming is to take these programs,modify them, and enhance them. Actually writing code of this form is the onlyway to reinforce the concepts and techniques. Numerous exercises are also provided atthe end of each chapter, and most answers are provided in Appendix E.

A current errata for the book is also available from the same Web site.

The authors welcome electronic mail from any readers with comments, suggestions,or bug fixes.

Bill Fenner

Woodside, California

Andrew M. Rudoff

Boulder, Colorado

October 2003

authors@unpbook.com

http://www.unpbook.com

Read More Show Less

Table of Contents

Foreword.

Preface.

I. INTRODUCTION AND TCP/IP.

1. Introduction.

Introduction.

A Simple Daytime Client.

Protocol Independence.

Error Handling: Wrapper Functions.

A Simple Daytime Server.

Roadmap to Client/Server Examples in the Text.

OSI Model.

BSD Networking History.

Test Networks and Hosts.

Unix Standards.

64-Bit Architectures.

Summary.

2. The Transport Layer: TCP, UDP, and SCTP.

Introduction.

The Big Picture.

User Datagram Protocol (UDP).

Transmission Control Protocol (TCP).

Stream Control Transmission Protocol (SCTP).

TCP Connection Establishment and Termination.

TIME_WAIT State.

SCTP Association Establishment and Termination.

Port Numbers.

TCP Port Numbers and Concurrent Servers.

Buffer Sizes and Limitations.

Standard Internet Services.

Protocol Usage by Common Internet Applications.

Summary.

II. ELEMENTARY SOCKETS.

3. Sockets Introduction.

Introduction.

Socket Address Structures.

Value-Result Arguments.

Byte Ordering Functions.

Byte Manipulation Functions.

inet_aton, inet_addr, and inet_ntoa Functions.

inet_pton and inet_ntop Functions.

sock_ntop and Related Functions.

readn, writen, and readline Functions.

Summary.

4. Elementary TCP Sockets.

Introduction.

socket Function.

connect Function.

bind Function.

listen Function.

accept Function.

fork and exec Functions.

Concurrent Servers.

close Function.

getsockname and getpeername Functions.

Summary.

5. TCP Client/Server Example.

Introduction.

TCP Echo Server: main Function.

TCP Echo Server: str_echo Function.

TCP Echo Client: main Function.

TCP Echo Client: str_cli Function.

Normal Startup.

Normal Termination.

POSIX Signal Handling.

Handling SIGCHLD Signals.

wait and waitpid Functions.

Connection Abort before accept Returns.

Termination of Server Process.

SIGPIPE Signal.

Crashing of Server Host.

Crashing and Rebooting of Server Host.

Shutdown of Server Host.

Summary of TCP Example.

Data Format.

Summary.

6. I/O Multiplexing: The select and poll Functions.

Introduction.

I/O Models.

select Function.

str_cli Function (Revisited).

Batch Input and Buffering.

shutdown Function.

str_cli Function (Revisited Again).

TCP Echo Server (Revisited).

pselect Function.

poll Function.

TCP Echo Server (Revisited Again).

Summary.

7. Socket Options.

Introduction.

getsockopt and setsockopt Functions.

Checking if an Option Is Supported and Obtaining the Default.

Socket States.

Generic Socket Options.

IPv4 Socket Options.

ICMPv6 Socket Option.

IPv6 Socket Options.

TCP Socket Options.

SCTP Socket Options.

fcntl Function.

Summary.

8. Elementary UDP Sockets.

Introduction.

recvfrom and sendto Functions.

UDP Echo Server: main Function.

UDP Echo Server: dg_echo Function.

UDP Echo Client: main Function.

UDP Echo Client: dg_cli Function.

Lost Datagrams.

Verifying Received Response.

Server Not Running.

Summary of UDP Example.

connect Function with UDP.

dg_cli Function (Revisited).

Lack of Flow Control with UDP.

Determining Outgoing Interface with UDP.

TCP and UDP Echo Server Using select.

Summary.

9. Elementary SCTP Sockets.

Introduction.

Interface Models.

sctp_bindx Function.

sctp_connectx Function.

sctp_getpaddrs Function.

sctp_freepaddrs Function.

sctp_getladdrs Function.

sctp_freeladdrs Function.

sctp_sendmsg Function.

sctp_recvmsg Function.

sctp_opt_info Function.

sctp_peeloff Function.

shutdown Function.

Notifications.

Summary.

10. SCTP Client/Server Example.

Introduction.

SCTP One-to-Many-Style Streaming Echo Server: main Function.

SCTP One-to-Many-Style Streaming Echo Client: main Function.

SCTP Streaming Echo Client: str_cli Function.

Exploring Head-of-Line Blocking.

Controlling the Number of Streams.

Controlling Termination.

Summary.

11. Name and Address Conversions.

Introduction.

Domain Name System (DNS).

gethostbyname Function.

gethostbyaddr Function.

getservbyname and getservbyport Functions.

getaddrinfo Function.

gai_strerror Function.

freeaddrinfo Function.

getaddrinfo Function: IPv6.

getaddrinfo Function: Examples.

host_serv Function.

tcp_connect Function.

tcp_listen Function.

udp_client Function.

udp_connect Function.

udp_server Function.

getnameinfo Function.

Re-entrant Functions.

gethostbyname_r and gethostbyaddr_r Functions.

Obsolete IPv6 Address Lookup Functions.

Other Networking Information.

Summary.

III. ADVANCED SOCKETS.

12. IPv4 and IPv6 Interoperability.

Introduction.

IPv4 Client, IPv6 Server.

IPv6 Client, IPv4 Server.

IPv6 Address-Testing Macros.

Source Code Portability.

Summary.

13. Daemon Processes and the inetd Superserver.

Introduction.

syslogd Daemon.

syslog Function.

daemon_init Function.

inetd Daemon.

daemon_inetd Function.

Summary.

14. Advanced I/O Functions.

Introduction.

Socket Timeouts.

recv and send Functions.

readv and writev Functions.

recvmsg and sendmsg Functions.

Ancillary Data.

How Much Data Is Queued?

Sockets and Standard I/O.

Advanced Polling.

Summary.

15. Unix Domain Protocols.

Introduction.

Unix Domain Socket Address Structure.

socketpair Function.

Socket Functions.

Unix Domain Stream Client/Server.

Unix Domain Datagram Client/Server.

Passing Descriptors.

Receiving Sender Credentials.

Summary.

16. Nonblocking I/O.

Introduction.

Nonblocking Reads and Writes: str_cli Function (Revisited).

Nonblocking connect.

Nonblocking connect: Daytime Client.

Nonblocking connect: Web Client.

Nonblocking accept.

Summary.

17. ioctl Operations.

Introduction.

ioctl Function.

Socket Operations.

File Operations.

Interface Configuration.

get_ifi_info Function.

Interface Operations.

ARP Cache Operations.

Routing Table Operations.

Summary.

18. Routing Sockets.

Introduction.

Datalink Socket Address Structure.

Reading and Writing.

sysctl Operations.

get_ifi_info Function (Revisited).

Interface Name and Index Functions.

Summary.

19. Key Management Sockets.

Introduction.

Reading and Writing.

Dumping the Security Association Database (SADB).

Creating a Static Security Association (SA).

Dynamically Maintaining SAs.

Summary.

20. Broadcasting.

Introduction.

Broadcast Addresses.

Unicast versus Broadcast.

dg_cli Function Using Broadcasting.

Race Conditions.

Summary.

21. Multicasting.

Introduction.

Multicast Addresses.

Multicasting versus Broadcasting on a LAN.

Multicasting on a WAN.

Source-Specific Multicast.

Multicast Socket Options.

mcast_join and Related Functions.

dg_cli Function Using Multicasting.

Receiving IP Multicast Infrastructure Session Announcements.

Sending and Receiving.

Simple Network Time Protocol (SNTP).

Summary.

22. Advanced UDP Sockets.

Introduction.

Receiving Flags, Destination IP Address, and Interface Index.

Datagram Truncation.

When to Use UDP Instead of TCP.

Adding Reliability to a UDP Application.

Binding Interface Addresses.

Concurrent UDP Servers.

IPv6 Packet Information.

IPv6 Path MTU Control.

Summary.

23. Advanced SCTP Sockets.

Introduction.

An Autoclosing One-to-Many-Style Server.

Partial Delivery.

Notifications.

Unordered Data.

Binding a Subset of Addresses.

Determining Peer and Local Address Information.

Finding an Association ID Given an IP Address.

Heartbeating and Address Failure.

Peeling Off an Association.

Controlling Timing.

When to Use SCTP Instead of TCP.

Summary.

24. Out-of-Band Data.

Introduction.

TCP Out-of-Band Data.

sockatmark Function.

TCP Out-of-Band Data Recap.

Summary.

25. Signal-Driven I/O.

Introduction.

Signal-Driven I/O for Sockets.

UDP Echo Server Using SIGIO.

Summary.

26. Threads.

Introduction.

Basic Thread Functions: Creation and Termination.

str_cli Function Using Threads.

TCP Echo Server Using Threads.

Thread-Specific Data.

Web Client and Simultaneous Connections (Continued).

Mutexes: Mutual Exclusion.

Condition Variables.

Web Client and Simultaneous Connections (Continued).

Summary.

27. IP Options.

Introduction.

IPv4 Options.

IPv4 Source Route Options.

IPv6 Extension Headers.

IPv6 Hop-by-Hop Options and Destination Options.

IPv6 Routing Header.

IPv6 Sticky Options.

Historical IPv6 Advanced API.

Summary.

28. Raw Sockets.

Introduction.

Raw Socket Creation.

Raw Socket Output.

Raw Socket Input.

ping Program.

traceroute Program.

An ICMP Message Daemon.

Summary.

29. Datalink Access.

Introduction.

BSD Packet Filter (BPF).

Datalink Provider Interface (DLPI).

Linux: SOCK_PACKET and PF_PACKET.

libpcap: Packet Capture Library.

libnet: Packet Creation and Injection Library.

Examining the UDP Checksum Field.

Summary.

30. Client/Server Design Alternatives.

Introduction.

TCP Client Alternatives.

TCP Test Client.

TCP Iterative Server.

TCP Concurrent Server, One Child per Client.

TCP Preforked Server, No Locking Around accept.

TCP Preforked Server, File Locking Around accept.

TCP Preforked Server, Thread Locking Around accept.

TCP Preforked Server, Descriptor Passing.

TCP Concurrent Server, One Thread per Client.

TCP Prethreaded Server, per-Thread accept.

TCP Prethreaded Server, Main Thread accept.

Summary.

31. STREAMS.

Introduction.

Overview.

getmsg and putmsg Functions.

getpmsg and putpmsg Functions.

ioctl Function.

Transport Provider Interface (TPI).

Summary.

Appendix A. IPv4, IPv6, ICMPv4, and ICMPv6.

Introduction.

IPv4 Header.

IPv6 Header.

IPv4 Addresses.

IPv6 Addresses.

Internet Control Message Protocols (ICMPv4 and ICMPv6).

Appendix B. Virtual Networks.

Introduction.

The MBone.

The 6bone.

IPv6 Transition: 6to4.

Appendix C. Debugging Techniques.

System Call Tracing.

Standard Internet Services.

sock Program.

Small Test Programs.

tcpdump Program.

netstat Program.

lsof Program.

Appendix D. Miscellaneous Source Code.

unp.h Header.

config.h Header.

Standard Error Functions.

Appendix E. Solutions to Selected Exercises.

Bibliography.

Index.

Read More Show Less

Preface

Preface

Introduction

This book is for people who want to write programs that communicate with each otherusing an application program interface (API) known as sockets. Some readers may bevery familiar with sockets already, as that model has become synonymous with networkprogramming. Others may need an introduction to sockets from the ground up. Thegoal of this book is to offer guidance on network programming for beginners as well asprofessionals, for those developing new network-aware applications as well as thosemaintaining existing code, and for people who simply want to understand how the networkingcomponents of their system function.

All the examples in this text are actual, runnable code tested on Unix systems.However, many non-Unix systems support the sockets API and the examples arelargely operating system-independent, as are the general concepts we present. Virtuallyevery operating system (OS) provides numerous network-aware applications such asWeb browsers, email clients, and file-sharing servers. We discuss the usual partitioningof these applications into client and server and write our own small examples of thesemany times throughout the text.

Presenting this material in a Unix-oriented fashion has the natural side effect of providingbackground on Unix itself, and on TCP/IP as well. Where more extensive backgroundmay be interesting, we refer the reader to other texts. Four texts are so commonlymentioned in this book that we've assigned them the following abbreviations:

  • APUE: Advanced Programming in the UNIX Environment Stevens 1992
  • TCPv1: TCP/IP Illustrated, Volume 1 Stevens 1994
  • TCPv2: TCP/IP Illustrated, Volume 2 Wright and Stevens 1995
  • TCPv3: TCP/IP Illustrated, Volume 3 Stevens 1996

TCPv2 contains a high level of detail very closely related to the material in this book, asit describes and presents the actual 4.4BSD implementation of the network programmingfunctions for the sockets API (socket, bind, connect, and so on). If one understandsthe implementation of a feature, the use of that feature in an application makesmore sense.

Changes from the Second Edition

Sockets have been around, more or less in their current form, since the 1980s, and it is atribute to their initial design that they have continued to be the network API of choice.Therefore, it may come as a surprise to learn that quite a bit has changed since the secondedition of this book was published in 1998. The changes we've made to the text aresummarized as follows:

  • This new edition contains updated information on IPv6, which was only in draft form at the time of publication of the second edition and has evolved somewhat.
  • The descriptions of functions and the examples have all been updated to reflect the most recent POSIX specification (POSIX 1003.1-2001), also known as the Single Unix Specification Version 3.
  • The coverage of the X/Open Transport Interface (XTI) has been dropped. That API has fallen out of common use and even the most recent POSIX specification does not bother to cover it.
  • The coverage of TCP for transactions (T/TCP) has been dropped.
  • Three chapters have been added to describe a relatively new transport protocol, SCTP. This reliable, message-oriented protocol provides multiple streams between endpoints and transport-level support for multihoming. It was originally designed for transport of telephony signaling across the Internet, but provides some features that many applications could take advantage of.
  • A chapter has been added on key management sockets, which may be used with Internet Protocol Security (IPsec) and other network security services.
  • The machines used, as well as the versions of their variants of Unix, have all been updated, and the examples have been updated to reflect how these machines behave. In many cases, examples were updated because OS vendors fixed bugs or added features, but as one might expect, we've discovered the occasional new bug here and there. The machines used for testing the examples in this book were:
  • Apple Power PC running MacOS/X 10.2.6
  • HP PA-RISC running HP-UX 11i
  • IBM Power PC running AIX 5.1
  • Intel x86 running FreeBSD 4.8
  • Intel x86 running Linux 2.4.7
  • Sun SPARC running FreeBSD 5.1
  • Sun SPARC running Solaris 9

See Figure 1.16 for details on how these machines were used.

Volume 2 of this UNIX Network Programming series, subtitled Interprocess Communications,builds on the material presented here to cover message passing, synchronization,shared memory, and remote procedure calls.

Using This Book

This text can be used as either a tutorial on network programming or as a reference forexperienced programmers. When used as a tutorial or for an introductory class on networkprogramming, the emphasis should be on Part 2, ''Elementary Sockets'' (Chapters3 through 11), followed by whatever additional topics are of interest. Part 2 covers thebasic socket functions for both TCP and UDP, along with SCTP, I/O multiplexing,socket options, and basic name and address conversions. Chapter 1 should be read byall readers, especially Section 1.4, which describes some wrapper functions usedthroughout the text. Chapter 2 and perhaps Appendix A should be referred to as necessary,depending on the reader 's background. Most of the chapters in Part 3, ''AdvancedSockets,'' can be read independently of the others in that part of the book.

To aid in the use of this book as a reference, a thorough index is provided, alongwith summaries on the end papers of where to find detailed descriptions of all the functionsand structures. To help those reading topics in a random order, numerous referencesto related topics are provided throughout the text.

Source Code and Errata Availability

The source code for all the examples that appear in the book is available on the Web atwww.unpbook.com. The best way to learn network programming is to take these programs,modify them, and enhance them. Actually writing code of this form is the onlyway to reinforce the concepts and techniques. Numerous exercises are also provided atthe end of each chapter, and most answers are provided in Appendix E.

A current errata for the book is also available from the same Web site.

The authors welcome electronic mail from any readers with comments, suggestions,or bug fixes.

Bill Fenner

Woodside, California

Andrew M. Rudoff

Boulder, Colorado

October 2003

authors@unpbook.com

http://www.unpbook.com

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 4 Customer Reviews
  • Anonymous

    Posted February 7, 2004

    Continuing the work of a legend in the field of CS

    It would be difficult to put value on a book that has been a classic text and a reference in academia and in the real world in the context of Network Programming for over a decade. Richard Stevens published the ever-popular Unix Network Programming [UNP] back in 1990, followed the second edition in 1998. With a dedication to the memory of R. Stevens, the UNP book found itself two new authors, Bill Fenner and Andrew M. Rudoff, who would write the third edition of this book. The third edition has many updates, a new look and feel and many of new chapters that cover the topics more applicable these days. In my opinion, it is still the most valuable and profound text in the context of Network Programming. For those of us who have the first two editions of this book, the third edition has the following changes in effect: · IPv6 updates. In the second version of the book, IPv6 was merely a draft and the sections covering IPv6 has been updated to take these changes into effect. · POSIX updates. The functions/APIs and examples have been updated to reflect the changes to the latest version of the POSIX specification (1003.1-2001) · SCTP coverage. 3 new chapters that cover this new reliable, message-based transport protocol have been added. · Key Management Sockets coverage. Network security and its applicability and use with IPsec. · Updated Operating Systems and machines that are used to run the examples in the book. · Some topics such as Transaction TCP and X/Open Transport Interface have been dropped. Many topics and sections have been updated with the authors' comments. These comments even though simple for someone new to the profession, are extremely useful as they are like hints and tips from one developer to the next to help you out in your next programming assignment.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 14, 2004

    LUG:ng Book Review

    The book was great. It covers both the basics for the TCP/IP API in Unix and some advanced techniques of Network Programming. The book was a very easy read and flowed great. There were plenty of code examples so you could read and see how the functionality would work. Besides this being a great reference tool for any Unix Programmer, it is a great tool for anyone looking to develop Unix apps with the new IPV6 standard. The book thouroughly covers both IPV4 and IPV6. When using it as a reference tool, the index is amazingly detailed. It makes finding the information your looking for quick and easy. This is one book that a Unix Programmer can't do without.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 25, 2004

    In-Depth, Full of Information, Excellent

    While not a C programmer by any means, I decided to take some time and tackle the UNIX Network Programming book. I found that lots of early college classes came back to me as I forged a few pages in. It was clear from the very beginning that this book was going to be a very detailed study on all aspects of IP networking as it relates to UNIX programmers. Even for someone who isn't initiated in the topic or really even interested, it was quite an experience to read through the hundreds of flow charts and detailed examples of C code showing how to perform all kinds of interesting network tasks. From a simple HTTP GET to detailed network file and connectivity operations, including TCP and UDP packets, ports, sockets and so on, there is a place in the book for each kind of network programming service. There is also a fair amount of text dealing with debugging techniques, allowing even those programmers who are experienced in their craft to find new ways to ferret out the problems in their code. The book also promotes good stylistics in programming, engendering the idea that readable and understandable code is better code than that which simply works. There are also examples and explanations for IPv6, for any programmer who is going to be making the leap into next generation networks. There are also instructions on how to deal with wireless networks, security models and other topics for anyone who plans on designing network applications or specialized network configurations. It's probably not accurate to rate a book on a topic that holds little interest to the reader, but even a modest script programmer can tell when a book hits a subject just right and brings out all the details in a concise, easy-to-understand way. If you're a hard-core network programmer, this book is definitely for you. If not, you may find you learn something anyway.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 21, 2009

    No text was provided for this review.

Sort by: Showing all of 4 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)