UNIX Network Programming - W. Richard Stevens - 2ème édition - Librairie Eyrolles

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
UNIX Network Programming
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

UNIX Network Programming

UNIX Network Programming

Networking APIs : Sockets and XTI, Volume 1

W. Richard Stevens

1008 pages, parution le 12/11/1997 (2eme édition)

Résumé

The classic UNIX network programming guide, now completely updated: a can't-miss best-seller!

This is the most thorough and authoritative guide to UNIX networking APIs available. You'll find comprehensive coverage of the sockets API, the defacto standard for network programming.

Stevens discusses basic socket functions for TCP and UDP; examples of client/server TCP programming; I/O multiplexing; socket options; and basic name and address conversions.

Once the basics are covered, he moves on to advanced sockets topics, including IPv4 and IPv6 interoperability, UNIX domain protocols, nonblocking I/O, broadcasting, multicasting, threads and routing sockets. Client/server design alternatives are also fully examined. You'll also learn about the XTI (X/Open Transport Interface), used with protocol suites other than TCP/IP.

Features:

  • Focuses on the two major networking APIs: Sockets and the X/Open Transport Interface.
  • Explains how to build robust UNIX networking software, including Web servers.
  • Includes comprehensive coverage of the sockets API, the defacto standard for network programming.
Discusses basic socket functions for TCP and UDP, examples of client/server TCP programming, I/O multiplexing, socket options, and basic name and address conversions.

Covers advanced socket topics including:

  • IPv4 and Ipv6 interoperability
  • UNIX domain protocols
  • Nonblocking I/O
  • Broadcasting
  • Multicasting
  • Threads and routing sockets
  • XTI (X/Open Transport Interface)
  • Examines client/server design alternatives thoroughly.

Table of contents

I. INTRODUCTION AND TCP/IP.

