网站首页  软件下载  游戏下载  翻译软件  电子书下载  电影下载  电视剧下载  教程攻略

请输入您要查询的图书:

 

书名 IPv6详解(卷1核心协议实现英文版)/图灵原版计算机科学系列
分类
作者 (美)李清//(日)神明达哉//(日)岛庆一
出版社 人民邮电出版社
下载
简介
编辑推荐

本书全面讲解IPv6及相关协议实现的事实标准KAME,揭示了KAME IPv6协议栈的所有细节,对每行代码到底做了什么以及为什么要这样设计都进行了解释。全书共分7章,分别介绍IPv6地址结构、IPv6、ICMPv6、邻居发现和无状态地址自动配置、传输层协议及套接字API扩展。每章都包含两个主要部分:第一部分提供了作为RFC发布的主要协议规范的摘要,定义各种协议分组,解释每个分组中每个字段的含义和目的;第二部分则描述实现这些RFC的KAME的数据结构及功能。书的最后还提供了一些例子,说明如何编写既可以在IPv4网络上运行、又可以在IPv6网络上运行的可移植应用程序。

本书是IPv6的权威参考书,适合网络设计和开发人员阅读。此外,本书还适合作为高校相关专业网络课程的教学参考书。

目录

1 Introduction 1

1.1 Introduction 1

1.2 A Brief History of IPv6 and KAME 1

1.2.1 Commercial Success of KAME 6

1.3 Overview of the KAME Distribution 6

1.3.1 Source Tree Structure 7

1.3.2 Build Procedure 7

1.4 Overview of BSD Network Implementation 11

1.5 Source Code Narrations 14

1.5.1 Typographical Conventions 14

1.5.2 Sample Source Code Description 15

1.5.3 Preprocessor Variables 16

1.5.4 Networking Device and Architecture Assumptions 17

1.6 Mbufs and IPv6 17

1.6.1 Common Mbuf Manipulation Macros and Functions 20

1.6.2 Mbuf Tagging 20

1.6.3 Mbuf Requirement for IPv6 24

1.6.4 Diagnosing Mbuf Chain 26

2 IPv6 Addressing Architecture 29

2.1 Introduction 29

2.2 IPv6 Addresses 30

2.3 Textual Representation of IPv6 Addresses 31

2.4 Address Scopes 33

2.4.1 Scope Zones 34

2.4.2 Zone Indices 36

2.4.3 Textual Representation of Scoped Addresses 38

2.4.4 Deprecation of Unicast Site-local Addresses 39

2.5 IPv6 Address Format 40

2.5.1 Interface Identifier Generation 42

2.5.2 Notes about Address Format 43

2.5.3 Multicast Address Format 44

2.6 Node Address Requirements 46

2.7 IPv6 Address Space Management 47

2.8 Code Introduction 47

2.8.1 IPv6 Address Structures—in6_addr{} and sockaddr_in6{} 48

2.8.2 Macros and Variables 49

2.9 Handling Scope Zones 51

2.9.1 Initialization of Scope Zones 52

2.9.2 Scope Zone IDs 53

2.9.3 Zone IDs in Address Structures 54

2.9.4 Scope-Related Utility Functions 57

2.10 Interface Address Structures 64

2.10.1 ifaddr{} and in6_ifaddr{} Structures 64

2.10.2 in6_ifreq{} and in6_aliasreq{} Structures 67

2.10.3 Multicast Address Structures 68

2.11 IPv6 Prefix Structure 70

2.12 Overview of Address Manipulation Routines 73

2.13 Interface Initialization for IPv6 76

2.13.1 in6_if_up() Function 76

2.13.2 in6_ifattach() Function 78

2.13.3 in6_ifattach_loopback() Function 81

2.13.4 in6_ifattach_linklocal() Function 82

2.13.5 get_ifid() Function 87

2.13.6 get_hw_ifid() Function 89

2.13.7 get_rand_ifid() Function 93

2.13.8 in6if_do_dad() Function 94

