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

Configuring or Querying an Interface using IPv6 ioctl() Function Calls
Chapter 1356
calls, as defined in /usr/include/sys/ioctl.h, to determine the characteristics of the
network interfaces and their attributes.
All of the IPv4 SIOC* ioctl() function calls use the struct ifreq data structure (defined in
/usr/include/net/if.h) as one of the arguments for the SIOC* ioctl() function calls.
However, the ifreq data structure defined for IPv4 is not large enough to hold an IPv6 address.
Therefore, the existing IPv4 SIOC* and their associated data structures are not applicable for
IPv6 applications.
New ioctl() function calls for IPv6-applications-follow the SIOCSL* and SIOCGL* ioctl()
name format. IPv6 ioctl() function calls also use a larger data structure described below.
They are otherwise identical to the IPv4 ioctl() function calls.
NOTE The IPv6 SIOCSL* and SIOCGL* ioctl() function calls are not supported for
IPv4 applications.
Definitions for both IPv6 and IPv4 ioctl() function calls are in
/usr/include/sys/ioctl.h.
NOTE Use a larger data structure for IPv6 addresses. IPv6 addresses cannot fit into
the IPv4 struct ifreq data structure used by IPv4 SIOC* ioctl() function
calls. IPv6 applications pass, as a parameter to IPv6 ioctl()function calls, the
data structures struct if_laddrreq and struct if_laddrconf.
Both IPv6 and IPv4 ioctl() data structures are in /usr/include/net/if.h.