1. Introduction.
Introduction.
A Simple Daytime Client.
Protocol Independence.
Error Handling: Wrapper Functions.
A Simple Daytime Server.
Road Map 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 and UDP.
Introduction.
The Big Picture.
UDP: User Datagram Protocol.
TCP: Transmission Control Protocol.
TCP Connection Establishment and Termination.
TIME_WAIT State.
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.
isfdtype Function.
Summary.
4. 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.
SIFPIPE 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 Function.
Introduction.
I/O Models.
select Function.
str_cli Function (Revisited).
Batch Input.
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.
Ipv6 Socket Options.
TCP Socket Options.
fcntl Function.
Summary.
8. Elementary UDP Sockets.
Introduction.
recvfrom and sendto Function.
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 Name and Address Conversions.
Introduction.
Domain Name System.
gethostbyname Function.
RES_USE_INET6 Resolver Option.
gethosbyname2 Function and Ipv6 Support.
gethosbyaddr Function.
uname Function.
gethostname Function.
getservbyname and getservbyport Functions.
Other Networking Information.
Summary.
III. Advanced Sockets.
10. IPv4 and IPv6 Interoperability.
Introduction.
Ipv4 Client, Ipv6 Server.
Ipv6 Client, Ipv4 Server.
Ipv6 Address Testing Macros.
IPV6_ADDRFORM Socket Option.
Source Code Portability.
Summary.
11. Advanced Name and Address Conversions.
Introduction.
getaddrinfo Function.
gai_strerror Function.
freeaddringo Function.
getaddrinfo Function: Ipv6 and Unix Domain.
getaddrinfo Function: Examples.
host_serv Function.
tcp_connect Function.
tcp_listen Function.
udp_client Function.
udp_connect Function.
udp_server Function.
getnameinfo Function.
Reentrant Functions.
gethostbyname_r and gethostbyaddr_r Functions.
Implementation of getaddrinfo and getnameinfo Functions.
Summary.
12. Daemon Processes and inetd Superserver.
Introduction.
syslogd Daemon.
syslog Function.
daemon_init Function.
inetd Daemon.
daemon_inetd Function.
Summary.
13. 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.
IT/TCP: TCP for Transactions.
Summary.
14. 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.
15. 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.
16. ioctl Operations.
Introduction.
ioctl Function.
Socket Operations.
File Operations.
Interface Configuration.
get_ifi_info Function.
Interface Operations.
ARP Cache Operations.
Routing Table Operations.
Summary.
17. Routing Sockets.
Introduction.
Datalink Sockect Address Structure.
Reading and Writing.
sysctl Operations.
get_ifi_info Function.
Interface Name and Index Functions.
Summary.
18. Broadcasting.
Introduction.
Broadcast Addresses.
Unicast Versus Broadcast.
dg_cli Function Using Broadcasting.
Race Conditions.
Summary.
19. Multicasting.
Introduction.
Multicast Addresses.
Multicasting Versus Broadcasting on A LAN.
Multicasting on A WAN.
Multicast Socket Options.
mcast_join and Related Functions.
dg_cli Function Using Multicasting.
Receiving MBone Session Announcements.
Sending and Receiving.
SNTP: Simple Network Time Protocol.
SNTP (Continued).
Summary.
20. 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.
Summary.
21. Out-of-Band Data.
Introduction.
TCP Out-of-Band Data.
sockatmark Function.
TCP Out-of_Band Data Summary.
Client-Server Heartbeat Functions.
Summary.
22. Signal-Driven I/O.
Introduction.
Signal-Driven I/O for Sockets.
UDP Echo Server Using SIGIO.
Summary.
23. 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.
24. 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.
Summary.
25. Raw Sockets.
Introduction.
Raw Socket Creation.
Raw Socket Output.
Raw Socket Input.
Ping Program.
Traceroute Program.
An ICMP Message Daemon.
Summary.
26. Datalink Access.
Introduction.
BPF: BSD Packet Filter.
DLPI: Data Link Provider Interface.
Linux: SOCK_PACKET.
libcap: Packet Capture Library.
Examining the UDP Checksum Field.
Summary.
27. 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.
IV. XTI: X/OPEN TRANSPORT INTERFACE.
28. XTI: TCP Clients.
Introduction.
t_open Function.
t_error and t_strerror Functions.
netbuf Structures and XTI Structures.
t_bind Function. t_connect Function.
t_rcv and t_snd Functions.
t_look Function.
t_sndrel and t_rcvrel Functions.
t_snddis and t_rcvdis Functions.
XTI TCP Daytime Client.
xti_rdwr Function.
Summary.
29. XTI: Name and Address Functions.
Introduction.
/etc/netconfig File and netconfig Functions.
NETPATH Variable and netpath Functions.
netdir Functions.
t_alloc and t_free Functions.
t_getprotaddr Functions.
xti_ntop Function.
tcp_connect Function.
Summary.
30. XTI: TCP Servers.
Introduction.
t_listen Function.
tcp_listen Function.
t_accept Function.
xti_accept Function.
Simple Daytime Server.
Multiple Pending Connections.
xti_accept Function (Revisited).
Summary.
31. XTI: UDP Clients and Servers.
Introduction.
t_rcvudata and t_sndudata Functions.
udp_client Function.
t_rcvuderr Function: Asynchronous Errors.
udp_server Function.
Reading a Datagram in Pieces.
Summary.
32. XTI Options.
Introduction.
t_opthdr Structure.
XTI Options.
t_optmgmt Function.
Checking if an Option is Supported and Obtaining the Default.
Getting and Setting XTI Options.
Summary.
33. Streams.
Introduction.
Overview.
getmsg and putmsg Functions.
getpmsg and putpmsg Functions.
ioctl Function.
TPI: Transport Provider Interface.
Summary.
34. XTI: Additional Functions.
Introduction.
Nonblocking I/O.
t_rcvconnect Function.
t_getinfo Function.
t_getstate Function.
t_sync Function.
t_unbind Function.
t_rcvv and t_rcvvudata Functions.
t_sndv and t_sndvudata Functions.
t_rcvreldata and t_sndreldata Functions.
Signal-Driven I/O.
Out-of-Band Data.
Loopback Transport Providers.
Summary.
Appendix A. IPv4, IPv6, ICMPv4, and ICMPv6.
Introduction.
IPv4 Header.
IPv6 Header.
IPv4 Addresses.
IPv6 Addresses.
ICMPv4 and ICMPv6: Internet Control Message Protocol.
Appendix B. Virtual Networks.
Introduction.
The Mbone.
The 6bone.
Appendix C. Debugging Techniques.
System Call Tracing.
Standard Internet Services.
sock Program.
Small Test Program.
tcpdump Program.
netstat Program.
lsof Program.
Appendix D. Miscellaneous Source Code.
unp.h Header.
config.h Header.
unpxti.h Header.
Standard Error Routines.
Appendix E. Solutions to Selected Exercises.
Bibliography.
Index.

L'auteur - W. Richard Stevens

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.

Caractéristiques techniques

  PAPIER
Éditeur(s) Prentice Hall
Auteur(s) W. Richard Stevens
Parution 12/11/1997
Édition  2eme édition
Nb. de pages 1008
EAN13 9780134900124

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription