.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
-.\"
+.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
-.\"
+.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" References: RFC 2553
.\"
-.\" 2005-08-09, mtk, added AI_ALL, AI_ADDRCONFIG, AI_V4MAPPED,
+.\" 2005-08-09, mtk, added AI_ALL, AI_ADDRCONFIG, AI_V4MAPPED,
.\" and AI_NUMERICSERV.
.\"
.TH getaddrinfo 3 2000-12-18 "Linux Man Page" "Linux Programmer's Manual"
multi-homed; or if the same service
is available from multiple socket protocols (one
.B SOCK_STREAM
-address and another
+address and another
.B SOCK_DGRAM
address, for example).
.PP
parameter.
The
.I ai_canonname
-field of the first of these
-.I addrinfo
+field of the first of these
+.I addrinfo
structures is set to point to the official name of the host, if
.I hints.ai_flags
includes the
.B AI_CANONNAME
flag.
-.\" In glibc prior to 2.3.4, the ai_canonname of each addrinfo
+.\" In glibc prior to 2.3.4, the ai_canonname of each addrinfo
.\" structure was set pointing to the canonical name; that was
-.\" more than POSIX.1-2001 specified, or other implementations provided.
+.\" more than POSIX.1-2001 specified, or other implementations provided.
.\" MTK, Aug 05
.IR ai_family ,
.IR ai_socktype ,
.B AI_ADDRCONFIG
flag, then IPv4 addresses are returned in the list pointed to by
.I result
-only if the local system has at least one
-IPv4 address configured, and IPv6 addresses are only returned
+only if the local system has at least one
+IPv4 address configured, and IPv6 addresses are only returned
if the local system has at least one IPv6 address configured.
.PP
If
.B AI_ALL
are specified in
.IR hints.ai_family ,
-then return both IPv6 and IPv4-mapped IPv6 addresses
+then return both IPv6 and IPv4-mapped IPv6 addresses
in the list pointed to by
.IR result .
.B AI_ALL
If
.B AI_NUMERICSERV
is specified in
-.IR hints.ai_flags
+.IR hints.ai_flags
and
.I service
-is not NULL, then
+is not NULL, then
.I service
must point to a string containing a numeric port number.
This flag is used to inhibit the invocation of a name resolution service
.SS "Extensions to getaddrinfo() for Internationalized Domain Names"
.PP
Starting with glibc 2.3.4,
-.BR getaddrinfo ()
-has been extended to selectively allow the incoming and outgoing
-host names to be transparently converted to and from the
+.BR getaddrinfo ()
+has been extended to selectively allow the incoming and outgoing
+host names to be transparently converted to and from the
Internationalized Domain Name (IDN) format (see RFC 3490,
.IR "Internationalizing Domain Names in Applications (IDNA)" ).
Four new flags are defined:
is converted to IDN format if necessary.
The source encoding is that of the current locale.
-If the input name contains non-ASCII characters, then the IDN encoding
-is used.
+If the input name contains non-ASCII characters, then the IDN encoding
+is used.
Those parts of the node name (delimited by dots) that contain
-non-ASCII characters are encoded using ASCII Compatible Encoding (ACE)
+non-ASCII characters are encoded using ASCII Compatible Encoding (ACE)
before being passed to the name resolution functions.
.\" Implementation Detail:
.\" To minimize effects on system performance the implementation might
.\" might be a problem.
.TP
.B AI_CANONIDN
-After a successful name lookup, and if the
-.B AI_CANONNAME
+After a successful name lookup, and if the
+.B AI_CANONNAME
flag was specified,
.BR getaddrinfo ()
will return the canonical name of the
-node corresponding to the
-.I addrinfo
+node corresponding to the
+.I addrinfo
structure value passed back.
The return value is an exact copy of the value returned by the name
resolution function.
-If the name is encoded using ACE, then it will contain the
-.I xn--
-prefix for one or more components of the name.
-To convert these components into a readable form the
-.B AI_CANONIDN
-flag can be passed in addition to
-.BR AI_CANONNAME .
+If the name is encoded using ACE, then it will contain the
+.I xn--
+prefix for one or more components of the name.
+To convert these components into a readable form the
+.B AI_CANONIDN
+flag can be passed in addition to
+.BR AI_CANONNAME .
The resulting string is encoded using the current locale's encoding.
.\"
.\"Implementation Detail:
.\"step can be skipped, therefore avoiding unnecessary slowdowns.
.TP
.BR AI_IDN_ALLOW_UNASSIGNED ", " AI_IDN_USE_STD3_ASCII_RULES
-Setting these flags will enable the
+Setting these flags will enable the
IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and
-IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3
-conforming host name)
+IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3
+conforming host name)
flags respectively to be used in the IDNA handling.
.SH "RETURN VALUE"
.\" FIXME glibc defines the following additional errors, some which
-.\" can probably be returned by getaddrinfo(); they need to
+.\" can probably be returned by getaddrinfo(); they need to
.\" be documented.
.\" # ifdef __USE_GNU
.\" # define EAI_INPROGRESS -100 /* Processing request in progress. */
.B AI_NUMERICSERV
was specified in
.I hints.ai_flags
-and
+and
.I service
was not a numeric port-number string.
.TP