TCP/IP Programming Manual
1080::8:800:200C:417A
• In mixed form as x:x:x:x:x:x:d.d.d.d, for example:
::FFFF:13.1.68.3 as a mapped value, or ::13.1;68.3 as a compatible value.
dst
input and return value; receives the converted address in network byte order.
NOTE: The maximum length of an IPv4 address as a text string is defined as
INET_ADDRSTRLEN in the in.h header file. The maximum length of an IPv6 address as a
text string is defined as INET6_ADDRSTRLEN in the in6.h header file.
Errors
Upon successful completion, this function returns a 1. Otherwise, this function returns:
The dst parameter specifies an invalid address string.0
The af parameter specifies an invalid address string.-1
When -1 is returned, errno is also set.
If any of these conditions occurs, the function sets errno to the corresponding value:
The value specified for the af parameter is not valid.EAFNOSUPPORT
Usage Guidelines
The inet_pton function is one of two functions that allow you to manage network addresses
regardless of address family.
lwres_freeaddrinfo
The lwres_freeaddrinfo function frees the memory of one or more addrinfo structures
previously created by the lwres_getaddrinfo function. Any dynamic storage pointed to by
the structure is also freed. (This function is supported for G06.27 and later G-series RVUs and
H06.05 and later H-series RVUs of NonStop TCP/IPv6.)
C Synopsis
#include <netdb.h>
void lwres_freeaddrinfo (struct addrinfo *ai);
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
lwres_freeaddrinfo (ai);
INT .EXT ai (addrinfo);
ai
input value; specifies the addrinfo structure to be freed.
Usage Guidelines
Call this function once for each structure created by calls to lwres_getaddrinfo before closing
a socket. Upon successful completion, lwres_freeaddrinfo does not return a value. The address
information structure and associated storage have been returned to the system.
140 Library Routines