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

IPv6 Addressing
Comparing IPv4 and IPv6 Addresses
Chapter 28
Comparing IPv4 and IPv6 Addresses
IPv4 addresses are 32-bit addresses represented as four dotted-decimal octets
Example: 10.1.3.7
IPv6 Addresses are 128-bit records represented as eight fields of up to four hexadecimal
digits. A colon separates each field (:).
Example: 8888:7777:6666:5555:4444:3333:2222:1111
Leading Zeros Suppressed
Example: 0008:0007:0006:0005:0004:0003:0002:0001
Is also valid in the format:
8:7:6:5:4:3:2:1
Comparing IPv4 and IPv6 Addresses
Contiguous Fields Containing only the Digits Zero can be collapsed
Example: 0008:0000:0000:0000:0000:0003:0002:0001
Is also valid in the format:
8::3:2:1
NOTE Only one set of contiguous fields of zeros per IP address can be collapsed.
IPv4-Compatible and IPv4-Mapped IPv6 Addresses can display IPv4
Addresses in Dotted-Decimal Format
IPv4-compatible and IPv4-mapped addresses contain the IPv4 address in the low-order
32-bits. Mixing hexadecimal format and dotted-decimal format is valid. For example, the
IPv4-compatible IPv6 address ::10.9.8.7 is valid in the following formats: