Contents
Preface
About This Book
Write Portable Application Programs
Be Security Conscious When Writing Programs
Terminology and Portability
Introduction
I.I
1.2
1.3
1.4
A History of IPv6 and Its Key Features
Transition from IPv4-Only Internet to IPv4/v6 Dual Stack Internet
UNIX Socket Programming
IPv6 Architecture from a Programmer's Point of View
IPv6 Socket Programming
2. I AF_INET6: The Address Family for IPv6
2.2 Why Programs Need to Be Address-Family Independent?
2.3 Guidelines to Address-Family Independent Socket Programming
Porting Applications to Support IPv6
3.1
3.2
3.3
3.4
Making Existing Applications IPv6 Ready
Finding Where to Rewrite, Reorganizing Code
Rewriting Client Applications
Rewriting Server Applications
vii
ix
ix
ix
×
I
I
4
6
10
13
13
14
17
27
27
27
29
31
vi Contents
4
A
B
C
D
E
F
G
H
I
J
Tips in IPv6 Programming
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
Parsing a IPv6 Address out of String
Issues with ":" As a Separator
Issues with an IPv4 Mapped Address
bind(2) Ordering and Conflicts
How IPv4 Traffic Gets Routed to Sockets
Portability across Systems
RFCs 2292/3542, Advanced API
Platform Support Status
A Practical Example
5. I Server Program Example--popa3d
5.2 Further Extensions
5.3 Client Program Example--nail
Coming updates to IPv6 APIs
RFC2553 "Basic Socket Interface Extensions for IPv6"
RFC3493 "Basic Socket Interface Extensions for IPv6"
RFC2292 "Advanced Sockets API for IPv6"
49
49
49
50
51
52
52
54
54
59
59
62
62
81
83
125
165
RFC3542 "Advanced Sockets Application Program Interface (API) for IPv6" 233
IPv4-Mapped Address API Considered Harmful
IPv4-Mapped Addresses on the Wire Considered Harmful
Possible Abuse Against IPv6 Transition Technologies
An Extension of format for IPv6 Scoped Addresses
Protocol Independence Using the Sockets API
References
311
317
323
333
345
355

Get IPv6 Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.