2.14 IPv6 Interface Address Configuration 95

2.14.1 in6_control() Function 95

2.14.2 in6_update_ifa() Function 101

2.14.3 in6_joingroup() and in6_leavegroup() Functions 115

2.14.4 in6_addmulti() and in6_delmulti() Functions 116

2.14.5 in6_ifinit() Function 118

2.14.6 in6_ifaddloop() and in6_ifloop_request() Functions 120

2.15 Deleting an IPv6 Address 122

2.15.1 in6_purgeaddr() Function 123

2.15.2 in6_ifremloop() Function 124

2.15.3 in6_unlink_ifa() Function 125

2.16 Operation with Address Configuration Utility 127

3 Internet Protocol version 6 131

3.1 Introduction 131

3.2 IPv6 Header Format 132

3.2.1 Comparison to the IPv4 Header 133

3.3 IPv6 Extension Headers 134

3.3.1 Order of Extension Headers 135

3.3.2 Hop-by-Hop Options Header 136

3.3.3 Destination Options Header 137

3.3.4 Routing Header 137

3.3.5 Fragment Header 140

3.3.6 IPv6 Options 142

3.4 Source Address Selection 144

3.4.1 Default Address Selection 144

3.4.2 Source Address Selection 146

3.4.3 Destination Address Selection 148

3.5 Code Introduction 149

3.5.1 Statistics 151

3.5.2 Header Structures 151

3.5.3 ip6protosw{} Structure 157

3.6 IPv6 Packet Address Information in Mbuf 160

3.6.1 ip6_setdstifaddr() Function 162

3.6.2 ip6_getdstifaddr() Function 162

3.6.3 ip6_setpktaddrs() Function 163

3.6.4 ip6_getpktaddrs() Function 164

3.7 Input Processing: ip6_input() Function 164

3.8 Processing Hop-by-Hop Options Header: ip6_hopopts_input() Function 179

3.8.1 Processing Each Option: ip6_process_hopopts() Function 180

3.8.2 Processing Unknown Option: ip6_unknown_opt() Function 184

3.9 Processing Destination Options Header: dest6_input() Function 185

3.10 Reassembling Fragmented Packets 187

3.10.1 Structures for Packet Reassembly 187

3.10.2 frag6_input() Function 190

3.11 Processing Routing Header: route6_input() Function 204

3.12 Forwarding: ip6_forward() Function 209

3.13 Output Processing 219

3.13.1 Source Address Selection—in6_selectsrc() Function 219

3.13.2 Route Selection: ip6_selectroute() Function 234

3.13.3 ip6_output() Function 242

3.13.4 Make Extension Headers: ip6_copyexthdr() Function 276

3.13.5 Split Headers: ip6_splithdr() Function 277

3.13.6 Insert Jumbo Payload Option: ip6_insert_jumboopt() Function 278

3.13.7 Fragmentation: ip6_insertfraghdr() Function 281

3.13.8 Path MTU Determination: ip6_getpmtu() Function 282

3.13.9 Multicast Loopback: ip6_mloopback() Function 285

4 Internet Control Message Protocol for IPv6 287

4.1 Introduction 287

4.2 ICMPv6 Message 288

4.2.1 Destination Unreachable Message 289

4.2.2 Packet Too Big Message 291

4.2.3 Time Exceeded Message 292

4.2.4 Parameter Problem Message 293

4.2.5 Echo Request Message 294

4.2.6 Echo Reply Message 294

4.2.7 ICMPv6 Message Processing Rules 295

4.3 Path MTU Discovery Mechanism 296

4.4 Node Information Query 297

4.4.1 Node Information Message Format 299

4.4.2 NOOP Query 301

4.4.3 Supported Qtypes Query 301

4.4.4 Node Name Query 301

4.4.5 Node Addresses Query 303

4.4.6 IPv4 Addresses Query 304

4.5 Code Introduction 304

4.5.1 Statistics 304

4.5.2 ICMPv6 Header 308

4.6 ICMPv6 Input Processing 308

