277N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") 1356N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 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 - 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<
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<
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">
277N/A<
p>lwres_net_ntop — lightweight resolver IP address presentation</
p>
1408N/A<
div class="refsynopsisdiv">
911N/A<
div class="funcsynopsis">
1408N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
911N/A<
td><
code class="funcdef">
1179N/A<
b class="fsfunc">lwres_net_ntop</
b>(</
code></
td>
977N/A<
var class="pdparam">af</
var>, </
td>
970N/A<
var class="pdparam">af</
var>, </
td>
970N/A<
var class="pdparam">src</
var>, </
td>
970N/A<
var class="pdparam">dst</
var>, </
td>
<
var class="pdparam">size</
var><
code>)</
code>;</
td>
<
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> — IPv4 or IPv6 — 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.
The generated string is copied to <
em class="parameter"><
code>dst</
code></
em>
<
em class="parameter"><
code>size</
code></
em> indicates it is long enough to
ASCII representation of the address.
<
div class="refsect1" lang="en">
<
a name="id2549468"></
a><
h2>RETURN VALUES</
h2>
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
<
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>.