1 .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (c) 1998,1999 by Internet Software Consortium
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
14 .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\" Id: getnameinfo.man3,v 1.3 2009/02/21 01:31:39 jreed Exp
22 .Nd address-to-name translation in protocol-independent manner
24 .Fd #include <sys/socket.h>
25 .Fd #include <netdb.h>
27 .Fn getnameinfo "const struct sockaddr *sa" "socklen_t salen" \
28 "char *host" "size_t hostlen" "char *serv" "size_t servlen" "int flags"
32 function is defined for protocol-independent address-to-nodename translation.
33 It performs functionality of
37 in more sophisticated manner.
41 arguement is a pointer to a generic socket address structure of size
47 are pointers to buffers to hold the return values.
48 Their sizes are specified by
59 if the hostname or service name is not required.
63 arguement modifies the behaviour of
69 is set only the unqualified hostname is returned for local fully
74 is set then the numeric form of the hostname is returned.
78 is set, then a error is returned if the hostname cannot be looked up.
82 is set then the service is returned in numeric form.
86 is set then the service is UDP based rather than TCP based.
95 R. Gilligan, S. Thomson, J. Bound, and W. Stevens,
96 ``Basic Socket Interface Extensions for IPv6,'' RFC2133, April 1997.
100 function is defined IEEE POSIX 1003.1g draft specification,
101 and documented in ``Basic Socket Interface Extensions for IPv6''