ebook img

Unix Network Programming, Volume 1: The Sockets Networking API PDF

1138 Pages·2003·16.42 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Unix Network Programming, Volume 1: The Sockets Networking API

[ Team LiB ] • Table of Contents UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking API By W. Richard Stevens, Bill Fenner, Andrew M. Rudoff Publisher: Addison Wesley Pub Date: November 21, 2003 ISBN: 0-13-141155-1 Pages: 1024 "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 [ Team LiB ] 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 Broadca sting and multicasting • Table of Contents Threads UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking API Streams By W. Richard Stevens, Bill Fenner, Andrew M. Rudoff Design: TCP iterative, concurrent, preforked, and prethreaded servers SincPeub 1lis9h9er0:, Andeditswono rWke spleryogrammers have turned to one source for the insights and techniques theyP unbe Deadte:: WNo.v eRmicbhear r2d1, S20te03vens' UNIX Network Programming. Now, there's an edition specificIaSBllNy: d0e-1s3ig-1n4e1d15 f5o-r1 today's challenges-and tomorrow's. Pages: 1024 [ Team LiB ] "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 [[ TTeeaamm LLiiBB ]] •• TTaabbllee ooff CCoonntteennttss UUNNIIXX®® NNeettwwoorrkk PPrrooggrraammmmiinngg VVoolluummee 11,, TThhiirrdd EEddiittiioonn:: TThhee SSoocckkeettss NNeettwwoorrkkiinngg AAPPII BByy WW.. RRiicchhaarrdd SStteevveennss,, BBiillll FFeennnneerr,, AAnnddrreeww MM.. RRuuddooffff PPuubblliisshheerr:: AAddddiissoonn WWeesslleeyy PPuubb DDaattee:: NNoovveemmbbeerr 2211,, 22000033 IISSBBNN:: 00--1133--114411115555--11 PPaaggeess:: 11002244 Copyright "Everyone will want this book because it provides a great mix of practical experience, historical Addison-Wesley Professional Computing Series perspective, and a depth of understanding that only comes from being intimately involved in Foreword the field. I've already enjoyed and learned from reading this book, and surely you will too." Preface -Sam Leffler Introduction T he clasCshiacn ggeusi dfreo mto th Ue NSeIcXo nnde Etdwitoiornking APIs... now completely updated! Using This Book T o b uildS otourdcae yC'osd eh iagnhd lyEr rdaitsat Arivbauilatbeidlit,y networked applications and services, you need deep mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- Acknowledgments finish guidance for building robust, high-performance networked systems in any environment: Part 1: Introduction and TCP/IP UNIX Network Programming, Volume 1, Third Edition. Chapter 1. Introduction B uil ding oSne ctthioen l1e.g1.e nIndtarordyu cwtioonrk of W. Richard Stevens, this edition has been fully updated by t w o leadinSge cntieontw 1o.2r. k A p Sriomgprlea mDamytiimneg Celixepnterts to address today's most crucial standards, i m p lemenStaecttiioonn s1,. 3a. n Pdr otteoccohl nIniqdeupeesn.d eNnecew topics include: Section 1.4. Error Handling: Wrapper Functions POSISXec Stioinn g1l.e5 . U AN SIiXm pSlep eDcayiftiicmaet iSoenrv Verersion 3 Section 1.6. Roadmap to Client/Server Examples in the Text IPv6S AecPtIiosn (1i.n7c. l uOdSiIn Mgo duepldated guidance on IPv6/IPv4 interoperability) Section 1.8. BSD Networking History The new SCTP transport protocol Section 1.9. Test Networks and Hosts IPsecS-ebctaiosne 1d.1 K0.e yU nMixa Sntaangdeamrdsent Sockets Section 1.11. 64-Bit Architectures FreeSBeSctDio n4 1.8.1/25. . 1S,u mRmedar yHat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X impleExmerecnisetastions Chapter 2. The Transport Layer: TCP, UDP, and SCTP New network program debugging techniques Section 2.1. Introduction SourSceec tSiopn e2c.2if.i c T hMeu Blitgic Paicsttu rAePI, the key enabler for widespread IP multicast deployment Section 2.3. User Datagram Protocol (UDP) [ Te am LiBSe ]ction 2.4. Transmission Control Protocol (TCP) Section 2.5. Stream Control Transmission Protocol (SCTP) Section 2.6. TCP Connection Establishment and Termination Section 2.7. TIME_WAIT State Section 2.8. SCTP Association Establishment and Termination Section 2.9. Port Numbers Section 2.10. TCP Port Numbers and Concurrent Servers Section 2.11. Buffer Sizes and Limitations Section 2.12. Standard Internet Services Section 2.13. Protocol Usage by Common Internet Applications Section 2.14. Summary Exercises Part 2: Elementary Sockets Chapter 3. Sockets Introduction Section 3.1. Introduction • Table of Contents Section 3.2. Socket Address Structures UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 3.3. Value-Result Arguments B y W . RicharSde cSttioenv e3n.4s., B Bilyl tFee Onnrdeerr,i Angn dFruenwct Mion. sRudoff Section 3.5. Byte Manipulation Functions Section 3.6. inet_aton, inet_addr, and inet_ntoa Functions PublisheSr:e cAtdiodnis 3o.n7 .W eisnleeyt_pton and inet_ntop Functions Pub DateS:e cNtoiovne m3.b8e. r s21o,c 2k0_0n3top and Related Functions ISBNS:e c0t-io1n3 -31.491. 1 r55e-a1dn, writen, and readline Functions PageSs:e c1t0io2n4 3.10. Summary Exercises Chapter 4. Elementary TCP Sockets Section 4.1. Introduction "Everyone will want this book because it provides a great mix of practical experience, historical Section 4.2. socket Function perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r4e.3a.d cy oennnjeocyte dF uannctdio nlearned from reading this book, and surely you will too." - S a m LeffSleerction 4.4. bind Function Section 4.5. listen Function T he classicSe gctuioind e4 .6to. aUcNcIeXp nte Ftuwncotriokning APIs... now completely updated! Section 4.7. fork and exec Functions To build today's highly distributed, networked applications and services, you need deep Section 4.8. Concurrent Servers mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f4o.r9 . b culildoisneg F ruoncbtuiosnt, high-performance networked systems in any environment: U NI X NetwSeocrtkio nP r4o.1g0r. a gmemtsinogc,k Vnaolmuem aend 1 g, eTthpierde rEndaitmieo nFu.nctions Section 4.11. Summary B uil ding oEnx etrhceis elsegendary work of W. Richard Stevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, Chapter 5. TCP Client/Server Example implementations, and techniques. New topics include: Section 5.1. Introduction Section 5.2. TCP Echo Server: main Function POSISXec Stioinn g5l.e3 . U TNCIPX E cShpo eSceirfviecra:t siotnr _Veecrshioo nF u3nction Section 5.4. TCP Echo Client: main Function IPv6S AecPtiIosn (5i.n5c. l uTCdPin Egc huo pCdliaentte:d s gtru_idcalnic eFu oncnt ioInPv6/IPv4 interoperability) Section 5.6. Normal Startup The new SCTP transport protocol Section 5.7. Normal Termination IPsecS-ebctaiosne 5d.8 K. e PyO SMIXa nSiaggnaelm Haenndtli nSgockets Section 5.9. Handling SIGCHLD Signals FreeSBeScDtio n4 5.8.1/05. . 1w,a Rite da nHd awta Liitnpuixd 9 F.uxn,c tSioonlsaris 9, AIX 5.x, HP-UX, and Mac OS X implementations Section 5.11. Connection Abort before accept Returns New Snecettiowno 5r.k1 2p. r Toegrmrainmat idone bofu Sgegrivnegr Ptreoccehsnsiques Section 5.13. SIGPIPE Signal SourSceec tSiopn e5c.1if4i.c CMrauslhtiicnag sotf SAePrvIe, rt Hhoes tkey enabler for widespread IP multicast deployment Section 5.15. Crashing and Rebooting of Server Host [ Te am LiBSe ]ction 5.16. Shutdown of Server Host Section 5.17. Summary of TCP Example Section 5.18. Data Format Section 5.19. Summary Exercises Chapter 6. I/O Multiplexing: The select and poll Functions Section 6.1. Introduction Section 6.2. I/O Models Section 6.3. select Function Section 6.4. str_cli Function (Revisited) Section 6.5. Batch Input and Buffering Section 6.6. shutdown Function Section 6.7. str_cli Function (Revisited Again) Section 6.8. TCP Echo Server (Revisited) Section 6.9. pselect Function • Table of Contents Section 6.10. poll Function UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 6.11. TCP Echo Server (Revisited Again) B y W . RicharSde cSttioenv e6n.1s2, B. i lSl uFmenmnaerry, Andrew M. Rudoff Exercises Chapter 7. Socket Options PublisheSr:e cAtdiodnis 7o.n1 W. eInslteroyduction Pub DateS:e cNtoiovne m7.b2e. r g21e,t 2s0o0c3kopt and setsockopt Functions ISBNS:e c0t-io1n3 -71.431. 1 C55h-e1cking if an Option Is Supported and Obtaining the Default PageSs:e c1t0io2n4 7.4. Socket States Section 7.5. Generic Socket Options Section 7.6. IPv4 Socket Options Section 7.7. ICMPv6 Socket Option "Everyone will want this book because it provides a great mix of practical experience, historical Section 7.8. IPv6 Socket Options perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r7e.9a.d TyC ePn Sjoocykeetd O aptniodn slearned from reading this book, and surely you will too." - S a m LeffSleerction 7.10. SCTP Socket Options Section 7.11. fcntl Function T he classicSe gctuioind e7 .1to2. U SNumIXm nareytworking APIs... now completely updated! Exercises To build today's highly distributed, networked applications and services, you need deep Chapter 8. Elementary UDP Sockets mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f8o.r1 .b Iunitlrdoidnugc trioonbust, high-performance networked systems in any environment: U NI X NetwSeocrtkio nP r8o.2g. r ramecmvfinrgo,m V aonldu smeen d1t, oT hFuirndct iEondsition. Section 8.3. UDP Echo Server: main Function B uil ding oSne ctthioen l8e.g4.e nUdDaPr Eyc hwo oSrekrv oerf: Wdg. _Reicchhaor Fdu nScttieovnens, this edition has been fully updated by t w o leadinSge cntieontw 8o.5r. k U pDrPo Egcrhaom Clmienint:g m eaxipne Frutnsc ttioon address today's most crucial standards, implementations, and techniques. New topics include: Section 8.6. UDP Echo Client: dg_cli Function Section 8.7. Lost Datagrams POSISXec Stioinn g8l.e8 . U VNerIiXfy iSngp eReccifeiicvaedti oRens pVoenrsseion 3 Section 8.9. Server Not Running IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability) Section 8.10. Summary of UDP Example Section 8.11. connect Function with UDP The new SCTP transport protocol Section 8.12. dg_cli Function (Revisited) IPsecS-ebctaiosne 8d.1 K3.e yL aMcka onf aFgloewm Ceonnttr oSl woicthk eUtDsP Section 8.14. Determining Outgoing Interface with UDP FreeSBeSctDio n4 8.8.1/55. . 1T,C PR aendd HUDaPt ELcihnou Sxe r9v.exr, U Ssiongla sriesl 9e,c tAIX 5.x, HP-UX, and Mac OS X implementations Section 8.16. Summary New Enxeertcwiseosrk program debugging techniques Chapter 9. Elementary SCTP Sockets SourSceec tSiopn e9c.1if.i c I nMtruodltuicctaiosnt API, the key enabler for widespread IP multicast deployment Section 9.2. Interface Models [ Te am LiBSe ]ction 9.3. sctp_bindx Function Section 9.4. sctp_connectx Function Section 9.5. sctp_getpaddrs Function Section 9.6. sctp_freepaddrs Function Section 9.7. sctp_getladdrs Function Section 9.8. sctp_freeladdrs Function Section 9.9. sctp_sendmsg Function Section 9.10. sctp_recvmsg Function Section 9.11. sctp_opt_info Function Section 9.12. sctp_peeloff Function Section 9.13. shutdown Function Section 9.14. Notifications Section 9.15. Summary Exercises Chapter 10. SCTP Client/Server Example • Table of Contents Section 10.1. Introduction UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 10.2. SCTP One-to-Many-Style Streaming Echo Server: main Function B y W . RicharSde cSttioenv e1n0s.3, B. i lSl CFTePn nOenre,- Atno-dMreawny M-S.t yRlue dSotrfefaming Echo Client: main Function Section 10.4. SCTP Streaming Echo Client: str_cli Function Section 10.5. Exploring Head-of-Line Blocking PublisheSr:e cAtdiodnis 1o0n. 6W. e sCloenytrolling the Number of Streams Pub DateS:e cNtoiovne m10b.e7r. 2 C1o, n2t0r0ol3ling Termination ISBNS:e c0t-io1n3 -1104.181. 5 S5-u1mmary PageEs:x e1r0c2is4es Chapter 11. Name and Address Conversions Section 11.1. Introduction Section 11.2. Domain Name System (DNS) "Everyone will want this book because it provides a great mix of practical experience, historical Section 11.3. gethostbyname Function perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r1e1a.4d. y g eentjhooysetdb aynadd dlera Frunnectdio nfrom reading this book, and surely you will too." - S a m LeffSleerction 11.5. getservbyname and getservbyport Functions Section 11.6. getaddrinfo Function T he classicSe gctuioidn e1 1t.o7. U gNaIiX_ nstertweorrrkoirn gF uAncPtIiosn... now completely updated! Section 11.8. freeaddrinfo Function To build today's highly distributed, networked applications and services, you need deep Section 11.9. getaddrinfo Function: IPv6 mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f1o1r. 1b0u. i lgdeintga drdorbiunsft,o h Fiugnhct-ipone:r fEoxrammpalensce networked systems in any environment: U NI X NetwSeocrtkio nP r1o1.g1r1a. m hmosint_gs, eVrovlu Fmunec t1io,n Third Edition. Section 11.12. tcp_connect Function B uil ding oSne ctthioen l1e1g.1e3n. d tacryp _wloirskt oefn WFu.n cRtiiocnhard Stevens, this edition has been fully updated by t w o leadinSge cntieontw 1o1.r1k4 .p ruodgpr_acmlimeinntg Feuxnpcteiornts to address today's most crucial standards, implementations, and techniques. New topics include: Section 11.15. udp_connect Function Section 11.16. udp_server Function POSISXe cStioinn g1l1e. 1U7.N IgXe tSnpaemceifiicnaftoio Fnu nVcetiorsnion 3 Section 11.18. Re-entrant Functions IPv6S AecPtIiosn (1i1n.c1l9u. d ginegt huopsdtabtyedna gmuei_dra nacned goent IhPovs6t/bIPyva4dd irn_terr oFupnecrtaiobnsility) Section 11.20. Obsolete IPv6 Address Lookup Functions The new SCTP transport protocol Section 11.21. Other Networking Information IPsecS-ebctaiosne 1d1 .K22e.y SMumanmaagryement Sockets Exercises FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X Part 3: Advanced Sockets implementations Chapter 12. IPv4 and IPv6 Interoperability New Snecettiowno 1r2k. 1p. r Iongtrroadmuc tidoenbugging techniques Section 12.2. IPv4 Client, IPv6 Server SourSceec tSiopn e1c2i.f3i.c IMPvu6l tCicliaenstt, IAPPv4I, S tehrvee rkey enabler for widespread IP multicast deployment Section 12.4. IPv6 Address-Testing Macros [ Te am LiBSe ]ction 12.5. Source Code Portability Section 12.6. Summary Exercises Chapter 13. Daemon Processes and the inetd Superserver Section 13.1. Introduction Section 13.2. syslogd Daemon Section 13.3. syslog Function Section 13.4. daemon_init Function Section 13.5. inetd Daemon Section 13.6. daemon_inetd Function Section 13.7. Summary Exercises Chapter 14. Advanced I/O Functions Section 14.1. Introduction Section 14.2. Socket Timeouts • Table of Contents Section 14.3. recv and send Functions UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 14.4. readv and writev Functions B y W . RicharSde cSttioenv e1n4s.5, B. i lrl Feecnvnmesr,g A nanddre swe Mn.d mRsudgo Fffunctions Section 14.6. Ancillary Data Section 14.7. How Much Data Is Queued? PublisheSr:e cAtdiodnis 1o4n. 8W. e sSloecykets and Standard I/O Pub DateS:e cNtoiovne m14b.e9r. 2 A1d, v2a0n0c3ed Polling ISBNS:e c0t-io1n3 -1144.11105. 5 S-1ummary PageEs:x e1r0c2is4es Chapter 15. Unix Domain Protocols Section 15.1. Introduction Section 15.2. Unix Domain Socket Address Structure "Everyone will want this book because it provides a great mix of practical experience, historical Section 15.3. socketpair Function perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r1e5a.4d. y S eonckjeoty Feudnc taionnds learned from reading this book, and surely you will too." - S a m LeffSleerction 15.5. Unix Domain Stream Client/Server Section 15.6. Unix Domain Datagram Client/Server T he classicSe gctuioind e1 5t.o7. U PNasIsXin ng eDtewscorirpktoinrsg APIs... now completely updated! Section 15.8. Receiving Sender Credentials To build today's highly distributed, networked applications and services, you need deep Section 15.9. Summary mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidEaxnercceis efsor building robust, high-performance networked systems in any environment: U NI X Ne Ctwhaoprtekr P16r.o gNroanmblomckiinngg ,I /VOolume 1, Third Edition. Section 16.1. Introduction B uil ding oSne ctthioen l1e6g.2e.n dNoanrbyl owckoinrgk Roefa dWs .a nRdi cWhraitreds: Sstterv_ecnlsi, Ftuhnisct ieond i(tRioenvi shitaeds) been fully updated by t w o leadinSge cntieontw 1o6.r3k. pNroongblroackminmg cinogn neexcpterts to address today's most crucial standards, implementations, and techniques. New topics include: Section 16.4. Nonblocking connect: Daytime Client Section 16.5. Nonblocking connect: Web Client POSISXec Stioinn g1l6e. 6U. NNIoXnb Slopckeincgif iaccactieopnt Version 3 Section 16.7. Summary IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability) Exercises Chapter 17. ioctl Operations The new SCTP transport protocol Section 17.1. Introduction IPsecS-ebctaiosne 1d7 .K2.e yi oMcatnla Fguenmctieonnt Sockets Section 17.3. Socket Operations FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X Section 17.4. File Operations implementations Section 17.5. Interface Configuration New Snecettiowno 1r7k. 6p. r goegtra_mif di_ebiunfgog iFnugn ctteiocnhniques Section 17.7. Interface Operations SourSceec tSiopn e1c7i.f8i.c AMRuPl tCiaccahset OApPerIa,t itohnes key enabler for widespread IP multicast deployment Section 17.9. Routing Table Operations [ Te am LiBSe ]ction 17.10. Summary Exercises Chapter 18. Routing Sockets Section 18.1. Introduction Section 18.2. Datalink Socket Address Structure Section 18.3. Reading and Writing Section 18.4. sysctl Operations Section 18.5. get_ifi_info Function (Revisited) Section 18.6. Interface Name and Index Functions Section 18.7. Summary Exercises Chapter 19. Key Management Sockets Section 19.1. Introduction Section 19.2. Reading and Writing Section 19.3. Dumping the Security Association Database (SADB) • Table of Contents Section 19.4. Creating a Static Security Association (SA) UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 19.5. Dynamically Maintaining SAs B y W . RicharSde cSttioenv e1n9s.6, B. i lSl uFmenmnaerry, Andrew M. Rudoff Exercises Chapter 20. Broadcasting PublisheSr:e cAtdiodnis 2o0n. 1W. e sInletyroduction Pub DateS:e cNtoiovne m20b.e2r. 2 B1r,o 2a0d0c3ast Addresses ISBNS:e c0t-io1n3 -2104.131. 5 U5-n1icast versus Broadcast PageSs:e c1t0io2n4 20.4. dg_cli Function Using Broadcasting Section 20.5. Race Conditions Section 20.6. Summary Exercises "Everyone will want this book because it provides a great mix of practical experience, historical Chapter 21. Multicasting perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r2e1a.1d. y I netnrojdouycetidon and learned from reading this book, and surely you will too." - S a m LeffSleerction 21.2. Multicast Addresses Section 21.3. Multicasting versus Broadcasting on a LAN T he classicSe gctuioind e2 1t.o4. U MNuIltXic ansetitnwg oonrk ai nWgA NAPIs... now completely updated! Section 21.5. Source-Specific Multicast To build today's highly distributed, networked applications and services, you need deep Section 21.6. Multicast Socket Options mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f2o1r. 7b. u milcdainsgt _rojbouisnt a, nhdi gRhel-apteedr Ffounrcmtioannsce networked systems in any environment: U NI X NetwSeocrtkio nP r2o1.g8r. a dmgm_cinlgi, FVunocltuiomn eU s1in,g T Mhuilrtdic aEstdinitgion. Section 21.9. Receiving IP Multicast Infrastructure Session Announcements B uil ding oSne ctthioen l2e1g.1e0n. d Saernyd iwngo arknd o Rfe Wcei.v iRngichard Stevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, Section 21.11. Simple Network Time Protocol (SNTP) implementations, and techniques. New topics include: Section 21.12. Summary Exercises PO SChIaXp tSeri n2g2l.e A UdvNaInXce Sd pUeDcP ifSioccakteitosn Version 3 Section 22.1. Introduction IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability) Section 22.2. Receiving Flags, Destination IP Address, and Interface Index Section 22.3. Datagram Truncation The new SCTP transport protocol Section 22.4. When to Use UDP Instead of TCP IPsecS-ebctaiosne 2d2 .K5.e yA dMdiangn aRgeleiambileitny tt oS ao cUkDeP tAspplication Section 22.6. Binding Interface Addresses FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X Section 22.7. Concurrent UDP Servers implementations Section 22.8. IPv6 Packet Information New Snecettiowno 2r2k. 9p. r IoPgv6r aPmath d MeTbUu Cgognitnrogl techniques Section 22.10. Summary SourEcxee rScipseescific Multicast API, the key enabler for widespread IP multicast deployment Chapter 23. Advanced SCTP Sockets [ Te am LiBSe ]ction 23.1. Introduction Section 23.2. An Autoclosing One-to-Many-Style Server Section 23.3. Partial Delivery Section 23.4. Notifications Section 23.5. Unordered Data Section 23.6. Binding a Subset of Addresses Section 23.7. Determining Peer and Local Address Information Section 23.8. Finding an Association ID Given an IP Address Section 23.9. Heartbeating and Address Failure Section 23.10. Peeling Off an Association Section 23.11. Controlling Timing Section 23.12. When to Use SCTP Instead of TCP Section 23.13. Summary Exercises Chapter 24. Out-of-Band Data • Table of Contents Section 24.1. Introduction UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Section 24.2. TCP Out-of-Band Data B y W . RicharSde cSttioenv e2n4s.3, B. i lsl Foecnknaetr,m Aanrdkre Fwu nMc.t ioRnudoff Section 24.4. TCP Out-of-Band Data Recap Section 24.5. Summary PublisheEr:x eArdcdisiesosn Wesley Pub D aCthea:p Nteorv 2em5.b eSri g2n1a,l -2D0r0iv3en I/O ISBNS:e c0t-io1n3 -2154.111. 5 I5n-t1roduction PageSs:e c1t0io2n4 25.2. Signal-Driven I/O for Sockets Section 25.3. UDP Echo Server Using SIGIO Section 25.4. Summary Exercises "Everyone will want this book because it provides a great mix of practical experience, historical Chapter 26. Threads perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r2e6a.1d. y I netnrojdouycetidon and learned from reading this book, and surely you will too." - S a m LeffSleerction 26.2. Basic Thread Functions: Creation and Termination Section 26.3. str_cli Function Using Threads T he classicSe gctuioind e2 6t.o4. U TNCPIX E cnheo tSwerovrekr iUnsgin Ag PThIsre..a.d snow completely updated! Section 26.5. Thread-Specific Data To build today's highly distributed, networked applications and services, you need deep Section 26.6. Web Client and Simultaneous Connections (Continued) mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f2o6r. 7b. u Miludtienxge sr:o Mbuutusatl, Ehxicgluhs-iopnerformance networked systems in any environment: U NI X NetwSeocrtkio nP r2o6.g8r. a Cmonmdiitniogn, VVaorialubmlese 1, Third Edition. Section 26.9. Web Client and Simultaneous Connections (Continued) B uil ding oSne ctthioen l2e6g.1e0n. d Saurmy mwaoryrk of W. Richard Stevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, Exercises implementations, and techniques. New topics include: Chapter 27. IP Options Section 27.1. Introduction POSISXec Stioinn g2l7e. 2U. NIPIvX4 SOppteiocnisfication Version 3 Section 27.3. IPv4 Source Route Options IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability) Section 27.4. IPv6 Extension Headers Section 27.5. IPv6 Hop-by-Hop Options and Destination Options The new SCTP transport protocol Section 27.6. IPv6 Routing Header IPsecS-ebctaiosne 2d7 .K7.e yIP Mv6a Sntaicgkye mOpetinont sSockets Section 27.8. Historical IPv6 Advanced API FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X Section 27.9. Summary implementations Exercises Ne w Ch anpetetwr 2o8r.k Rparwo Sgorcakmets debugging techniques Section 28.1. Introduction SourSceec tSiopn e2c8i.f2i.c RMauwl tSicoacksett CArPeIa,t iothne key enabler for widespread IP multicast deployment Section 28.3. Raw Socket Output [ Te am LiBSe ]ction 28.4. Raw Socket Input Section 28.5. ping Program Section 28.6. traceroute Program Section 28.7. An ICMP Message Daemon Section 28.8. Summary Exercises Chapter 29. Datalink Access Section 29.1. Introduction Section 29.2. BSD Packet Filter (BPF) Section 29.3. Datalink Provider Interface (DLPI) Section 29.4. Linux: SOCK_PACKET and PF_PACKET Section 29.5. libpcap: Packet Capture Library Section 29.6. libnet: Packet Creation and Injection Library Section 29.7. Examining the UDP Checksum Field Section 29.8. Summary • Table of Contents Exercises UNIX® Network Programming Volume 1, Third Edition: The Sockets Networking A PI Chapter 30. Client/Server Design Alternatives B y W . RicharSde cSttioenv e3n0s.1, B. i lIln Ftreondnuecrt,io Anndrew M. Rudoff Section 30.2. TCP Client Alternatives Section 30.3. TCP Test Client PublisheSr:e cAtdiodnis 3o0n. 4W. e sTlCePy Iterative Server Pub DateS:e cNtoiovne m30b.e5r. 2 T1C, P2 0C0o3ncurrent Server, One Child per Client ISBNS:e c0t-io1n3 -3104.161. 5 T5C-1P Preforked Server, No Locking Around accept PageSs:e c1t0io2n4 30.7. TCP Preforked Server, File Locking Around accept Section 30.8. TCP Preforked Server, Thread Locking Around accept Section 30.9. TCP Preforked Server, Descriptor Passing Section 30.10. TCP Concurrent Server, One Thread per Client "Everyone will want this book because it provides a great mix of practical experience, historical Section 30.11. TCP Prethreaded Server, per-Thread accept perspective, and a depth of understanding that only comes from being intimately involved in t h e field. IS'evceti oanl r3e0a.1d2y. eTCnPj oPyreetdhr eaandded l eSaerrvneer,d M farion mTh rreeaad daicncge tphtis book, and surely you will too." - S a m LeffSleerction 30.13. Summary Exercises T he clas sCihca pgtueri d3e1 . t oS tUreNamIXs networking APIs... now completely updated! Section 31.1. Introduction To build today's highly distributed, networked applications and services, you need deep Section 31.2. Overview mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to- f i nis h guidSaenctcioen f3o1r. 3b. u giledtinmgs gro abnud sptu, thmigshg- Fpuenrcftoiornms ance networked systems in any environment: U NI X NetwSeocrtkio nP r3o1.g4r. a gmemtpinmgs,g V aonldu pmuet p1m, sTgh Firudn cEtiodnitsion. Section 31.5. ioctl Function B uil ding oSne ctthioen l3e1g.6e.n dTraarnysp worot rPkro ovifd eWr I.n Rteircfahcaer (dT PSI)tevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, Section 31.7. Summary implementations, and techniques. New topics include: Exercises Appendix A. IPv4, IPv6, ICMPv4, and ICMPv6 POSSecIXtio nS iAn.1g.l e I nUtrNodIuXc tSiopnecification Version 3 Section A.2. IPv4 Header IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability) Section A.3. IPv6 Header Section A.4. IPv4 Addresses The new SCTP transport protocol Section A.5. IPv6 Addresses IPsSeecct-iobna As.e6d. IKneteyr nMeta Cnoantgreolm Meesnsta gSeo Pcrkoetotcsols (ICMPv4 and ICMPv6) Appendix B. Virtual Networks FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X Section B.1. Introduction implementations Section B.2. The MBone NeSwec tnioent wB.o3.r k T hper o6bgornaem debugging techniques Section B.4. IPv6 Transition: 6to4 S Aopuperncdeix S Cp. e Dceifbiuc gMginuglt Ticeachsnt iqAuPeIs, the key enabler for widespread IP multicast deployment Section C.1. System Call Tracing

Description:
This is THE guide to UNIX network programming APIs. Whether you write Web servers, client/server applications, or any other network software, you need to understand networking APIS-especially sockets in greater detail than ever before. You need UNIX Network Programming, Volume 1, Third Edition. In t
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.