王朝网络
分享
 
 
 

UNIX网络编程 卷1:套接字联网API(英文版 第3版)(图灵原版计算机科学系列)(UNIX Network Programming Volume1:The Sockets Networking API,Third Edition)

王朝导购·作者佚名
 
UNIX网络编程 卷1:套接字联网API(英文版 第3版)(图灵原版计算机科学系列)(UNIX Network Programming Volume1:The Sockets Networking API,Third Edition)  点此进入淘宝搜索页搜索
  特别声明:本站仅为商品信息简介,并不出售商品,您可点击文中链接进入淘宝网搜索页搜索该商品,有任何问题请与具体淘宝商家联系。
  参考价格: 点此进入淘宝搜索页搜索
  分类: 计算机与互联网,操作系统,Unix,
  品牌: 史蒂文斯(W.Richard Stevens)

基本信息·出版社:人民邮电出版社

·页码:994 页

·出版日期:2009年11月

·ISBN:9787115215093

·条形码:9787115215093

·版本:第1版

·装帧:平装

·开本:16

·正文语种:中文/英语

·丛书名:图灵原版计算机科学系列

·外文书名:UNIX Network Programming Volume1:The Sockets Networking API,Third Edition

产品信息有问题吗?请帮我们更新产品信息。

内容简介《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》是一部UNIX网络编程的经典之作。书中全面深入地介绍了如何使用套接字API进行网络编程。全书不但介绍了基本编程内容,还涵盖了与套接字编程相关的高级主题,对于客户/服务器程序的各种设计方法也作了完整的探讨,最后还深入分析了流这种设备驱动机制。

《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》内容详尽且具权威性,几乎每章都提供精选的习题,并提供了部分习题的答案,是网络研究和开发人员理想的参考书。

作者简介W. Richard Stevens(1951—1999) 国际知名的UNIX和网络专家,备受赞誉的技术作家。生前著有《TCP/IP详解》(三卷)、《UNIX环境高级编程》和《UNIX网络编程》(两卷),均为不朽的经典著作。

Bill Fenner AT&T实验室的主要技术人员,专攻IP多播、网络管理和测量,他是IETF路由的领域主管之一,负责审批作为RFC出版的所有路由相关文档。

Andrew M. Rudoff Sun公司的资深软件工程师,专攻网络、操作系统内核、文件系统和高可用性软件体系结构。

媒体推荐“所有人都非常期待这本书,因为它完美地结合了实践经验、历史视角以及在本领域浸淫多年才能获得的透彻理解。阅读本书是一种享受,我收获颇丰。相信大家定会有同感。”

——Sam Leffler,FreeBSD基金会副主席

“这部著作在计算机科学领域里的传奇得以延续,Bill Fenner和Andrew Rudoff居功至伟。”

——Art Sedighi

“这套书是学习网络编程最好的书。全世界最最好的,远超群伦。”

——S. Devasundaram

“这本书极好……买吧,这本书非常专业,物有所值,对每一个准备从事UNIX系统网络编程的人来说都是必备的。”

——L. Garcia

“这本书包括了我想了解的UNIX套接字API的所有知识。”

——Thomas Haugland Jensen

“这本书不会让你一夜之间成为专家,但它终究会让你成为专家。”

——John Nguyen

“你若是个重任在肩的网络程序员骨干,这本书绝对是给你写的,即使你不是,也能从中学到不少东西。”

——Russ Woodman

“任何词语都无法表达出这本书有多好!我诚恳地推荐初学者买这本书,我保证你一定会成为网络大师。我自己刚读完这本书,并在工作中经常用到,我能感觉到自己的功力倍增,真是奇妙!”

——“kael8952”

编辑推荐《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》:这是一部传世之作!顶级网络编程专家Bill Fenner和Andrew M.Rudooff应邀执笔,对W.Richard Stevens的经典作品进行修订。书中吸纳了近几年网络技术的发展。增添了IPv6、SCTP协议和密钥管理套接字等内容,深入讨论了最新的关键标准、实现和技术。

