d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - This Source Code Form is subject to the terms of the Mozilla Public
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - License, v. 2.0. If a copy of the MPL was not distributed with this
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - file, You can obtain one at http://mozilla.org/MPL/2.0/.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1"></a><div class="titlepage"></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_net_ntop
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User — lightweight resolver IP address presentation
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<pre class="funcsynopsisinfo">#include <lwres/net.h></pre>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_net_ntop</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>const void *<var class="pdparam">src</var>, </td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>char *<var class="pdparam">dst</var>, </td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>size_t <var class="pdparam">size</var><code>)</code>;</td>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_net_ntop()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein converts an IP address of protocol family
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>af</code></em> — IPv4 or IPv6 — at
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein location <em class="parameter"><code>src</code></em> from network format to its
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein conventional representation as a string. For IPv4 addresses,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein that string would be a dotted-decimal. An IPv6 address would be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein represented in colon notation as described in RFC1884.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The generated string is copied to <em class="parameter"><code>dst</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>size</code></em> indicates it is long enough to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ASCII representation of the address.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If successful, the function returns <em class="parameter"><code>dst</code></em>:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a pointer to a string containing the presentation format of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein address. <code class="function">lwres_net_ntop()</code> returns
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="type">NULL</span> and sets the global variable
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the protocol family given in <em class="parameter"><code>af</code></em> is
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="refentrytitle">inet_ntop</span>(3)