《UNIX 网络编程 卷1:连网的 API:套接字与 XTI 第2版》求取 ⇩

Part 1. Introduction and TCP/IP1

Chapter1. Introduction3

1.1 Introduction3

1.2 A Simple Daytime Client6

1.3 Protocol Independence9

1.4 Error Handling:Wrapper Functions11

1.5 A Simple Daytime Server13

1.6 Road Map to Client-Server Examples in the Text16

1.7 OSI Model18

1.8 BSD Networking History19

1.9 Test Networks and Hosts20

1.10 Unix Standards24

1.11 64-bit Architectures27

1.12 Summary28

Chapter 2. The Transport Layer:TCP and UDP29

2.1 Introduction29

2.2 The Big Picture30

2.3 UDP:User Datagram Protoool32

2.4 TCP:Transmission Control Protocol32

2.5 TCP Connection Establishment and termination34

2.6 TIME_WAIT State40

2.7 Port Numbars41

2.8 TCP Port Numbers and Concunent Servers44

2.9 Buffer Sizes and Limitations46

2.10 Standard Internet Servicas50

2.11 Protocol Usage by Common Intemet Applications52

2.12 Summary52

Part 2. Elementary Sockets55

Chapter 3. Sockets Interoductlon57

3.1 Introduction57

3.2 Socket Address Structuras57

3.3 Value-Reaulf Arguments63

3.4 Byte Ordering Functions66

3.5 Byte Manipulation Functions69

3.6 inet_aton,inet_addr,and inet_ntoa Functions70

3.7 inet_pton and inet _ntop Functions72

3.8 sock_ntop and Related Functions75

3.9 readn,writen,and readline Functions77

3.10 isfdtype Function81

3.11 Summary82

Chapter 4. Elementary TCP Sockets85

4.1 Introduction85

4.2 socket Function85

4.3 connect Function89

4.4 bind Function91

4.5 listen Funcion99

4.6 accept Function99

4.7 fork and exec Functions102

4.8 Concurrent Servers104

4.10 getaockname and getpeername Functions107

4.9 close Function107

4.11 Summary110

Chapter 5. TCP Cllent -Server Example111

5.1 Introduction111

5.2 TCP Echo Server:main Function112

5.3 TCP Echo Server:str_echo Function113

5.4 TCP Echo Client:main Function113

5.5 TCP Echo Client :str_cli Function115

5.6 Normal Startup115

5.7 Normal Termination117

5.8 Posix Signal Handling119

5.9 Handling SIGCHLD Signals122

5.10 wait and waitpid Functions124

5.11 Connection Abort before accept Returns129

5.12 Termination of Server Process130

5.13 SIGPIPE Signal132

5.14 Crashing of Server Host133

5.15 Crashing and Rebooling of Server Host134

5.16 Shutdown of Server Host135

5.17 Summary of TCP Example135

5.18 Data Format137

5.19 Summary140

Chapter 6. I/O Multlplexing:The select and Poll Functlons143

6.1 Introduction143

6.2 I/O Models144

6.3 select Function150

6.4 str_cli Function(Revisited)155

6.5 Batch Input157

6.6 shut down Function160

6.7 str_cli Function(Revisited Again)161

6.8 TCP Echo Server(Revisited)162

6.9 pselect Function168

6.10 poll Function169

6.11 TCP Echo Server(Revisited Again)172

6.1.2 Summary175

Chapter 7. Socket Options177

7.1 Introduction177

7.3 Checking if an Option is Supported and Oblaining the Defaulf178

7.2 get sockopt and setsockopt Functions178

7.4 Socket States183

7.5 Generic Socket Options183

7.6 IPv4 Socket Options197

7.7 ICMPv6 Socket Option199

7.8 IPv6 Socket Options199

7.9 TCP Socket Options201

7.10 fcntl Function205

7.11 Summary207

Chapter 8. Elamentary UDP Sockets211

8.1 Introduction211

8.2 recvfrom and sendto functions212

8.3 UDP Echo Server main Function213

8.4 UDP Echo Server:dg_echo Function214

8.5 UDP Echo Client:main Function216

8.6 UDP Echo Client:dg_cli Function217

8.7 Lost Datagrams217

8.8 Verifying Received Rasponse218

8.9 Server Not Running220

8.10 Summary of UDP example221

8.11 connect Function with UDP224

8.12 dg_cli Funclion(Revisited)227

8.13 Lack of Flow Control with UDP228

8.14 Determining Outgoing interface with UDP231

8.15 TCP and UDP Echo Server Using Select233

8.16 Summary235

Chapter9. Elementary Name and Address Converslons237

