lwres_inetntop.html revision fd2597f75693a2279fdf588bd40dfe2407c42028
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User - Copyright (C) 2000, 2001 Internet Software Consortium.
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater - purpose with or without fee is hereby granted, provided that the above
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater - copyright notice and this permission notice appear in all copies.
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User - PERFORMANCE OF THIS SOFTWARE.
6c910bd5e4a85a56e3a61fdf7b237a45bb2553eeTinderbox User<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
e20309353e6246485c521278131d3fced73d7957Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
e20309353e6246485c521278131d3fced73d7957Tinderbox User<a name="id-1"></a><div class="titlepage"></div>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<p>lwres_net_ntop — lightweight resolver IP address presentation</p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<pre class="funcsynopsisinfo">#include <lwres/net.h></pre>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater<b class="fsfunc">lwres_net_ntop</b>(</code></td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>int <var class="pdparam">af</var>, </td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>const void *<var class="pdparam">src</var>, </td>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<td>size_t <var class="pdparam">size</var><code>)</code>;</td>
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews<p><code class="function">lwres_net_ntop()</code>
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews converts an IP address of protocol family
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User <em class="parameter"><code>af</code></em> — IPv4 or IPv6 — at
e20309353e6246485c521278131d3fced73d7957Tinderbox User location <em class="parameter"><code>src</code></em> from network format to its
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews conventional representation as a string. For IPv4 addresses,
e5a3fb2b751598fdbcf2cde07a47202aaab93081Tinderbox User that string would be a dotted-decimal. An IPv6 address would be
e20309353e6246485c521278131d3fced73d7957Tinderbox User represented in colon notation as described in RFC1884.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews The generated string is copied to <em class="parameter"><code>dst</code></em>
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater <em class="parameter"><code>size</code></em> indicates it is long enough to
ec7751119a08c6a7250f3187beed69a8b836d349Tinderbox User ASCII representation of the address.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson If successful, the function returns <em class="parameter"><code>dst</code></em>:
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater a pointer to a string containing the presentation format of the
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater address. <code class="function">lwres_net_ntop()</code> returns
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews <span class="type">NULL</span> and sets the global variable
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater <code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson the protocol family given in <em class="parameter"><code>af</code></em> is
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<p><span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User <span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User <span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.