+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
.\" This page is in the public domain.
+.\" %%%LICENSE_END
+.\"
.\" Almost all details are from RFC 2553.
.\"
.\" 2004-12-14, mtk, Added EAI_OVERFLOW error
.\" 2004-12-14 Fixed description of error return
.\"
-.TH GETNAMEINFO 3 2009-12-03 "GNU" "Linux Programmer's Manual"
+.TH GETNAMEINFO 3 2013-01-15 "GNU" "Linux Programmer's Manual"
.SH NAME
getnameinfo \- address-to-name translation in protocol-independent manner
.SH SYNOPSIS
and
.BR getservbyport (3),
but unlike those functions,
-.BR getaddrinfo (3)
+.BR getnameinfo ()
is reentrant and allows programs to eliminate
IPv4-versus-IPv6 dependencies.
If set, then the numeric form of the service address is returned.
(When not set, this will still happen in case the service's name
cannot be determined.)
-.SS "Extensions to getaddrinfo() for Internationalized Domain Names"
+.SS Extensions to getnameinfo() for Internationalized Domain Names
.PP
Starting with glibc 2.3.4,
.BR getnameinfo ()
IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3
conforming hostname)
flags respectively to be used in the IDNA handling.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
.\" FIXME glibc defines the following additional errors, some which
.\" can probably be returned by getnameinfo(); they need to
.\" be documented.
.SH VERSIONS
.BR getnameinfo ()
is provided in glibc since version 2.1.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
RFC\ 2553, POSIX.1-2001.
.SH NOTES
In order to assist the programmer in choosing reasonable sizes
.BR getnameinfo ()
can be found in
.BR getaddrinfo (3).
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR accept (2),
.BR getpeername (2),
.BR getsockname (2),
.BR services (5),
.BR hostname (7),
.BR named (8)
-.LP
+
R. Gilligan, S. Thomson, J. Bound and W. Stevens,
.IR "Basic Socket Interface Extensions for IPv6" ,
RFC\ 2553, March 1999.
-.LP
+
Tatsuya Jinmei and Atsushi Onoe,
.IR "An Extension of Format for IPv6 Scoped Addresses" ,
-internet draft, work in progress.
-ftp://ftp.ietf.org/internet\-drafts/draft\-ietf\-ipngwg\-scopedaddr\-format\-02.txt
-.LP
+internet draft, work in progress
+.UR ftp://ftp.ietf.org\:/internet\-drafts\:/draft\-ietf\-ipngwg\-scopedaddr\-format\-02.txt
+.UE .
+
Craig Metz,
.IR "Protocol Independence Using the Sockets API" ,
Proceedings of the freenix track:
-2000 USENIX annual technical conference, June 2000.
+2000 USENIX annual technical conference, June 2000
.ad l
-http://www.usenix.org/publications/library/proceedings/usenix2000/freenix/metzprotocol.html
+.UR http://www.usenix.org\:/publications\:/library\:/proceedings\:/usenix2000\:/freenix\:/metzprotocol.html
+.UE .