9.1 Introduction237

9.2 Domain Name Systern237

9.3 gethostbyname Function240

9.4 RES_USE_INET6 Resolver Option245

9.5 gethostbyname2 Function and IPv6 Support246

9.7 Uname Function249

9.8 gethostname Function250

9.9 getservbyname and getservbyport Functions251

9.10 Other Networking Information255

9.11 Summary256

Part 3. Advanced Sockets259

Chapter 10. IPv4 and IPv6 Interoperability261

10.1 Introduction261

10.2 IPv4 Client,IPv6 Server262

10.3 IPv6 Client,IPv4 Server265

10.4 IPv6 Address Testing Macros267

10.5 IPV6 ADDRFORM Socket Option268

10.6 Source Code Portability270

10.7 Summary271

Chapter11. Advanced Name and Address Corrverslons273

11.1 Introduction273

11.2 getaddrinto Function273

11.3 gai_strerror Function278

11.4 freeaddrinfo Function279

11.5 getaddrinfo Function:IPv6 and Unix Domain279

11.6 getaddrin fo Function:Examples282

11.7 host_serv Function284

11.8 tcp_connect Function285

11.9 tcp_listen Function288

11.10 udp_client Function293

11.11 udp_connect Function295

11.12 udp-server Function296

11.13 getnameinfo Function298

11.14 Reentrant Functions300

11.15 gethostbyname_r and gethostbyaddr_r Functions303

11.16 Implementation of getnameinfo and getnaceinfo Functions305

11.17 Summary328

Chapter 12. Daemon Processes and inetd Superserver331

12.1 Introduction331

12.2 syslogd Daemon332

12.3 eyslog Funetion333

12.4 daemon_init Function335

12.5 inetd Daemon339

12.6 daemon_inetd Function344

12.7 Summary346

13.1 Introduction349

13.2 Socket Timeouts349

Chapter 13. Advanced I/O Funetions349

13.3 recv and send Functions354

13.4 readv and writev Functions357

13.5 recvmsg and sendmsg Funetions358

13.6 Ancillary Data362

13.7 How Much Data Is Queued?365

13.8 Sockets and Standard I/O366

13.9 T/TCP:TCP for Transactions369

13.10 Summary371

Chapter 14. Unlx Domain Protocols373

14.1 Introduction373

14.2 Unix Domain Socket Address Structure374

14.3 SocketPair Function376

14.4 Socket Functions377

14.5 Unix Domain Stream Client-Server378

14.6 Unix Domain Datagram Client-Server379

14.7 Passing Descriptors381

14.8 Receiving Sender Credentials390

14.9 Summary394

Chapter 15. Nonblocking I/O397

15.1 Introduction397

15.2 Nonblecking Reads and Writes:str_cli Function(Revisited)399

15.3 Nonblocking connect409

15.4 Nonblocking connect: Daytime Client410

15.5 Nonblocking connect:Web Client413

15.6 Nonblocking accept422

15.7 Summary424

Chapter 16. ioctl Operations425

16.1 introduction425

16.2 ioctl Function426

16.3 Socket Operations426

16.4 File Operations427

16.5 Interface Configuration428

16.6 get_ifi_ info Function429

16.7 Interface Operations439

16.8 ARP Cache Operations440

16.9 Routing Table Operations442

16.10 Summary443

17.1 *Introduction445

Chapter 17. Routing Sockets445

17.2 Datailnk Socket Address Structure446

17.3 Reading and Writing447

17.4 sysctl Operations454

17.5 get_ifi_info Function459

17.6 Interlace Name and Index Functions463

17.7 Summary467

Chapter 18. Broadcasting469

18.1 Introduction469

18.2 Broadcast Addresses470

18.3 Unlcast versus Broadcast472

18.4 dg_cli Function Using Broadcasting475

18.5 Race Conditions478

18.6 Summary486

Chapter 19. Multicasting487

19.1 Introduction487

19.2 Multicast Addressas487

19.3 Multicasting versus Broadcasting on A LAN490

19.4 Multicasting on a WAN493

19.5 Multicast Socket Options495

19.6 mcast_join and Related Functions499

19.7 dg_cli Function Using Muiticasting502

19.8 Receiving MBone Session Announcements504

19.9 Sending and Receiving507

19.10 SNTP:Simple Network Time Protocol510

19.11 SNTP(Continued)515

19.12 Summary528

Chapter 20. Advanced UDP Sockets531

20.1 Introduction531

20.2 Receiving Flags, Destination IP Address,and Interface Index532

20.3 Datagram Truncation539

20.4 When to Use UDP Instead Of TCP539

