]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/lib/lwres/man/lwres_inetntop.docbook
MFC r363988:
[FreeBSD/stable/9.git] / contrib / bind9 / lib / lwres / man / lwres_inetntop.docbook
1 <!DOCTYPE book [
2 <!ENTITY mdash "&#8212;">]>
3 <!--
4  - Copyright (C) 2004, 2005, 2007, 2014, 2015  Internet Systems Consortium, Inc. ("ISC")
5  - Copyright (C) 2000, 2001  Internet Software Consortium.
6  -
7  - Permission to use, copy, modify, and/or distribute this software for any
8  - purpose with or without fee is hereby granted, provided that the above
9  - copyright notice and this permission notice appear in all copies.
10  -
11  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  - PERFORMANCE OF THIS SOFTWARE.
18 -->
19
20 <!-- Converted by db4-upgrade version 1.0 -->
21 <refentry xmlns="http://docbook.org/ns/docbook" version="5.0">
22   <info>
23     <date>2007-06-18</date>
24   </info>
25   <refentryinfo>
26     <corpname>ISC</corpname>
27     <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
28   </refentryinfo>
29
30   <refmeta>
31     <refentrytitle>lwres_inetntop</refentrytitle>
32     <manvolnum>3</manvolnum>
33     <refmiscinfo>BIND9</refmiscinfo>
34   </refmeta>
35
36   <docinfo>
37     <copyright>
38       <year>2004</year>
39       <year>2005</year>
40       <year>2007</year>
41       <year>2014</year>
42       <year>2015</year>
43       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
44     </copyright>
45     <copyright>
46       <year>2000</year>
47       <year>2001</year>
48       <holder>Internet Software Consortium.</holder>
49     </copyright>
50   </docinfo>
51
52   <refnamediv>
53     <refname>lwres_net_ntop</refname>
54     <refpurpose>lightweight resolver IP address presentation</refpurpose>
55   </refnamediv>
56   <refsynopsisdiv>
57     <funcsynopsis>
58 <funcsynopsisinfo>#include &lt;lwres/net.h&gt;</funcsynopsisinfo>
59 <funcprototype>
60         <funcdef>
61 const char *
62 <function>lwres_net_ntop</function></funcdef>
63         <paramdef>int <parameter>af</parameter></paramdef>
64         <paramdef>const void *<parameter>src</parameter></paramdef>
65         <paramdef>char *<parameter>dst</parameter></paramdef>
66         <paramdef>size_t <parameter>size</parameter></paramdef>
67       </funcprototype>
68 </funcsynopsis>
69   </refsynopsisdiv>
70
71   <refsection><info><title>DESCRIPTION</title></info>
72
73
74     <para><function>lwres_net_ntop()</function>
75       converts an IP address of protocol family
76       <parameter>af</parameter> &mdash; IPv4 or IPv6 &mdash; at
77       location <parameter>src</parameter> from network format to its
78       conventional representation as a string.  For IPv4 addresses,
79       that string would be a dotted-decimal.  An IPv6 address would be
80       represented in colon notation as described in RFC1884.
81     </para>
82
83     <para>
84       The generated string is copied to <parameter>dst</parameter>
85       provided
86       <parameter>size</parameter> indicates it is long enough to
87       store the
88       ASCII representation of the address.
89     </para>
90
91   </refsection>
92   <refsection><info><title>RETURN VALUES</title></info>
93
94
95     <para>
96       If successful, the function returns <parameter>dst</parameter>:
97       a pointer to a string containing the presentation format of the
98       address.  <function>lwres_net_ntop()</function> returns
99       <type>NULL</type> and sets the global variable
100       <constant>errno</constant> to <errorcode>EAFNOSUPPORT</errorcode> if
101       the protocol family given in <parameter>af</parameter> is
102       not
103       supported.
104     </para>
105
106   </refsection>
107   <refsection><info><title>SEE ALSO</title></info>
108
109     <para><citerefentry>
110         <refentrytitle>RFC1884</refentrytitle>
111       </citerefentry>,
112       <citerefentry>
113         <refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
114       </citerefentry>,
115       <citerefentry>
116         <refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>
117       </citerefentry>.
118     </para>
119   </refsection>
120 </refentry>