书中的所有示例都是在UNIX系统上测试通过的真实的、可运行的代码,继承了Stevens一直强调的理念:“学习网络编程的最好方法就是下载这些程序,对其进行修改和改进。只有这样实际编写代码才能深入理解有关概念和方法。”读者可以从图灵网站《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》网页免费注册下载这些示例的源代码。

《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》为UNIX网络编程提供了全面的指导。是网络研究和开发人员公认的权威参考书,无论网络编程的初学者还是网络专家都会大受裨益。

《UNIX网络编程 卷1:套接字联网API(英文版 第3版)》中文版预计在2010年5月出版。敬请期待。

UNIX和网络专家W. Richard Stevens的传世之作

UNIX系统网络编程人员的必备经典

内容详尽权威,提供精选习题及答案

详细描述4种不同的IPC形式

在Unix系统上测试通过的真实、可运行的代码让读者轻松深入学习网络编程复杂的新技术。

目录

Part 1 Introduction and TCP/IP 1

简介和TCP/IP

Chapter 1 Introduction 3

简介

1.1 Introduction 3

概述

1.2 A Simple Daytime Client 6

一个简单的时间获取客户程序

1.3 Protocol Independence 10

协议无关性

1.4 Error Handling: Wrapper Functions 11

错误处理:包装函数

1.5 A Simple Daytime Server 13

一个简单的时间获取服务器程序

1.6 Roadmap to Client/Server Examples in theText 16

本书中客户/服务器示例的路线图

1.7 OSI Model 18

OSI模型

1.8 BSD Networking History 20

BSD网络历史

1.9 Test Networks and Hosts 22

测试用网络及主机

1.10 Unix Standards 25

Unix标准

1.11 64-Bit Architectures 28

64位体系结构

1.12 Summary 29

小结

Chapter 2 The Transport Layer: TOP,UDP, and SCTP 31

传输层:TCP、UDP和SCTP

2.1 Introduction 31

概述

2.2 The Big Picture 32

全景图

2.3 User Datagram Protocol (UDP) 34

用户数据报协议

2.4 Transmission Control Protocol (TCP) 35

传输控制协议

2.5 Stream Control Transmission Protocol(SCTP) 36

流控制传输协议

2.6 TCP Connection Establishment andTermination 37

TCP连接的建立和终止

2.7 TIME_WAIT State 43

TIME_WAIT状态

2.8 SCTP Association Establishment andTermination 44

SCTP关联的建立和终止

2.9 Port Numbers 50

端口号

2.10 TCP Port Numbers and ConcurrentServers 52

TCP端口号与并发服务器

2.11 Buffer Sizes and Limitations 55

缓冲区大小及限制

2.12 Standard Internet Services 61

标准因特网服务

2.13 Protocol Usage by Common InternetApplications 62

常见因特网应用所用的协议

2.14 Summary 63

小结

Part 2 Elementary Sockets 65

基本套接字

Chanter 3 Sockets Introduction 67

套接字简介

3.1 Introduction 67

概述

3.2 Socket Address Structures 67

套接字地址结构

3.3 Value-Result Arguments 74

值-结果参数

3.4 Byte Ordering Functions 77

字节排序函数

3.5 Byte Manipulation Functions 80

字节操纵函数

3.6 inet_aton, inet_addr, and inet_ntoa Functions 82

inet_aton、inet_addr和inet_ntoa函数

3.7 inet_pton and inet_ntop Functions 83

inet_pton和inet_ntop函数

3.8 sock_ntop and Related Functions 86

sock_ntop和相关函数

3.9 readn, writen, and readline Functions 88

readn、writen和readline函数

3.10 Summary 92

小结

Chapter 4 Elementary TCP Sockets 95

基本TCP套接字

4.1 Introduction 95

概述

4.2 socket Function 95

socket函数

4.3 connect Function 99

connect函数

4.4 bind Function 101

bind函数

4.5 listen Function 104

listen函数

4.6 accept Function 109

accept函数

4.7 fork and exec Functions 111

fork和exec函数

4.8 Concurrent Servers 114

并发服务器

4.9 close Function 117

close函数

