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

Verifying IPv6 Installation
Chapter 1458
APIs.
if ((fd = open("dev/ip6", O_RDWR)) == -1)
/*
* /dev/ip6 failed to open., Therefore the IPv6 product
*is not installed on the system. An application should use the
* existing IPv4 code.
*/
...
else
/*
* dev/ip6 exists, so the IPv6 product is probably installed.
* IPv6 APIs can handle both IPv4 and IPv6 traffic */
NOTE Starting with HP-UX 11i v2, IPv6 is automatically included in HP-UX.