2 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and 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.
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.
17 <!-- $Id: lwres_inetntop.html,v 1.5.2.1.4.12 2006/06/29 13:02:31 marka Exp $ -->
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>lwres_inetntop</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2482688"></a><div class="titlepage"></div>
26 <div class="refnamediv">
28 <p>lwres_net_ntop — lightweight resolver IP address presentation</p>
30 <div class="refsynopsisdiv">
32 <div class="funcsynopsis">
33 <pre class="funcsynopsisinfo">#include <lwres/net.h></pre>
34 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
36 <td><code class="funcdef">
38 <b class="fsfunc">lwres_net_ntop</b>(</code></td>
66 <div class="refsect1" lang="en">
67 <a name="id2549419"></a><h2>DESCRIPTION</h2>
69 <code class="function">lwres_net_ntop()</code> converts an IP address of
70 protocol family <em class="parameter"><code>af</code></em> — IPv4 or IPv6 —
71 at location <em class="parameter"><code>src</code></em> from network format to its
72 conventional representation as a string. For IPv4 addresses, that
73 string would be a dotted-decimal. An IPv6 address would be
74 represented in colon notation as described in RFC1884.
77 The generated string is copied to <em class="parameter"><code>dst</code></em> provided
78 <em class="parameter"><code>size</code></em> indicates it is long enough to store the
79 ASCII representation of the address.
82 <div class="refsect1" lang="en">
83 <a name="id2549452"></a><h2>RETURN VALUES</h2>
85 If successful, the function returns <em class="parameter"><code>dst</code></em>:
86 a pointer to a string containing the presentation format of the
87 address. <code class="function">lwres_net_ntop()</code> returns
88 <span class="type">NULL</span> and sets the global variable
89 <code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
90 the protocol family given in <em class="parameter"><code>af</code></em> is not
94 <div class="refsect1" lang="en">
95 <a name="id2549483"></a><h2>SEE ALSO</h2>
97 <span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
98 <span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
99 <span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.