HP-UX IPv6 Porting Guide (February 2007)

Function Calls Converting IP addresses to Names
getipnodebyaddr(3N)
Chapter 738
How getipnodebyaddr() processes IPv4-compatible IPv6 addresses
If
af
is AF_INET6,
len
equals 16, and the IPv6 address is an IPv4-mapped or an
IPv4-compatible IPv6 address, then:
1. skip the first 12 bytes of the IPv6 address.
2. set
af
to AF_INET.
3. set
len
to 4.
If
af
is AF_INET, lookup the name for the given IPv4 address; that is, query for a PTR record
in the in-addr.arpa domain.
If
af
is AF_INET6, lookup the name for the given IPv6 address; that is, query for a PTR
record in the ip6.int domain.
A successful function call copies
*src
and
af
into the returned hostent
name_ptr
structure.
An unsuccessful function returns a nonzero
error_num
.