4.10 getsockname and getpeernameFunctions 117

getsockname和getpeername函数

4.11 Summary 120

小结

Chapter 5 TCP Client/Server Example 121

TCP客户/服务器示例

5.1 Introduction 121

概述

5.2 TCP Echo Server: main Function 122

TCP回送服务器程序:main函数

5.3 TCP Echo Server: str_echo Function 123

TCP回送服务器程序:str_echo函数

5.4 TCP Echo Client: main Function 124

TCP回送客户程序:main函数

5.5 TCP Echo Client: str_cli Function 125

TCP回送客户程序:str_cli函数

5.6 Normal Startup 126

正常启动

5.7 Normal Termination 128

正常终止

5.8 POSIX Signal Handling 129

POSIX信号处理

5.9 Handling SIGCHLD Signals 132

处理SIGCHLD信号

5.10 wait and waitpid Functions 135

wait和waitpid函数

5.11 Connection Abort before acceptReturns 139

accept返回前连接异常中止

5.12 Termination of Server Process 141

服务器进程的终止

5.13 SIGPIPE Signal 142

SIGPIPE信号

5.14 Crashing of Server Host 144

服务器主机崩溃

5.15 Crashing and Rebooting of Server Host 144

服务器主机崩溃及重启

5.16 Shutdown of Server Host 145

服务器主机关机

5.17 Summary of TCP Example 146

TCP示例小结

5.18 Data Format 147

数据格式

5.19 Summary 151

小结

Chapter 6 I/O Multiplexing: The select and poll Functions 153

I/O多路复用:select和poll函数

6.1 Introduction 153

概述

6.2 I/O Models 154

I/O模型

6.3 select Function 160

select函数

6.4 str_cli Function (Revisited) 167

再访str_cli函数

6.5 Batch Input and Buffering 169

批量输入和缓冲

6.6 shutdown Function 172

shutdown函数

6.7 str_cli Function (Revisited Again) 173

三顾str_cli函数

6.8 TCP Echo Server (Revisited) 175

再访TCP回送服务器程序

6.9 pselect Function 181

pselect函数

6.10 poll Function 182

poll函数

6.11 TCP Echo Server (Revisited Again) 185

三顾TCP回送服务器程序

6.12 Summary 188

小结

Chapter 7 Socket Options 191

套接字选项

7.1 Introduction 191

概述

7.2 getsockopt and setsockopt Functions 192

getsockopt和setsockopt函数

7.3 Checking if an Option Is Supported and Obtaining the Default 194

检查选项是否被支持并获取默认值

7.4 Socket States 198

套接字状态

7.5 Generic Socket Options 198

通用套接字选项

7.6 IPv4 Socket Options 214

IPv4套接字选项

7.7 ICMPv6 Socket Option 216

ICMPv6套接字选项

7.8 IPv6 Socket Options 216

IPv6套接字选项

7.9 TCP Socket Options 219

TCP套接字选项

7.10 SCTP Socket Options 222

SCTP套接字选项

7.11 fcntl Function 233

fcntl函数

7.12 Summary 236

小结

Chapter 8 Elementary UDP Sockets 239

基本UDP套接字

8.1 Introduction 239

概述

8.2 recvfrom and sendto Functions 240

recvfrom和sendto函数

8.3 UDP Echo Server: main Function 241

UDP回送服务器程序:main函数

8.4 UDP Echo Server: dg_echo Function 242

UDP回送服务器程序:dg_echo函数

8.5 UDP Echo Client: main Function 244

UDP回送客户程序:main函数

8.6 UDP Echo Client: dg_cli Function 245

UDP回送客户程序:dg_cli函数

8.7 Lost Datagrams 245

数据报的丢失

8.8 Verifying Received Response 246

验证接收到的响应

8.9 Server Not Running 248

服务器程序未运行

8.10 Summary of UDP Example 250

UDP示例小结

8.11 connect Function with UDP 252

UDP的connect函数

8.12 dg_cli Function (Revisited) 256

再论dg_cli函数

8.13 Lack of Flow Control with UDP 257

UDP缺乏流量控制

8.14 Determining Outgoing Interface with UDP 261

UDP中的外出接口的确定

8.15 TCP and UDP Echo Server Using select 262

使用select函数的TCP和UDP回送服务器程序

8.16 Summary 264

小结

Chapter 9 Elementary SCTP Sockets 267

基本SCTP套接字

9.1 Introduction 267

概述

9.2 Interface Models 268

接口模型

9.3 sctp_bindx Function 272

sctp_bindx函数

9.4 sctp_connectx Function 274

sctp_connectx函数

9.5 sctp_getpaddrs Function 275

sctp_getpaddrs函数

9.6 sctp_freepaddrs Function 275

sctp_freepaddrs函数

9.7 sctp_getladdrs Function 275

sctp_getladdrs函数

9.8 sctp_freeladdrs Function 276

sctp_freeladdrs函数

9.9 sctp_sendmsg Function 276

sctp_sendmsg函数

9.10 sctp_recvmsg Function 277

sctp_recvmsg函数

9.11 sctp_opt_info Function 278

sctp_opt_info函数

9.12 sctp_peeloff Function 278

sctp_peeloff函数

9.13 shutdown Function 278

shutdown函数

9.14 Notifications 280

通知

9.15 Summary 286

小结

Chapter 10 SCTP Client/Server Example 287

SCTP客户/服务器示例

10.1 Introduction 287

概述

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

SCTP一到多式流分回送服务器程序:main函数

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

SCTP一到多式流分回送客户程序:main函数

10.4 SCTP Streaming Echo Client: str_cli Function 292

SCTP流分回送客户程序:str_cli函数

10.5 Exploring Head-of-Line Blocking 293

探究头端阻塞

10.6 Controlling the Number of Streams 299

控制流的数目

10.7 Controlling Termination 300

控制终止

10.8 Summary 301

小结

Chapter 11 Name and Address Conversions 303

名字与地址转换

11.1 Introduction 303

概述

11.2 Domain Name System (DNS) 303

域名系统

11.3 gethostbyname Function 307

gethostbyname函数

11.4 gethostbyaddr Function 310

gethostbyaddr函数

11.5 getservbyname and getservbyport Functions 311

getservbyname和getservbyport函数

11.6 getaddrinfo Function 315

getaddrinfo函数

11.7 gai_strerror Function 320

gai_strerror函数

11.8 freeaddrinfo Function 321

freeaddrinfo函数

11.9 getaddrinfo Function: IPv6 322

getaddrinfo函数:IPv6

11.10 getaddrinfo Function: Examples 324

getaddrinfo函数:示例

11.11 host_serv Function 325

host_serv函数

11.12 tcp_connect Function 326

tcp_connect函数

11.13 tcp_listen Function 330

tcp_listen函数

11.14 udp_client Function 334

udp_client函数

11.15 udp_connect Function 337

udp_connect函数

11.16 udp_server Function 338

udp_server函数

11.17 getnameinfo Function 340

getnameinfo函数

11.18 Re-entrant Functions 341

可重入函数

11.19 gethostbyname_r and gethostbyaddr_r Functions 344

gethostbyname_r和gethostbyaddr_r函数

11.20 Obsolete IPv6 Address Lookup Functions 346

废弃的IPv6地址解析函数

11.21 Other Networking Information 348

其他联网信息

11.22 Summary 349

小结

Part 3 Advanced Sockets 351

高级套接字

Chapter 12 IPv4 and IPv6 Interoperability 353

IPv4与IPv6的互操作性

12.1 Introduction 353

概述

12.2 IPv4 Client, IPv6 Server 354

IPv4客户与IPv6服务器

12.3 IPv6 Client, IPv4 Server 357

IPv6客户与IPv4服务器

12.4 IPv6 Address-Testing Macros 360

IPv6地址测试宏

12.5 Source Code Portability 361

源代码可移植性

12.6 Summary 362

小结

Chapter 13 Daemon Processes and the inetd Superserver 363

守护进程和inetd超级服务器程序

13.1 Introduction 363

概述

13.2 syslogd Daemon 364

syslogd守护进程

13.3 syslog Function 365

syslog函数

13.4 daemon_init Function 367

daemon_init函数

13.5 inetd Daemon 371

inetd守护进程

13.6 daemon_inetd Function 377

daemon_inetd函数

13.7 Summary 379

小结

Chapter 14 Advanced I/O Functions 381

高级I/O函数

14.1 Introduction 381

概述

14.2 Socket Timeouts 381

套接字超时

14.3 recv and send Functions 387

recv和send函数

14.4 readv and writev Functions 389

readv和writev函数

14.5 recvmsg and sendmsg Functions 390

recvmsg和sendmsg函数

14.6 Ancillary Data 395

辅助数据

14.7 How Much Data Is Queued? 398

排队的数据量

14.8 Sockets and Standard I/O 399

套接字和标准I/O

14.9 Advanced Polling 402

高级轮询技术

14.10 Summary 408

小结

Chapter 15 Unix Domain Protocols 411

Unix域协议

15.1 Introduction 411

概述

15.2 Unix Domain Socket Address Structure 412

Unix域套接字地址结构

15.3 socketpair Function 414

socketpair函数

15.4 Socket Functions 415

套接字函数

15.5 Unix Domain Stream Client/Server 416

Unix域流客户/服务器

15.6 Unix Domain Datagram Client/Server 418

Unix域数据报客户/服务器

15.7 Passing Descriptors 420

描述符传递

15.8 Receiving Sender Credentials 429

接收发送者的凭证

15.9 Summary 432

小结

Chapter 16 Nonblocking I/O 435

非阻塞I/O

16.1 Introduction 435

概述

16.2 Nonblocking Reads and Writes: str_cli Function (Revisited) 437

非阻塞读和写:再论str_cli函数

16.3 Nonblocking connect 448

非阻塞connect

16.4 Nonblocking connect: Daytime Client 449

非阻塞connect:时间获取客户程序

16.5 Nonblocking connect: Web Client 452

非阻塞connect:Web客户程序

16.6 Nonblocking accept 461

非阻塞accept

16.7 Summary 463

小结

Chapter 17 ioctl Operations 465

ioctl操作

17.1 Introduction 465

概述

17.2 ioctl Function 466

ioctl函数

17.3 Socket Operations 466

套接字操作

17.4 File Operations 468

文件操作

17.5 Interface Configuration 468

接口配置

17.6 get_ifi_info Function 469

get_ifi_info函数

17.7 Interface Operations 480

接口操作

17.8 ARP Cache Operations 481

ARP高速缓存操作

17.9 Routing Table Operations 483

路由表操作

17.10 Summary 484

小结

Chapter 18 Routing Sockets 485

路由套接字

18.1 Introduction 485

概述

18.2 Datalink Socket Address Structure 486

数据链路套接字地址结构

18.3 Reading and Writing 487

读和写

18.4 sysctl Operations 495

sysctl操作

18.5 get_ifi_info Function (Revisited) 500

get_ifi_info函数

18.6 Interface Name and Index Functions 504

接口名字和索引函数

18.7 Summary 508

小结

Chapter 19 Key Management Sockets 511

密钥管理套接字

19.1 Introduction 511

概述

19.2 Reading and Writing 512

读和写

19.3 Dumping the Security Association Database (SADB) 514

安全关联数据库的转储

19.4 Creating a Static Security Association (SA) 517

创建静态安全关联

19.5 Dynamically Maintaining SAs 524

动态维护安全关联

19.6 Summary 528

小结

Chapter 20 Broadcasting 529

广播

20.1 Introduction 529

概述

20.2 Broadcast Addresses 531

广播地址

20.3 Unicast versus Broadcast 532

单播和广播的比较

20.4 dg_cli Function Using Broadcasting 535

使用广播的dg_cli函数

20.5 Race Conditions 538

竞争状态

20.6 Summary 547

小结

Chapter 21 Multicasting 549

多播

21.1 Introduction 549

概述

21.2 Multicast Addresses 549

多播地址

21.3 Multicasting versus Broadcasting on a LAN 553

