Chapter 7 |
7
|
Application Interface to Sockets
|
7.1
|
Structures
|
7.1.1
|
in6_addr Structure
|
7.1.2
|
sockaddr_in6 Structure
|
7.1.3
|
msghdr Structure
|
7.1.4
|
cmsghdr Structure
|
7.2
|
Header Files
|
7.3
|
Socket Options
|
7.4
|
Basic API
|
7.4.1
|
Interface Identification
|
7.4.2
|
IPv6 Multicast Datagrams
|
7.4.2.1
|
Sending IPv6 Multicast Datagrams
|
7.4.2.2
|
Receiving IPv6 Multicast Datagrams
|
7.4.3
|
Address Translation and Conversion Functions
|
7.4.4
|
Address-Testing Macros
|
7.5
|
Advanced API
|
7.5.1
|
Using IPv6 Raw Sockets
|
7.5.1.1
|
Accessing ICMPv6 Messages
|
7.5.1.2
|
Accessing the IPv6 Header
|
7.5.1.3
|
Accessing the IPv6 Routing Header
|
7.5.1.4
|
Accessing the IPv6 Options Headers
|
7.6
|
Guidelines for Compiling and Linking IPv6 Applications
|
7.7
|
IPv6 Library Functions API
|
Command 1
|
freeaddrinfo()
|
Command 2
|
gai_strerror()
|
Command 3
|
getaddrinfo()
|
Command 4
|
getnameinfo()
|
Command 5
|
if_freenameindex()
|
Command 6
|
if_indextoname()
|
Command 7
|
if_nameindex()
|
Command 8
|
if_nametoindex()
|
Command 9
|
inet6_opt_append()
|
Command 10
|
inet6_opt_find()
|
Command 11
|
inet6_opt_finish()
|
Command 12
|
inet6_opt_get_val()
|
Command 13
|
inet6_opt_init()
|
Command 14
|
inet6_opt_next()
|
Command 15
|
inet6_opt_set_val()
|
Command 16
|
inet6_rth_add()
|
Command 17
|
inet6_rth_getaddr()
|
Command 18
|
inet6_rth_init()
|
Command 19
|
inet6_rth_reverse()
|
Command 20
|
inet6_rth_segments()
|
Command 21
|
inet6_rth_space()
|
Command 22
|
inet_ntop()
|
Command 23
|
inet_pton()
|
Chapter 8 |
8
|
Porting Applications
|
8.1
|
Using AF_INET6 Sockets
|
8.2
|
Name Changes
|
8.3
|
Structure Changes
|
8.3.1
|
in_addr Structure
|
8.3.2
|
sockaddr Structure
|
8.3.3
|
sockaddr_in Structure
|
8.3.4
|
hostent Structure
|
8.4
|
Function Changes
|
8.4.1
|
gethostbyaddr() Function
|
8.4.2
|
gethostbyname() Function
|
8.4.3
|
inet_ntoa() Function
|
8.4.4
|
inet_addr() Function
|
8.5
|
Other Application Changes
|
8.5.1
|
Comparing IP Addresses
|
8.5.2
|
Comparing an IP Address to the Wildcard Address
|
8.5.3
|
Using int Data Types to Hold IP Addresses
|
8.5.4
|
Using Functions that Return IP Addresses
|
8.5.5
|
Changing Socket Options
|
8.6
|
Sample Client/Server Programs
|
8.6.1
|
Programs Using AF_INET Sockets
|
8.6.1.1
|
Client Program
|
8.6.1.2
|
Server Program
|
8.6.2
|
Programs Using AF_INET6 Sockets
|
8.6.2.1
|
Client Program
|
8.6.2.2
|
Server Program
|
8.6.3
|
Sample Program Output
|
Appendix A |
Appendix A
|
Supported IPv6 RFCs
|
Appendix B |
Appendix B
|
Deprecated Library Functions
|
B.1
|
getipnodebyname Function
|
B.2
|
getipnodebyaddr Function
|
B.3
|
freehostent Function
|
Index |
Index |
Examples |
2-1 |
Sample TCPIP$IP6RTRD.CONF File |
3-1 |
Sample TCPIP$BIND.CONF_IPV6 |
3-2 |
Sample IPV6.DB File |
3-3 |
Sample IPV6.ARPA File |
3-4 |
Sample IPV6.INT File |
Figures |
1-1 |
Unicast Addresses |
1-2 |
64-Bit Prefix Plus 64-Bit Interface ID |
1-3 |
Creating an Interface ID from a MAC Address |
1-4 |
IPv6 Global Unicast Address |
1-5 |
IPv4-Compatible IPv6 Address |
1-6 |
IPv4-Mapped IPv6 Address |
1-7 |
IPv6 Link-Local Unicast Address |
1-8 |
IPv6 Site-Local Unicast Address |
1-9 |
Anycast Address |
1-10 |
IPv6 Multicast Address |
1-11 |
Host-to-Host Configuration with No Router |
1-12 |
Host-to-Host Configuration with Router |
1-13 |
IPv6 Network to IPv6 Network with Router Configuration |
1-14 |
Multiple IPv6 Networks and Multiple Routers Configuration |
1-15 |
Host-to-Host Configuration over Tunnel |
1-16 |
Host-to-Router Configuration over Tunnel |
1-17 |
IPv6 Network-to-IPv6 Network Configuration over Tunnel |
1-18 |
IPv6 Network-to-IPv6 Network Configuration over Tunnel |
2-1 |
Configuration Worksheet |
2-2 |
Simple Host-to-Host Configuration |
2-3 |
Host-to-Host with Router Configuration |
2-4 |
IPv6 Network-to-IPv6 Network with Router Configuration |
2-5 |
Multiple IPv6 Networks and Multiple Routers Configuration |
2-6 |
Host-to-Host over IPv4 Configured Tunnel Configuration |
2-7 |
Host-to-Router over IPv4 Configured Tunnel Configuration |
2-8 |
Router Not Advertising a Global Address Prefix |
2-9 |
Router Advertising a Global Address Prefix |
2-10 |
Router A Not Advertising a Global Prefix on the Tunnel Link |
2-11 |
IPv6 Network to IPv6 Network over IPv4 Configured Tunnel Configuration |
2-12 |
6to4 Tunnel Host E Configuration |
2-13 |
6to4 Tunnel Router Configuration |
2-14 |
6to4 Tunnel Host B Configuration |
5-1 |
Communication with Mobile Node at Home |
5-2 |
Communication with Mobile Node Away from Home--Part 1 |
5-3 |
Communication with Mobile Node Away from Home--Part 2 |
8-1 |
Using AF_INET Socket for IPv4 Communications |
8-2 |
Using AF_INET6 Socket to Send IPv4 Communications |
8-3 |
Using AF_INET6 Socket to Receive IPv4 Communications |
8-4 |
Using AF_INET6 Socket for IPv6 Communications |