2 - Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or 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.
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.71.1">
24 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF"><div class=
"refentry" lang=
"en">
25 <a name=
"id2476275"></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>
41 <var class=
"pdparam">af
</var>,
</td>
45 <td>const void *
</td>
47 <var class=
"pdparam">src
</var>,
</td>
53 <var class=
"pdparam">dst
</var>,
</td>
59 <var class=
"pdparam">size
</var><code>)
</code>;
</td>
64 <div class=
"refsect1" lang=
"en">
65 <a name=
"id2543388"></a><h2>DESCRIPTION
</h2>
66 <p><code class=
"function">lwres_net_ntop()
</code>
67 converts an IP address of protocol family
68 <em class=
"parameter"><code>af
</code></em> — IPv4 or IPv6
— at
69 location
<em class=
"parameter"><code>src
</code></em> from network format to its
70 conventional representation as a string. For IPv4 addresses,
71 that string would be a dotted-decimal. An IPv6 address would be
72 represented in colon notation as described in RFC1884.
75 The generated string is copied to
<em class=
"parameter"><code>dst
</code></em>
77 <em class=
"parameter"><code>size
</code></em> indicates it is long enough to
79 ASCII representation of the address.
82 <div class=
"refsect1" lang=
"en">
83 <a name=
"id2543420"></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
95 <div class=
"refsect1" lang=
"en">
96 <a name=
"id2543453"></a><h2>SEE ALSO
</h2>
97 <p><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>.