4.6.1 icmp6_input() Function 310

4.6.2 Notifying Errors: icmp6_notify_error() Function 320

4.7 Path MTU Discovery Implementation 329

4.7.1 icmp6_mtudisc_update() Function 329

4.8 ICMPv6 Output Processing 332

4.8.1 Sending Error: icmp6_error() Function 333

4.8.2 Error Rate Limitation: icmp6_ratelimit() Function 341

4.8.3 icmp6_reflect() Function 342

4.9 Node Information Query Implementation 348

4.9.1 Types and Variables 348

4.9.2 ping6 Command: Send Queries 350

4.9.3 ping6 Command: Receive Replies 355

4.9.4 ping6 Command: Print Supported Qtypes 362

4.9.5 ping6 Command: Print Node Addresses 365

4.9.6 Query Processing: ni6_input() Function 367

4.9.7 Node Name Manipulation 376

4.9.8 Create Node Addresses Reply: ni6_store_addrs() Function 383

4.10 Node Information Operation 387

5 Neighbor Discovery and Stateless Address Autoconfiguration 389

5.1 Introduction 389

5.2 Neighbor Discovery Protocol Overview 390

5.3 Stateless Address Autoconfiguration Overview 391

5.4 ND Protocol Messages 392

5.5 Example Exchanges of ND Protocol Messages 393

5.6 ND Protocol Packet Types and Formats 395

5.6.1 Router Solicitation Message 396

5.6.2 Router Advertisement Message 397

5.6.3 Neighbor Solicitation Message 401

5.6.4 Neighbor Advertisement Message 402

5.6.5 Redirect Message 403

5.7 Neighbor Discovery Option Types and Formats 405

5.7.1 Link-Layer Address Options 405

5.7.2 Prefix Information Option 406

5.7.3 Redirected Header Option 407

5.7.4 MTU Option 407

5.7.5 Route Information Option 408

5.8 Next-Hop Determination and Address Resolution 410

5.9 Neighbor Unreachability Detection Algorithm 411

5.10 Stateless Address Autoconfiguration 412

5.10.1 Address Formation and Address States 413

5.10.2 Duplicate Address Detection Algorithm 415

5.10.3 Processing Router Advertisement 416

5.10.4 Privacy Extensions 417

5.11 Router Specific Operation 419

5.11.1 Sending Unsolicited Router Advertisements 422

5.11.2 Processing Router Solicitations 422

5.11.3 Processing Router Advertisements 423

5.12 Host Specific Operation 423

5.12.1 Sending Router Solicitations 423

5.12.2 Processing Router Advertisements 425

5.12.3 Default Router Selection 426

5.13 Code Introduction 426

5.13.1 ND Message Definitions 427

5.13.2 Neighbor Cache—llinfo_nd6{} Structure 429

5.13.3 Operational Variables—nd_ifinfo{} Structure 432

5.13.4 Default Router—nd_defrouter{} Structure 433

5.13.5 Prefix—nd_prefix{} Structure 434

5.13.6 Prefix Control—nd_prefixctl{} Structure 436

5.13.7 ND Message Options—nd_opts{} Structure 436

5.13.8 DAD Queue Entry—dadq{} Structure 437

5.13.9 IPv6 Address—in6_ifaddr{} Structure 438

5.13.10 Destination Cache 438

5.13.11 Operation Constants 438

5.14 Initialization Functions 439

5.14.1 nd6_init() Function 439

5.14.2 nd6_ifattach() Function 440

5.15 Neighbor Cache Management Functions 441

5.15.1 nd6_rtrequest() Function 441

5.15.2 nd6_cache_lladdr() Function 452

5.15.3 nd6_lookup() Function 463

5.15.4 nd6_free() Function 467

5.15.5 nd6_timer() Function 470

5.16 ND Protocol Messages Processing Functions 478

5.16.1 nd6_ns_output() Function 478

5.16.2 nd6_ns_input() Function 484

5.16.3 nd6_na_input() Function 493

