]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/lib/lwres/man/lwres_inetntop.html
MFC r363988:
[FreeBSD/stable/9.git] / contrib / bind9 / lib / lwres / man / lwres_inetntop.html
1 <!--
2  - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000, 2001 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and/or 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.
8  - 
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.
16 -->
17 <html>
18 <head>
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>lwres_inetntop</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
22 </head>
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="id-1"></a><div class="titlepage"></div>
25 <div class="refnamediv">
26 <h2>Name</h2>
27 <p>lwres_net_ntop &#8212; lightweight resolver IP address presentation</p>
28 </div>
29 <div class="refsynopsisdiv">
30 <h2>Synopsis</h2>
31 <div class="funcsynopsis">
32 <pre class="funcsynopsisinfo">#include &lt;lwres/net.h&gt;</pre>
33 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
34 <tr>
35 <td><code class="funcdef">
36 const char *
37 <b class="fsfunc">lwres_net_ntop</b>(</code></td>
38 <td>int <var class="pdparam">af</var>, </td>
39 </tr>
40 <tr>
41 <td> </td>
42 <td>const void *<var class="pdparam">src</var>, </td>
43 </tr>
44 <tr>
45 <td> </td>
46 <td>char *<var class="pdparam">dst</var>, </td>
47 </tr>
48 <tr>
49 <td> </td>
50 <td>size_t <var class="pdparam">size</var><code>)</code>;</td>
51 </tr>
52 </table>
53 <div class="funcprototype-spacer"> </div>
54 </div>
55 </div>
56 <div class="refsection">
57 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
58 <p><code class="function">lwres_net_ntop()</code>
59       converts an IP address of protocol family
60       <em class="parameter"><code>af</code></em> &#8212; IPv4 or IPv6 &#8212; at
61       location <em class="parameter"><code>src</code></em> from network format to its
62       conventional representation as a string.  For IPv4 addresses,
63       that string would be a dotted-decimal.  An IPv6 address would be
64       represented in colon notation as described in RFC1884.
65     </p>
66 <p>
67       The generated string is copied to <em class="parameter"><code>dst</code></em>
68       provided
69       <em class="parameter"><code>size</code></em> indicates it is long enough to
70       store the
71       ASCII representation of the address.
72     </p>
73 </div>
74 <div class="refsection">
75 <a name="id-1.8"></a><h2>RETURN VALUES</h2>
76 <p>
77       If successful, the function returns <em class="parameter"><code>dst</code></em>:
78       a pointer to a string containing the presentation format of the
79       address.  <code class="function">lwres_net_ntop()</code> returns
80       <span class="type">NULL</span> and sets the global variable
81       <code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
82       the protocol family given in <em class="parameter"><code>af</code></em> is
83       not
84       supported.
85     </p>
86 </div>
87 <div class="refsection">
88 <a name="id-1.9"></a><h2>SEE ALSO</h2>
89 <p><span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
90       <span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
91       <span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.
92     </p>
93 </div>
94 </div></body>
95 </html>