Dec 312017
 
Source code from the book "UNIX Network Programming" by W. Richard Stevens.

Full Description of File


This directory tree comprises the source
code from the book "UNIX Network Pro-
gramming" by W. Richard Stevens, pub-
lished by Prentice Hall.


File NETPROG.ZIP from The Programmer’s Corner in
Category UNIX Files
Source code from the book “UNIX Network Programming” by W. Richard Stevens.
File Name File Size Zip Size Zip Type
FILE_ID.DIZ 147 124 deflated
NETPROG.TAR 593920 115661 deflated
README 5642 2211 deflated

Download File NETPROG.ZIP Here

Contents of the README file


This directory tree comprises the source
code from the book "UNIX Network Pro-
gramming" by W. Richard Stevens, pub-
lished by Prentice Hall.
This directory tree comprises the source code from
the book "UNIX Network Programming" by W. Richard Stevens,
published by Prentice Hall, 1990.

---------------------------------------------------------------------
LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY

The author and publisher of the book "UNIX Network Programming"
have used their best efforts in preparing this software.
These efforts include the development, research, and testing
of the theories and programs to determine their effectiveness.
The author and publisher make no warranty of any kind, express
or implied, with regard to these programs or the documentation
contained in the book. The author and publisher shall not be
liable in any event for incidental or consequential damages in
connection with, or arising out of, the furnishing, performance,
or use of these programs.
---------------------------------------------------------------------

As stated in the Preface of the book, the source code was
tested under 4.3BSD on a VAX and AT&T's System V/386 Release 3.2
on a Compaq 386/20. There may be some comments and Makefile rules
for Xenix since I started porting some of the software to Xenix.
However, I found the existing Xenix socket libraries so poor that
I never finished.

To start, check the files "systype.sh" and "systype.h"
in either the "lib" or "lib.s5" directory. These may have to
be modified for your system. Next, do a "make" in either of
these directories to make the library "libnet.a". This library
is required to make most of the other programs (minimally because
the error functions - err_XXX() - are in this library and these
error functions are used by almost every program).

Note that there are a lot of links between files in
different directories. For example, the directories "fd" and "fd.s5"
both use the same Makefile and main programs. Only the files
"sendfile.c" and "recvfile.c" in these directories are different
between 4.3BSD and System V.

The directories are as follows:

asyncioThe asynchronous I/O example from Section 6.12.

fdThe file descriptor passing example for 4.3BSD from
Section 6.10.

fd.s5The file descriptor passing example for System V
from Section 7.10.

inettimeThe Internet time and daytime clients from Section 10.2.

ipcThe IPC examples from Chapter 3.

libThe library of common functions for 4.3BSD. These functions
come from all over the book. Specifically:

lib/daemon.cdaemon_start() function - Sec. 2.6.
lib/dgsendrecv.cReliable message send/receive - Sec. 8.4.
lib/error.cError handling - Appendix A.3.
lib/hosterror.cSec. A.3.
lib/idpopen.cSec. 8.3.
lib/lock.cLock functions for lpr/seqno.c - Sec. 13.3.
lib/netdefs.hUsed by lib/XXXopen.c and tftp/netXXX.c.
lib/nspipe.cNamed stream pipe function - Sec. 6.9.
lib/pty.cPseudo tty routines - Sec. 15.4.
lib/readline.cSec. 6.6.
lib/readn.cSec. 6.6.
lib/rresvport.c(Not in book; needed for WIN/TCP)
lib/rtt.cRound-trip timing functions - Sec. 8.4.
lib/sigchild.cdaemon_start() SIGCLD handler - Sec. 2.6.
lib/spipe.cStream pipe function - Sec. 6.9.
lib/sppopen.cSec. 8.3.
lib/tcpopen.cSec. 8.3.
lib/timer.cTiming functions used in TFTP - App. A.4.
lib/ttymode.cCopy terminal mode - Sec. 15.5.
lib/ttyraw.cSet terminal raw mode - Sec. 15.5.
lib/udpopen.cSec. 8.3.
lib/writen.cSec. 6.6.

lib.s5The library of common functions for System V.
See the list above for the "lib" directory. The differences
are: idpopen.c, sppopen.c, and sigchild.c aren't in "lib.s5"
and "lib.s5" contains semaph.c (the simpler semaphore
operations - Sec. 3.10).

lockThe record locking and file locking functions from
Section 3.2.

lprThe 4.3BSD line printer client - Section 13.3.

netThe simple client-server examples from Section 6.6.
Also the socket option example from Section 6.11 and
the host entry example from Section 8.2.

net.s5The simple client-server examples from Section 7.6.
Also contains a program to print all the stream modules
on a given stream, and a program to print all the
TLI "struct t_info" values for your implementation.

nspipe.s5The named stream pipe example from Section 7.9.

pingThe 4.3BSD Internet ping program from Section 11.2.

rcmdThe rcmd() function and its rshd server from
Section 14.3. Also the ruserok() function from
Section 9.2.

recordThe recording example from Sections 15.3 - 15.6.

record.s5The System V version of the recording example.

reliableThe reliable message client and server from Section 8.4.

rloginThe 4.3BSD rlogin client and rlogind server from
Sections 15.11 and 15.12.

rmtThe remote tape server from Section 16.4.

rpc.courier/timedateThe Xerox Courier RPC example from Section 18.4.
Note that the Makefile will certainly have to be
modified, depending where you have installed the
Courier compiler, library, and include files.

rpc.sun/timedateThe Sun RPC example from Section 18.3.
Note that the Makefile will certainly have to be
modified, depending where you have installed the
Sun RPC compiler and library.

selectThe higher precision timer, using the select system
call, from Section 6.13.

tftpThe TFTP client and server from Chapter 12.

xnsechoThe XNS IDP echo client from Section 11.3.

Please send me any bug fixes, comments, suggestions, etc.

Richard Stevens
Health Systems International, New Haven, CT
[email protected]
... { uunet | yale } ! hsi ! stevens


 December 31, 2017  Add comments

Leave a Reply