2 - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
18 <!-- $Id: lwres_getnameinfo.html,v 1.5.2.2 2004/03/15 04:45:03 marka Exp $ -->
23 >lwres_getnameinfo</TITLE
26 CONTENT="Modular DocBook HTML Stylesheet Version 1.73
47 >lwres_getnameinfo -- lightweight resolver socket address structure to hostname and service name</DIV
49 CLASS="REFSYNOPSISDIV"
63 CLASS="FUNCSYNOPSISINFO"
64 >#include <lwres/netdb.h></PRE
70 lwres_getnameinfo</CODE
71 >(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);</CODE
85 > This function is equivalent to the <SPAN
91 > function defined in RFC2133.
94 >lwres_getnameinfo()</TT
95 > returns the hostname for the
98 >struct sockaddr</SPAN
110 > bytes long. The hostname is of length
116 > and is returned via
122 > The maximum length of the hostname is
128 > The name of the service associated with the port number in
145 > bytes long. The maximum length
146 of the service name is <TT
156 > argument sets the following
170 >A fully qualified domain name is not required for local hosts.
171 The local part of the fully qualified domain name is returned instead.</P
180 >Return the address in numeric form, as if calling inet_ntop(),
181 instead of a host name.</P
190 >A name is required. If the hostname cannot be found in the DNS and
191 this flag is set, a non-zero error code is returned.
192 If the hostname is not found and the flag is not set, the
193 address is returned in numeric form.</P
202 >The service name is returned as a digit string representing the port number.</P
211 >Specifies that the service being looked up is a datagram
212 service, and causes getservbyport() to be called with a second
213 argument of "udp" instead of its default of "tcp". This is required
214 for the few ports (512-514) that have different services for UDP and
231 >lwres_getnameinfo()</TT
233 returns 0 on success or a non-zero error code if an error occurs.</P
246 CLASS="REFENTRYTITLE"
253 CLASS="REFENTRYTITLE"
260 CLASS="REFENTRYTITLE"
267 CLASS="REFENTRYTITLE"
268 >lwres_getnameinfo</SPAN
274 CLASS="REFENTRYTITLE"
275 >lwres_getnamebyaddr</SPAN
281 CLASS="REFENTRYTITLE"
282 >lwres_net_ntop</SPAN
294 >RFC2133 fails to define what the nonzero return values of
298 CLASS="REFENTRYTITLE"