The following macros and
socket functions provide the additional functionality required
to write ``IPv6 ready'' applications.
getaddrinfo and getnameinfo can both be used to
retrieve information related to IPv4 and IPv6
addresses. inet_pton and inet_ntop can both convert
IPv4 and IPv6 addresses. This means that in
``IPv6 ready'' applications, you do not need to use either
inet_addr or inet_ntoa.
The IN6_IS_ADDR_V4MAPPED macro, described on the
manual page, can be used to
determine whether an
IPv6 address is an IPv4-mapped address.
retrieves a network host entry via its name and address family.
returns address information related to a specified service location.
returns the text strings associated with the supplied IP address and port number.
converts the specified address in text form to its binary equivalent.
converts the specified binary address into its text equivalent suitable for presentation.
In addition to the new functions listed above, the following sockets
functions have been modified.
No change in the syntax of these functions is necessary
when using them for IPv6,
as all addresses are referenced by ``opaque'' address pointers.
The only difference when using these functions is that you must cast
sockaddr_in6 to struct sockaddr* when using any of these
functions except sendmsg and recvmsg. When you use
these functions, set the structure member
to point to your sockaddr_in6 structure and store the length
of the structure in
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005