20.5 Adding Reliability to a UDP Application542

20.6 Binding Interface Addresses553

20.7 Concurrent UDP Servers557

20.8 IPv6 Packet Information560

20.9 Summary562

Chapter 21. Out-of-Band Data565

21.1 Introduction565

21.2 TCP Out-of-Band Data565

21.3 sockatmark Function572

21.4 TCP out-of-Band Data Summary580

21.5 Client-Server Heartbaat Functions581

21.6 Summary586

Chapter 22. Signal-Driven I/O589

22.1 Introduction589

22.2 Signal-Driven I/O for Sockets590

22.3 UDP Echo Server Using SIGIO592

22.4 Summary598

23.1 Introduction601

Chapter 23. Threads601

23.2 Basic Thread Functions:Creation and Termination602

23.3 str_cli Function Using Threads605

23.4 TCP Echo Server Using Threads607

23.5 Thread-Spacific Data611

23.6 Web Client and Simultaneous Connections(Continued)620

23.7 Mutexes:Mutual Exclusion622

23.8 Condition Variables627

23.9 Web Client and Simultaneous Connections(Continued)631

23.10 Summary633

24.2 IPv4 Options635

24.1 Introduction635

Chapter 24. IP Options635

24.3 IPv4 Source Route Cotions637

24.4 IPv6 Extension Headers645

24.5 IPv6 Hop-by-Hop Options and Destination Options645

24.6 IPv6 Routing Header649

24.7 IPv6 Sticky Options653

24.8 Summary654

Chapter 25. Raw Sockets655

25.1 Introduction655

25.2 Raw Socket Creation655

25.3 Raw Socket Output657

25.4 Raw Socket Input659

25.5 Ping Program661

25.6 Traceroute Program672

25.7 An ICMP Message Daemon685

25.8 Summary702

Chapter 26. Datallnk Access703

26.1 Introductlon703

26.2 BPF:BSD Packet Filter704

26.3 DLPI:Data Link Provlder Intertace706

26.4 Linux:socx_Packet707

26.5 Iibpcap:Packet Capture Library707

26.6 Examining the UDP Checksum Field708

26.7 Summary725

27.1 Introduction727

Chapter 27. Client-Server Design Alternatives727

27.2 TCP Client Alternatives730

27.3 TCP Text Client730

27.4 TCP lterative Server732

27.5 TCP Concurrent Server,One Child per Client732

27.6 TCP Preforked Server,No Locking around accept736

27.7 TCP Preforked Server,File Locking around accept742

27.8 TCP Preforked Server,Thread Locking around accept745

27.9 TCP Preforked Server,Descriptor Passing746

27.10 TCP Concurrent Server,One Thread Per Client752

27.11 TCP Prefhreaded Server,Per-Thread accept754

27.12 TCP Prethreaded Server,Main Thread accept756

27.13 Summary759

Part 4. XTI:X/Open Transport Interface761

Chapter 28. XTI:TCP Cllents763

28.1 Introduction763

28.2 t_open Function764

28.3 t_error and t strerror Functions767

28.4 net buf Structures and XTI Structures769

28.5 t_bind Function770

28.6 t_connect Function772

28.7 t_rcv and t_snd Functions773

28.8 t-look Function774

28.9 t_sindrel and t_revrel Functions775

28.10 t_snddis and t_rcvdis Functions777

28.11 XTI TCP Daytime Cllent778

28.12 xli_rdwr Function781

28.13 Summary782

Chapter 29. XTI:Name and Address Funetions783

29.1 Introduction783

29.2 /etc/netconfig File and netconfig Functions784

29.3 NETPATH Varlable and netpath Functions785

29.4 netdir Functions786

29.5 t_alloc and t_free Functions788

29.6 t_getprotaddr Functions790

29.7 xti_ntop Function791

29.8 tcp_connect Function792

29.9 Summary796

30.1 Introduction797

Chapter 30. XTI:TCP Servers797

30.2 t_listen Function799

30.3 tep_listen Function800

30.4 t_accept Function802

30.5 xti_accept Function803

30.6 Simple Daytime Server804

30.7 Multiple Pending Connections806

30.8 xti_accept Function(Revisited)808

30.9 Summary816

Chapter 31. XTI:UDP Cllents and Servers819

31.1 Introduction819

31.2 t_rcvudata and t_sndudata Functions819

31.3 udp_client Function820

31.4 t_rcvuderr Function:Asynchronous Errors824

31.5 udp_server Function826

31.6 Reading a Datagram in Pieces829

31.7 Summary831

Chapter 32. XTI Options833

32.1 Introduction833

32.2 t_opthdr Structure835

