HP-UX IPv6 Porting Guide (September 2004)
Table Of Contents
- About This Document
- 1 Introduction
- 2 IPv6 Addressing
- 3 Data Structure Changes
- 4 Migrating Applications from IPv4 to IPv6
- 5 Overview of IPv4 and IPv6 Call Set-up
- 6 Function Calls Converting Names to Addresses
- 7 Function Calls Converting IP addresses to Names
- 8 Reading Error Messages
- 9 Freeing Memory
- 10 Converting Binary and Text Addresses
- 11 Testing for Scope and Type of IPv6 addresses using Macros
- 12 Identifying Local Interface Names and Indexes
- 13 Configuring or Querying an Interface using IPv6 ioctl() Function Calls
- 14 Verifying IPv6 Installation
- 15 Sample Client/Server Programs
- A IPv4 to IPv6 Quick Reference Guide

Contents
vi
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Returning All Interface Names and Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Freeing Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
13. Configuring or Querying an Interface using IPv6 ioctl() Function Calls
14. Verifying IPv6 Installation
15. Sample Client/Server Programs
IPv4 TCP Client Code Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
IPv6 TCP Client using getipnodebyname() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
IPv6 TCP Client Using getaddrinfo() for Name/Service Lookup. . . . . . . . . . . . . . . . . . 64
IPv4 TCP Server Code Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
IPv6 TCP Server using getaddrinfo() for Service Address Lookup . . . . . . . . . . . . . . . . 66
Do Existing IPv4-to-IPv4 Applications Require Changes? . . . . . . . . . . . . . . . . . . . . . . 70
Summary: Source Code Symbols and Function Changes . . . . . . . . . . . . . . . . . . . . . . . 71
Changes to Symbols, Data Structures, and Function Calls . . . . . . . . . . . . . . . . . . . . 71
Watch for hard-coded data structure sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Multicast and IPv4 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Loopback Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Wildcard Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Multicast Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
IPv6 Multicast Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
IP Packet Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Types of Service Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Multicast Group, IP Address, and IPv6 Interface Index . . . . . . . . . . . . . . . . . . . . . . 74