lwres_inetntop.html revision 4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen - Copyright (C) 2000, 2001 Internet Software Consortium.
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen - Permission to use, copy, modify, and/or distribute this software for any
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen - purpose with or without fee is hereby granted, provided that the above
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen - copyright notice and this permission notice appear in all copies.
38f227941bcf673e0e523c1ac7267bca9cbcd2c4Timo Sirainen - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
38f227941bcf673e0e523c1ac7267bca9cbcd2c4Timo Sirainen - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen - PERFORMANCE OF THIS SOFTWARE.
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen<!-- $Id: lwres_inetntop.html,v 1.24 2009/07/11 01:12:46 tbox Exp $ -->
02a6291366caff79793db35d479e2a062bec2af4Timo Sirainen<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
8f5b34c22e4c3bfb35ca13c4744867eb5ddbd3d6Timo Sirainen<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
95d9395d15540b3a96f75c7f9fd73e6d8ad5e897Timo Sirainen<a name="id2476275"></a><div class="titlepage"></div>
705f6fbad395e6f014838e797b7dbcaceafd2f1dTimo Sirainen<p>lwres_net_ntop — lightweight resolver IP address presentation</p>
50349cd047ca9e7c100cbeb70acfe26672649959Timo Sirainen<pre class="funcsynopsisinfo">#include <lwres/net.h></pre>
303e375b7e76278f4ec541f49af0476d3e4ee710Timo Sirainen<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen<b class="fsfunc">lwres_net_ntop</b>(</code></td>
b9b841558c5f91db7f5fc71c0ac62aad1bbf6418Timo Sirainen<var class="pdparam">size</var><code>)</code>;</td>
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen<p><code class="function">lwres_net_ntop()</code>
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch converts an IP address of protocol family
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch <em class="parameter"><code>af</code></em> — IPv4 or IPv6 — at
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch location <em class="parameter"><code>src</code></em> from network format to its
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch conventional representation as a string. For IPv4 addresses,
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen that string would be a dotted-decimal. An IPv6 address would be
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen represented in colon notation as described in RFC1884.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen The generated string is copied to <em class="parameter"><code>dst</code></em>
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <em class="parameter"><code>size</code></em> indicates it is long enough to
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainen ASCII representation of the address.
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen If successful, the function returns <em class="parameter"><code>dst</code></em>:
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen a pointer to a string containing the presentation format of the
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen address. <code class="function">lwres_net_ntop()</code> returns
5d03d9f439e41c90215a3c938ffebe4c2a8ae257Timo Sirainen <span class="type">NULL</span> and sets the global variable
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4Timo Sirainen <code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
97180ea9c26c4de0807daaad21e03c80643b09fdTimo Sirainen the protocol family given in <em class="parameter"><code>af</code></em> is
6dc2060d6e0261e4bfd453f1eb1c165cc8d905c1Timo Sirainen<p><span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.