32.3 XTI Options837

32.4 t_optmgmt Function840

32.5 Checking If an Option Is Supported and Obtaining the Defaulf841

32.6 Getting and Setting XTI Options844

32.7 Summary848

Chapter 33. Streams849

33.1 Introduction849

33.2 Overview850

33.3 getmsg and putmsg Functions854

33.4 getpmsg and putpmsg Functions855

33.5 ioctl Function855

33.6 TPI:Transport Provlder Interface856

33.7 Summary866

Chapter 34. XTI:Additional Functions867

34.1 Introduction867

34.2 Nonblocking I/O867

34.3 t_rcvconnect Function868

34.4 t_getinfo Function869

34.5 t_getstate Function869

34.6 t_sync Function870

34.7 t_unbind Function872

34.8 t_rcvv and t_rcvvudata Functions872

34.9 t_andv and t_sndvudata Functions873

34.10 t_rcvreldata and t_sndreldata Functions874

34.11 Signal-Driven I/O874

34.12 Out-of-Band Data875

34.13 Loopback Transport Providers880

34.14 Summary881

A.2 IPv4 Header883

A.1 Introduction883

Appendlx A. IPv4,IPv6,ICMPv4,and ICMPv6883

A.3 IPv6 Header885

A.4 IPv4 Addresses887

A.5 IPv6 Addresses892

A.6 ICMPv4 and ICMPv6:Internet Control Message Protocol896

Appendix B. Virtual Networks899

B.1 Introduction899

B.2 The MBone899

B.3 The 6bone901

Appendix C. Debugglng Techniques903

C.1 Systern Call Tracing903

C.3 sock Program908

C.2 Standard Intmet Sarvices908

C.4 Small Test Prograrns911

C.5 tcpdump Prograrn913

C.6 netstat Prograrn914

C.7 Isof Prograrn914

AppendlX D. Mlacelianeous Source Code915

D.1 unp.h Header915

D.2 config,h Header919

D.3 unpxti.h Header920

D.4 Standard Error Functions922

Appendix E Solutlons to Selected Exerclsss925

Blbllography963

Index971

1998年07月第1版《UNIX 网络编程 卷1:连网的 API:套接字与 XTI 第2版》由于是年代较久的资料都绝版了,几乎不可能购买到实物。如果大家为了学习确实需要,可向博主求助其电子版PDF文件(由W.Richard Stevens 1998年07月第1版 清华大学出版社 出版的版本) 。对合法合规的求助,我会当即受理并将下载地址发送给你。

高度相关资料

OS/2 WARP Internet网络连接(1997 PDF版)
OS/2 WARP Internet网络连接
1997 北京:电子工业出版社
网络安全技术教程  第2版( PDF版)
网络安全技术教程 第2版
UNIX系统V/386第4版-网络程序员指南( PDF版)
UNIX系统V/386第4版-网络程序员指南
电子工业出版社
Windows NT 4——网络连接(1998年05月第1版 PDF版)
Windows NT 4——网络连接
1998年05月第1版 机械工业出版社
Windows NT——网络连接(1998年05月第1版 PDF版)
Windows NT——网络连接
1998年05月第1版 机械工业出版社
Dos-Unix网络与网络互连技术(1996 PDF版)
Dos-Unix网络与网络互连技术
1996 北京:电子工业出版社
UNIX网络程序设计(1993 PDF版)
UNIX网络程序设计
1993 北京:航空工业出版社
商业会计学(1990 PDF版)
商业会计学
1990 北京:中国商业出版社
最新UNIX与网络操作教程(1999 PDF版)
最新UNIX与网络操作教程
1999 西安:西安电子科技大学出版社
网络分析  1980  第1版(1972 PDF版)
网络分析 1980 第1版
1972 科学图书股份有限公司
UNIX网络编程 卷1 连网的API  套接字与XTI  第2版  英文(1998 PDF版)
UNIX网络编程 卷1 连网的API 套接字与XTI 第2版 英文
1998 北京:清华大学出版社
UNIX网络编程 第2版 第1卷 套接口API和X/Open传输接口API(1999 PDF版)
UNIX网络编程 第2版 第1卷 套接口API和X/Open传输接口API
1999 北京:清华大学出版社
计算机网络  第2版(1999 PDF版)
计算机网络 第2版
1999 北京:电子工业出版社
计算机网络  第2版(1989 PDF版)
计算机网络 第2版
1989 成都:成都科技大学出版社
Windows 95 与 Windows NT网络连接技术(1997 PDF版)
Windows 95 与 Windows NT网络连接技术
1997 北京:科学出版社;龙门书局