5.16.4 nd6_na_output() Function 504

5.16.5 nd6_rs_input() Function 510

5.16.6 nd6_ra_input() Function 513

5.16.7 icmp6_redirect_input() Function 521

5.16.8 icmp6_redirect_output() Function 528

5.17 ND Protocol Message Options Processing Functions 536

5.17.1 nd6_option_init() Function 536

5.17.2 nd6_option() Function 536

5.17.3 nd6_options() Function 538

5.18 Default Router Management Functions 540

5.18.1 defrouter_addreq() Function 540

5.18.2 defrouter_delreq() Function 541

5.18.3 defrouter_addifreq() Function 542

5.18.4 defrouter_delifreq() Function 544

5.18.5 defrouter_lookup() Function 545

5.18.6 defrouter_select() Function 546

5.18.7 defrtrlist_del() Function 550

5.18.8 defrtrlist_update() Function 553

5.19 Prefix Management Functions 555

5.19.1 nd6_prelist_add() Function 555

5.19.2 prelist_remove() Function 557

5.19.3 prelist_update() Function 558

5.19.4 find_pfxlist_reachable_router() Function 568

5.19.5 Prefix and Address State about On-link Condition 568

5.19.6 pfxlist_onlink_check() Function 571

5.19.7 nd6_prefix_onlink() Function 575

5.19.8 nd6_prefix_offlink() Function 578

5.20 Stateless Address Autoconfiguration Functions 580

5.20.1 in6_ifadd() Function 580

5.20.2 in6_tmpifadd() Function 584

5.20.3 regen_tmpaddr() Function 588

5.21 Duplicate Address Detection Functions 590

5.21.1 nd6_dad_find() Function 590

5.21.2 nd6_dad_starttimer() Function 590

5.21.3 nd6_dad_stoptimer() Function 590

5.21.4 nd6_dad_start() Function 591

5.21.5 nd6_dad_stop() Function 594

5.21.6 nd6_dad_timer() Function 594

5.21.7 nd6_dad_duplicated() Function 598

5.21.8 nd6_dad_ns_output() Function 599

5.21.9 nd6_dad_ns_input() Function 600

5.21.10 nd6_dad_na_input() Function 601

5.22 Miscellaneous Functions 602

5.22.1 nd6_is_addr_neighbor() Function 602

5.22.2 nd6_output() Function 604

5.22.3 rt6_flush() Function 611

5.22.4 nd6_rtmsg() Function 612

6 Transport Layer Implications 615

6.1 Introduction 615

6.2 TCP and UDP over IPv6 616

6.3 Pseudo Header for IPv6 616

6.4 Checksum Difference between IPv4 and IPv6 617

6.5 IPv4-mapped IPv6 Address Usage 618

6.6 Code Introduction 618

6.6.1 Protocol Control Blocks for IPv6 618

6.7 General Operations on PCBs and Sockets 627

6.7.1 IPv6 PCB Allocation—in_pcballoc() Function 627

6.7.2 Bind Local Address—in6_pcbbind() Function 630

6.7.3 Fix Remote Address—in6_pcbconnect() Function 639

6.7.4 Function in6_pcbladdr() 642

6.7.5 Search for a PCB Entry—in6_pcblookup_local() Function 644

6.7.6 Search for IPv4-mapped PCB—in_pcblookup_local() Function 647

6.7.7 Search for a PCB Entry—in6_pcblookup_hash() Function 650

6.7.8 Search for IPv4-mapped PCB—in_pcblookup_hash() Function 651

6.7.9 Detach an IPv6 PCB—in6_pcbdetach() Function 653

6.7.10 Control Message Signaling—in6_pcbnotify() Function 655

6.7.11 Flush PCB Cached Route—in6_rtchange() Function 659

6.7.12 Retrieve Peer Address—in6_setpeeraddr() Function 660

6.7.13 Retrieve Local Address—in6_setsockaddr() Function 662

6.8 TCP-over-IPv6 663

