824N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") 824N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 824N/A - Permission to use, copy, modify, and distribute this software for any 824N/A - purpose with or without fee is hereby granted, provided that the above 824N/A - copyright notice and this permission notice appear in all copies. 824N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 824N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 824N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 824N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 824N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 824N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 824N/A - PERFORMANCE OF THIS SOFTWARE. 824N/A>lwres_getnameinfo</
TITLE 824N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.79"></
HEAD 824N/A>lwres_getnameinfo -- lightweight resolver socket address structure to hostname and service name</
DIV 824N/ACLASS="FUNCSYNOPSISINFO" 824N/A>(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);</
CODE 824N/A> This function is equivalent to the <
SPAN 824N/A> function defined in RFC2133.
824N/A>lwres_getnameinfo()</
CODE 824N/A> returns the hostname for the
824N/A> bytes long. The hostname is of length
824N/A> The maximum length of the hostname is
824N/A> The name of the service associated with the port number in
824N/A> bytes long. The maximum length
824N/Aof the service name is <
CODE 824N/A> argument sets the following
824N/A>A fully qualified domain name is not required for local hosts.
824N/AThe local part of the fully qualified domain name is returned instead.</
P 824N/A>Return the address in numeric form, as if calling inet_ntop(),
824N/Ainstead of a host name.</
P 824N/A>A name is required. If the hostname cannot be found in the DNS and
824N/Athis flag is set, a non-zero error code is returned.
824N/AIf the hostname is not found and the flag is not set, the
824N/Aaddress is returned in numeric form.</
P 824N/A>The service name is returned as a digit string representing the port number.</
P 824N/A>Specifies that the service being looked up is a datagram
824N/Aservice, and causes getservbyport() to be called with a second
824N/Aargument of "udp" instead of its default of "tcp". This is required
824N/Afor the few ports (512-514) that have different services for UDP and
824N/A>lwres_getnameinfo()</
CODE 824N/Areturns 0 on success or a non-zero error code if an error occurs.</
P 824N/A>lwres_getnameinfo</
SPAN 824N/A>lwres_getnamebyaddr</
SPAN 824N/A>RFC2133 fails to define what the nonzero return values of