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

Overview of IPv4 and IPv6 Call Set-up
Using AF_INET6 Socket to Receive IPv4 Communications
Chapter 5 27
Using AF_INET6 Socket to Receive IPv4 Communications
An IPv6 application using an AF_INET6 socket can accept TCP connection requests from a
remote IPv4 application. The example below is contrived to demonstrate an incoming IPv4
packet destined for an application’s IPv6 socket.
In this overview diagram, an incoming IPv4 packet requests connection to an IPv6 socket.
IPv6 internally creates an IPv4-mapped IPv6 address and accepts the connection.
Figure 5-3
1. An IPv4 packet arrives at an Ethernet port.
2. The Ethernet driver examines the
type
field in the Ethernet packet.
86DD
type
is an IPv6 packet
0800
type
is an IPv4 packet
Here
type
is 0800, so the Ethernet driver strips-off the Ethernet header and passes the
IPv4 packet to the IPv4/IP module.