局域网上多播和广播的比较

21.4 Multicasting on a WAN 556

广域网上的多播

21.5 Source-Specific Multicast 558

源特定多播

21.6 Multicast Socket Options 559

多播套接字选项

21.7 mcast_join and Related Functions 565

mcast_join和相关函数

21.8 dg_cli Function Using Multicasting 570

使用多播的dg_cli函数

21.9 Receiving IP Multicast Infrastructure Session Announcements 571

接收IP多播基础设施会话声明

21.10 Sending and Receiving 575

发送和接收

21.11 Simple Network Time Protocol (SNTP) 579

简单网络时间协议

21.12 Summary 584

小结

Chapter 22 Advanced UDP Sockets 587

高级UDP套接字

22.1 Introduction 587

概述

22.2 Receiving Flags, Destination IP Address, and Interface Index 588

接收标志、目的IP地址和接口索引

22.3 Datagram Truncation 594

数据报截断

22.4 When to Use UDP Instead of TCP 594

何时用UDP代替TCP

22.5 Adding Reliability to a UDP Application 597

给UDP应用增加可靠性

22.6 Binding Interface Addresses 608

绑定接口地址

22.7 Concurrent UDP Servers 612

并发UDP服务器

22.8 IPv6 Packet Information 615

IPv6分组信息

22.9 IPv6 Path MTU Control 618

IPv6路径MTU控制

22.10 Summary 620

小结

Chapter 23 Advanced SCTP Sockets 621

高级SCTP套接字

23.1 Introduction 621

概述

23.2 An Autoclosing One-to-Many-Style Server 621

自动关闭的一到多式服务器程序

23.3 Partial Delivery 622

部分递送

23.4 Notifications 625

通知

23.5 Unordered Data 629

无序的数据

23.6 Binding a Subset of Addresses 630

绑定地址子集

23.7 Determining Peer and Local Address Information 631

确定对端和本端地址信息

23.8 Finding an Association ID Given an IP Address 635

给定IP地址找出关联ID

23.9 Heartbeating and Address Failure 636

心搏和地址不可达

23.10 Peeling Off an Association 637

关联剥离

23.11 Controlling Timing 639

定时控制

23.12 When to Use SCTP Instead of TCP 641

何时用SCTP代替TCP

23.13 Summary 643

小结

Chapter 24 Out-of-Band Data 645

带外数据

24.1 Introduction 645

概述

24.2 TCP Out-of-Band Data 645

TCP带外数据

24.3 sockatmark Function 654

sockatmark函数

24.4 TCP Out-of-Band Data Recap 661

TCP带外数据小结

24.5 Summary 662

小结

Chapter 25 Signal-Driven I/O 663

信号驱动I/O

25.1 Introduction 663

概述

25.2 Signal-Driven I/O for Sockets 664

套接字的信号驱动I/O

25.3 UDP Echo Server Using SIGIO 666

使用SIGIO的UDP回送服务器程序

25.4 Summary 672

小结

Chapter 26 Threads 675

线程

26.1 Introduction 675

概述

26.2 Basic Thread Functions: Creation and Termination 676

基本线程函数:创建和终止

26.3 str_cli Function Using Threads 679

使用线程的str_cli函数

26.4 TCP Echo Server Using Threads 681

使用线程的TCP回送服务器程序

26.5 Thread-Specific Data 686

线程特定数据

26.6 Web Client and Simultaneous Connections (Continued) 694

Web客户与同时连接(续)

26.7 Mutexes: Mutual Exclusion 697

互斥锁

26.8 Condition Variables 701

条件变量

26.9 Web Client and Simultaneous Connections (Continued) 705

Web客户与同时连接(续)

26.10 Summary 707

小结

Chapter 27 IP Options 709

IP选项

27.1 Introduction 709

概述

27.2 IPv4 Options 709

IPv4选项

27.3 IPv4 Source Route Options 711

IP源路径选项

27.4 IPv6 Extension Headers 719

IPv6扩展首部

27.5 IPv6 Hop-by-Hop Options and Destination Options 719

IPv6步跳选项和目的选项

27.6 IPv6 Routing Header 725

IPv6路由首部

27.7 IPv6 Sticky Options 731

IPv6粘附选项

27.8 Historical IPv6 Advanced API 732

历史性IPv6高级API

27.9 Summary 733

小结

Chapter 28 Raw Sockets 735

原始套接字

28.1 Introduction 735

概述

28.2 Raw Socket Creation 736

原始套接字创建

28.3 Raw Socket Output 737

原始套接字输出

28.4 Raw Socket Input 739

原始套接字输入

28.5 ping Program 741

ping程序

28.6 traceroute Program 755

traceroute程序

28.7 An ICMP Message Daemon 769

一个ICMP消息守护进程

28.8 Summary 786

小结

Chapter 29 Datalink Access 787

数据链路访问

29.1 Introduction 787

概述

29.2 BSD Packet Filter (BPF) 788

BSD分组过滤器

29.3 Datalink Provider Interface (DLPI) 790

数据链路提供者接口

29.4 Linux: SOCK_PACKET and PF_PACKET 791

Linux:SOCK_PACKET和PF_PACKET

29.5 libpcap: Packet Capture Library 792

libpcap:分组捕获函数库

29.6 libnet: Packet Creation and Injection Library 793

libnet:分组构造与注入函数库

29.7 Examining the UDP Checksum Field 793

检查UDP的校验和字段

29.8 Summary 815

小结

Chapter 30 Client/Server Design Alternatives 817

多种客户/服务器设计方式

30.1 Introduction 817

概述

30.2 TCP Client Alternatives 819

各种TCP客户程序设计方式

30.3 TCP Test Client 820

TCP测试用客户程序

30.4 TCP Iterative Server 821

TCP迭代服务器程序

30.5 TCP Concurrent Server, One Child per Client 822

TCP并发服务器程序,每个客户一个子进程

30.6 TCP Preforked Server, No Locking Around accept 826

TCP预先派生子进程服务器程序,accept无上锁保护

30.7 TCP Preforked Server, File Locking Around accept 832

TCP预先派生子进程服务器程序,accept使用文件上锁保护

30.8 TCP Preforked Server, Thread Locking Around accept 835

TCP预先派生子进程服务器程序,accept使用线程上锁保护

30.9 TCP Preforked Server, Descriptor Passing 836

TCP预先派生子进程服务器程序,传递描述符

30.10 TCP Concurrent Server, One Thread per Client 842

TCP并发服务器程序,每个客户一个线程

30.11 TCP Prethreaded Server, per-Thread accept 844

TCP预先创建线程服务器程序,每个线程各自accept

30.12 TCP Prethreaded Server, Main Thread accept 846

TCP预先创建线程服务器程序,主线程统一accept

30.13 Summary 849

小结

Chapter 31 STREAMS 851

31.1 Introduction 851

概述

31.2 Overview 851

概貌

31.3 getmsg and putmsg Functions 856

getmsg和putmsg函数

31.4 getpmsg and putpmsg Functions 857

getpmsg和putpmsg函数

31.5 ioctl Function 857

ioctl函数

31.6 Transport Provider Interface (TPI) 858

传输提供者接口

31.7 Summary 868

小结

Appendix A IPv4, IPv6, ICMPv4, and ICMPv6 869

IPv4、IPv6、ICMPv4和ICMPv6

A.1 Introduction 869

概述

A.2 IPv4 Header 869

IPv4首部

A.3 IPv6 Header 871

IPv6首部

A.4 IPv4 Addresses 874

IPv4地址

A.5 IPv6 Addresses 877

IPv6地址

A.6 Internet Control Message Protocols (ICMPv4 and ICMPv6) 882

因特网控制消息协议(ICMPv4和ICMPv6)

Appendix B Virtual Networks 885

虚拟网络

B.1 Introduction 885

概述

B.2 The MBone 885

B.3 The 6bone 887

B.4 IPv6 Transition: 6to4 889

IPv6过渡:6to4

Appendix C Debugging Techniques 891

调试技术

C.1 System Call Tracing 891

