diff options
Diffstat (limited to 'usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook')
-rw-r--r-- | usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook | 289 |
1 files changed, 162 insertions, 127 deletions
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook index 3a113c991a0..3a637ad1d0d 100644 --- a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook +++ b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook @@ -1,11 +1,11 @@ -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN" - "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [<!ENTITY mdash "—">]> <!-- - - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000, 2001 Internet Software Consortium. - - - Permission to use, copy, modify, and distribute this software for any + - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - @@ -18,24 +18,24 @@ - PERFORMANCE OF THIS SOFTWARE. --> -<!-- $ISC: lwres_getnameinfo.docbook,v 1.3.206.3 2005/05/12 21:36:15 sra Exp $ --> - +<!-- $ISC: lwres_getnameinfo.docbook,v 1.4.18.6 2007/08/28 07:20:06 tbox Exp $ --> <refentry> -<refentryinfo> -<date>Jun 30, 2000</date> -</refentryinfo> + <refentryinfo> + <date>Jun 30, 2000</date> + </refentryinfo> -<refmeta> -<refentrytitle>lwres_getnameinfo</refentrytitle> -<manvolnum>3</manvolnum> -<refmiscinfo>BIND9</refmiscinfo> -</refmeta> + <refmeta> + <refentrytitle>lwres_getnameinfo</refentrytitle> + <manvolnum>3</manvolnum> + <refmiscinfo>BIND9</refmiscinfo> + </refmeta> <docinfo> <copyright> <year>2004</year> <year>2005</year> + <year>2007</year> <holder>Internet Systems Consortium, Inc. ("ISC")</holder> </copyright> <copyright> @@ -45,126 +45,161 @@ </copyright> </docinfo> -<refnamediv> -<refname>lwres_getnameinfo</refname> -<refpurpose>lightweight resolver socket address structure to hostname and service name</refpurpose> -</refnamediv> -<refsynopsisdiv> -<funcsynopsis> + <refnamediv> + <refname>lwres_getnameinfo</refname> + <refpurpose>lightweight resolver socket address structure to hostname and + service name + </refpurpose> + </refnamediv> + <refsynopsisdiv> + <funcsynopsis> <funcsynopsisinfo>#include <lwres/netdb.h></funcsynopsisinfo> <funcprototype> -<funcdef> + <funcdef> int <function>lwres_getnameinfo</function></funcdef> -<paramdef>const struct sockaddr *sa</paramdef> -<paramdef>size_t salen</paramdef> -<paramdef>char *host</paramdef> -<paramdef>size_t hostlen</paramdef> -<paramdef>char *serv</paramdef> -<paramdef>size_t servlen</paramdef> -<paramdef>int flags</paramdef> -</funcprototype> + <paramdef>const struct sockaddr *<parameter>sa</parameter></paramdef> + <paramdef>size_t <parameter>salen</parameter></paramdef> + <paramdef>char *<parameter>host</parameter></paramdef> + <paramdef>size_t <parameter>hostlen</parameter></paramdef> + <paramdef>char *<parameter>serv</parameter></paramdef> + <paramdef>size_t <parameter>servlen</parameter></paramdef> + <paramdef>int <parameter>flags</parameter></paramdef> + </funcprototype> </funcsynopsis> -</refsynopsisdiv> + </refsynopsisdiv> -<refsect1> -<title>DESCRIPTION</title> + <refsect1> + <title>DESCRIPTION</title> -<para> This function is equivalent to the <citerefentry> -<refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum> -</citerefentry> function defined in RFC2133. -<function>lwres_getnameinfo()</function> returns the hostname for the -<type>struct sockaddr</type> <parameter>sa</parameter> which is -<parameter>salen</parameter> bytes long. The hostname is of length -<parameter>hostlen</parameter> and is returned via -<parameter>*host.</parameter> The maximum length of the hostname is -1025 bytes: <constant>NI_MAXHOST</constant>.</para> + <para> + This function is equivalent to the + <citerefentry> + <refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum> + </citerefentry> function defined in RFC2133. + <function>lwres_getnameinfo()</function> returns the + hostname for the + <type>struct sockaddr</type> <parameter>sa</parameter> which + is + <parameter>salen</parameter> bytes long. The hostname is of + length + <parameter>hostlen</parameter> and is returned via + <parameter>*host.</parameter> The maximum length of the + hostname is + 1025 bytes: <constant>NI_MAXHOST</constant>. + </para> -<para> The name of the service associated with the port number in -<parameter>sa</parameter> is returned in <parameter>*serv.</parameter> -It is <parameter>servlen</parameter> bytes long. The maximum length -of the service name is <constant>NI_MAXSERV</constant> - 32 bytes. -</para> + <para> The name of the service associated with the port number in + <parameter>sa</parameter> is returned in <parameter>*serv.</parameter> + It is <parameter>servlen</parameter> bytes long. The + maximum length + of the service name is <constant>NI_MAXSERV</constant> - 32 + bytes. + </para> -<para> The <parameter>flags</parameter> argument sets the following -bits: -<variablelist> -<varlistentry><term><constant>NI_NOFQDN</constant></term> -<listitem> -<para> -A fully qualified domain name is not required for local hosts. -The local part of the fully qualified domain name is returned instead. -</para></listitem></varlistentry> -<varlistentry><term><constant>NI_NUMERICHOST</constant></term> -<listitem> -<para> -Return the address in numeric form, as if calling inet_ntop(), -instead of a host name. -</para></listitem></varlistentry> -<varlistentry><term><constant>NI_NAMEREQD</constant></term> -<listitem> -<para> -A name is required. If the hostname cannot be found in the DNS and -this flag is set, a non-zero error code is returned. -If the hostname is not found and the flag is not set, the -address is returned in numeric form. -</para></listitem></varlistentry> -<varlistentry><term><constant>NI_NUMERICSERV</constant></term> -<listitem> -<para> -The service name is returned as a digit string representing the port number. -</para></listitem></varlistentry> -<varlistentry><term><constant>NI_DGRAM</constant></term> -<listitem> -<para> -Specifies that the service being looked up is a datagram -service, and causes getservbyport() to be called with a second -argument of "udp" instead of its default of "tcp". This is required -for the few ports (512-514) that have different services for UDP and -TCP. -</para></listitem></varlistentry> -</variablelist> -</para> -</refsect1> + <para> + The <parameter>flags</parameter> argument sets the + following + bits: + <variablelist> + <varlistentry> + <term><constant>NI_NOFQDN</constant></term> + <listitem> + <para> + A fully qualified domain name is not required for local hosts. + The local part of the fully qualified domain name is returned + instead. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><constant>NI_NUMERICHOST</constant></term> + <listitem> + <para> + Return the address in numeric form, as if calling inet_ntop(), + instead of a host name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><constant>NI_NAMEREQD</constant></term> + <listitem> + <para> + A name is required. If the hostname cannot be found in the DNS + and + this flag is set, a non-zero error code is returned. + If the hostname is not found and the flag is not set, the + address is returned in numeric form. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><constant>NI_NUMERICSERV</constant></term> + <listitem> + <para> + The service name is returned as a digit string representing the + port number. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><constant>NI_DGRAM</constant></term> + <listitem> + <para> + Specifies that the service being looked up is a datagram + service, and causes getservbyport() to be called with a second + argument of "udp" instead of its default of "tcp". This is + required + for the few ports (512-514) that have different services for UDP + and + TCP. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> -<refsect1> -<title>RETURN VALUES</title> -<para> -<function>lwres_getnameinfo()</function> -returns 0 on success or a non-zero error code if an error occurs. -</para> -</refsect1> -<refsect1> -<title>SEE ALSO</title> -<para> -<citerefentry> -<refentrytitle>RFC2133</refentrytitle> -</citerefentry>, -<citerefentry> -<refentrytitle>getservbyport</refentrytitle><manvolnum>3</manvolnum> -</citerefentry>, -<citerefentry> -<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum> -</citerefentry>, -<citerefentry> -<refentrytitle>lwres_getnameinfo</refentrytitle><manvolnum>3</manvolnum> -</citerefentry>, -<citerefentry> -<refentrytitle>lwres_getnamebyaddr</refentrytitle><manvolnum>3</manvolnum> -</citerefentry>. -<citerefentry> -<refentrytitle>lwres_net_ntop</refentrytitle><manvolnum>3</manvolnum> -</citerefentry>. -</para> -</refsect1> -<refsect1> -<title>BUGS</title> -<para> -RFC2133 fails to define what the nonzero return values of -<citerefentry> -<refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum> -</citerefentry> -are. -</para> -</refsect1> -</refentry> + <refsect1> + <title>RETURN VALUES</title> + <para><function>lwres_getnameinfo()</function> + returns 0 on success or a non-zero error code if an error occurs. + </para> + </refsect1> + <refsect1> + <title>SEE ALSO</title> + <para><citerefentry> + <refentrytitle>RFC2133</refentrytitle> + </citerefentry>, + <citerefentry> + <refentrytitle>getservbyport</refentrytitle><manvolnum>3</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>lwres_getnameinfo</refentrytitle><manvolnum>3</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>lwres_getnamebyaddr</refentrytitle><manvolnum>3</manvolnum> + </citerefentry>. + <citerefentry> + <refentrytitle>lwres_net_ntop</refentrytitle><manvolnum>3</manvolnum> + </citerefentry>. + </para> + </refsect1> + <refsect1> + <title>BUGS</title> + <para> + RFC2133 fails to define what the nonzero return values of + <citerefentry> + <refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum> + </citerefentry> + are. + </para> + </refsect1> +</refentry><!-- + - Local variables: + - mode: sgml + - End: +--> |