6.8.1 TCP-over-IPv6 Instance of ip6protosw{} 663

6.8.2 TCP Output 663

6.8.3 Initializing Headers—tcp_fillheaders() Function 669

6.8.4 TCP Input—tcp6_input() and tcp_input() Functions 670

6.8.5 TCP Control Input—tcp6_ctlinput() Function 675

6.8.6 TCP User Requests 678

6.9 UDP-over-IPv6 685

6.9.1 UDP-over-IPv6 Instance of ip6protosw{} 685

6.9.2 UDP Output—udp6_output() Function 685

6.9.3 UDP Input—udp6_input() Function 692

6.9.4 UDP Control Input—udp6_ctlinput() Function 699

6.9.5 UDP User Requests Handling 702

6.10 Raw IPv6 709

6.10.1 Raw IPv6 Statistics 709

6.10.2 Raw IPv6 Output—rip6_output() Function 710

6.10.3 Raw IPv6 Input—rip6_input() Function 715

6.10.4 ICMPv6 Input—icmp6_rip6_input() Function 719

6.10.5 Raw IPv6 Control Input—rip6_ctlinput() Function 724

6.10.6 Raw IPv6 Control Output—rip6_ctloutput() Function 725

6.10.7 Raw IPv6 User Requests Handling 730

6.11 Summary of Operation with IPv4-mapped IPv6 Addresses 738

6.12 Viewing IPv6 Connections with netstat 743

6.13 Configuring IPv4-mapped IPv6 Address Support 745

7 Socket API Extensions 747

7.1 Introduction 747

7.2 The Basic Socket API—[RFC3493] 748

7.2.1 Basic Definitions 748

7.2.2 Interface Identification 749

7.2.3 IPv4 Communication over AF_INET6 Socket 750

7.2.4 Address and Name Conversion Functions 752

7.2.5 Basic Socket Options 760

7.3 The Advanced Socket API—[RFC3542] 764

7.3.1 Advanced Definitions 764

7.3.2 IPv6 Raw Sockets 766

7.3.3 Introduction to Ancillary Data 768

7.3.4 IPv6 Packet Information 770

7.3.5 Manipulation of IPv6 Extension Headers 773

7.3.6 Path MTU APIs 778

7.3.7 Socket Extensions for the “r” Commands 778

7.3.8 Summary Tables of Socket Options 780

7.4 Kernel Implementation of IPv6 Socket APIs 783

7.4.1 Code Introduction 783

7.4.2 ip6_pktopts{} Structure 786

7.4.3 IPv6 Socket Option Processing—ip6_ctloutput() Function 790

7.4.4 Getting Socket Options—ip6_getpcbopt() Function 805

7.4.5 Setting Socket Options and Ancillary Data 807

7.4.6 Cleaning Up—ip6_freepcbopts() Function 823

7.4.7 IPv6 Multicast Socket Options 824

7.4.8 IPv6 Raw Socket Options—ip6_raw_ctloutput() Function 835

7.4.9 ICMPv6 Socket Options—icmp6_ctloutput() Function 838

7.4.10 Delivering Incoming Information—ip6_savecontrol() Function 840

7.5 Socket Options and Ancillary Data Examples 848

7.5.1 Example of the Send Path 848

7.5.2 Example of the Receive Path 850

7.6 Implementation of Library Functions—libinet6 853

7.6.1 inet_pton() and inet_pton6() Functions 853

7.6.2 inet_ntop() and inet_ntop6() Functions 859

7.6.3 getaddrinfo() Function 863

7.6.4 Address Ordering Examples 888

7.6.5 freeaddrinfo() Function 895

7.6.6 gai_strerror() Function 897

7.6.7 getnameinfo() Function 898

7.6.8 Other Library Functions 906

References 909

Index 915

About the Authors 938

随便看

 

霍普软件下载网电子书栏目提供海量电子书在线免费阅读及下载。

 

Copyright © 2002-2024 101bt.net All Rights Reserved
更新时间:2025/3/1 12:31:10