lwres_inetntop.html revision 71c66a876ecca77923638d3f94cc0783152b2f03
277N/A<!--
277N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
1356N/A - Copyright (C) 2000, 2001 Internet Software Consortium.
277N/A -
277N/A - Permission to use, copy, modify, and distribute this software for any
919N/A - purpose with or without fee is hereby granted, provided that the above
919N/A - copyright notice and this permission notice appear in all copies.
919N/A -
919N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
919N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
919N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
919N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
919N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
919N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
919N/A - PERFORMANCE OF THIS SOFTWARE.
919N/A-->
919N/A<!-- $Id: lwres_inetntop.html,v 1.20 2006/06/29 13:03:32 marka Exp $ -->
919N/A<html>
919N/A<head>
919N/A<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
919N/A<title>lwres_inetntop</title>
919N/A<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
277N/A</head>
277N/A<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
277N/A<a name="id2482688"></a><div class="titlepage"></div>
277N/A<div class="refnamediv">
493N/A<h2>Name</h2>
277N/A<p>lwres_net_ntop &#8212; lightweight resolver IP address presentation</p>
277N/A</div>
1408N/A<div class="refsynopsisdiv">
277N/A<h2>Synopsis</h2>
911N/A<div class="funcsynopsis">
1408N/A<pre class="funcsynopsisinfo">#include &lt;lwres/net.h&gt;</pre>
1408N/A<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
1408N/A<tr>
911N/A<td><code class="funcdef">
277N/Aconst char *
1179N/A<b class="fsfunc">lwres_net_ntop</b>(</code></td>
277N/A<td>�</td>
970N/A<td>
977N/A<var class="pdparam">af</var>, </td>
970N/A</tr>
970N/A<tr>
1356N/A<td>�</td>
1356N/A<td>�</td>
1356N/A<td>
970N/A<var class="pdparam">af</var>, </td>
970N/A</tr>
970N/A<tr>
970N/A<td>�</td>
970N/A<td>�</td>
970N/A<td>
970N/A<var class="pdparam">src</var>, </td>
277N/A</tr>
1179N/A<tr>
493N/A<td>�</td>
277N/A<td>�</td>
970N/A<td>
970N/A<var class="pdparam">dst</var>, </td>
970N/A</tr>
277N/A<tr>
<td>�</td>
<td>�</td>
<td>
<var class="pdparam">size</var><code>)</code>;</td>
</tr>
</table>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2549436"></a><h2>DESCRIPTION</h2>
<p><code class="function">lwres_net_ntop()</code>
converts an IP address of protocol family
<em class="parameter"><code>af</code></em> &#8212; IPv4 or IPv6 &#8212; at
location <em class="parameter"><code>src</code></em> from network format to its
conventional representation as a string. For IPv4 addresses,
that string would be a dotted-decimal. An IPv6 address would be
represented in colon notation as described in RFC1884.
</p>
<p>
The generated string is copied to <em class="parameter"><code>dst</code></em>
provided
<em class="parameter"><code>size</code></em> indicates it is long enough to
store the
ASCII representation of the address.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2549468"></a><h2>RETURN VALUES</h2>
<p>
If successful, the function returns <em class="parameter"><code>dst</code></em>:
a pointer to a string containing the presentation format of the
address. <code class="function">lwres_net_ntop()</code> returns
<span class="type">NULL</span> and sets the global variable
<code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
the protocol family given in <em class="parameter"><code>af</code></em> is
not
supported.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2549501"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
<span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
<span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.
</p>
</div>
</div></body>
</html>