系统调用跟踪

C.2 Standard Internet Services 893

标准因特网服务

C.3 sock Program 893

sock程序

C.4 Small Test Programs 896

小测试程序

C.5 tcpdump Program 896

tcpdump程序

C.6 netstat Program 896

netstat程序

C.7 lsof Program 897

lsof程序

Appendix D Miscellaneous Source Code 899

其他源代码

D.1 unp.h Header 899

unp.h头文件

D.2 config.h Header 904

config.h头文件

D.3 Standard Error Functions 910

标准错误处理函数

Appendix E Solutions to Selected Exercises 913

精选习题答案

Bibliography 947

参考文献

Index 955

索引

……[看更多目录]

序言本书的第1版本于1990年问世,并迅速成为程序员学习网络编程的权威参考书。时至今日,计算机网络技术已发生了翻天覆地的变化。只要看看第1版给出的用于征集反馈意见的地址(“uunet!hsi!netbook”)就一目了然了。(有多少读者能看出这是20世纪80年代很流行的UUCP拨号网络的地址?)

现在UUCP网络已经很罕见了,而无线网络等新技术则变得无处不在!在这种背景下,新的网络协议和编程范型业已开发出来,但程序员却苦于找不到一本好的参考书来学习这些复杂的新技术。

这本书填补了这一空白。拥有本书旧版的读者一定想要一个新的版本来学习新的编程方法,了解IPv6等下一代协议方面的新内容。所有人都非常期待本书,因为它完美地结合了实践经验、历史视角以及在本领域浸淫多年才能获得的透彻理解。

阅读本书是一种享受,我收获颇丰。相信大家定会有同感。

文摘插图:

UNIX网络编程 卷1:套接字联网API(英文版 第3版)(图灵原版计算机科学系列)(UNIX Network Programming Volume1:The Sockets Networking API,Third Edition)

1.1 Introduction 概述

When writing programs that communicate across a computer network, one must first invent a protocol, an agreement on how those programs will communicate. Before delv- ing into the design details of a protocol, high-level decisions must be made about which program is expected to initiate communication and when responses are expected. F

r example, a Web server is typically thought of as a long-running program (or daemon) that sends network messages only in response to requests coming in from the network. The other side of the protocol is a Web client, such as a browser, which always initiates communication with the server. This organization into client and server is used by most network-aware applications. Deciding that the client always initiates requests tends to simplify the protocol as well as the programs themselves. Of course, some of the more complex network applications also require asynchronous callback communication, where the server initiates a message to the client. But it is far more common for applications to stick to the basic client/server model shown in Figure 1.1.

Clients normally communicate with one server at a time, although using a Web browser as an example, we might communicate with many different Web servers over, say, a 10-minute time period. But from the server's perspective, at any given point in time, it is not unusual for a server to be communicating with multiple clients. We show this in Figure 1.2. Later in this text, we will cover several different ways for a server to handle multiple clients at the same time.

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
>>返回首页<<
推荐阅读
 
 
频道精选
 
更多商品
华硕(ASUS) K40E43IN-SL 14.1英寸笔记本电脑(T4300 1G 320G DVD刻录 512M独显 无线 摄像头)(送华硕原装笔记本包及鼠标)
写给管理者的项目管理书:建立高效的企业级项目管理体系
ASP.NET全能速查宝典
UNIX网络编程 卷2:进程间通信(英文版·第2版)(图灵原版计算机科学系列)(UNIX Network Programming Volume2:Interprocess Communications,Second Edition)
Photoshop CS4中文版完全剖析(附光盘1张)
美工神话:Dreamweaver+Photoshop+Flash网页设计与美化(附光盘1张)
Visual Basic全能速查宝典
Java全能速查宝典(程序员的掌中宝)
创胜智能开关家庭套装(CS-8602A/CS80-6)(遥控开关)
美的加湿器S35U-Q1小绵羊(经典绵羊造型,人见人爱,花见花开)
 
静静地坐在废墟上,四周的荒凉一望无际,忽然觉得,凄凉也很美
© 2005- 王朝网络 版权所有