1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3	       [<!ENTITY mdash "&#8212;">]>
4<!--
5 - Copyright (C) 2004, 2005, 2007, 2014  Internet Systems Consortium, Inc. ("ISC")
6 - Copyright (C) 2000, 2001  Internet Software Consortium.
7 -
8 - Permission to use, copy, modify, and/or distribute this software for any
9 - purpose with or without fee is hereby granted, provided that the above
10 - copyright notice and this permission notice appear in all copies.
11 -
12 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14 - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18 - PERFORMANCE OF THIS SOFTWARE.
19-->
20
21<refentry>
22
23  <refentryinfo>
24    <date>June 18, 2007</date>
25  </refentryinfo>
26
27  <refmeta>
28    <refentrytitle>lwres_inetntop</refentrytitle>
29    <manvolnum>3</manvolnum>
30    <refmiscinfo>BIND9</refmiscinfo>
31  </refmeta>
32
33  <docinfo>
34    <copyright>
35      <year>2004</year>
36      <year>2005</year>
37      <year>2007</year>
38      <year>2014</year>
39      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
40    </copyright>
41    <copyright>
42      <year>2000</year>
43      <year>2001</year>
44      <holder>Internet Software Consortium.</holder>
45    </copyright>
46  </docinfo>
47
48  <refnamediv>
49    <refname>lwres_net_ntop</refname>
50    <refpurpose>lightweight resolver IP address presentation</refpurpose>
51  </refnamediv>
52  <refsynopsisdiv>
53    <funcsynopsis>
54<funcsynopsisinfo>#include &lt;lwres/net.h&gt;</funcsynopsisinfo>
55<funcprototype>
56        <funcdef>
57const char *
58<function>lwres_net_ntop</function></funcdef>
59        <paramdef>int <parameter>af</parameter></paramdef>
60        <paramdef>const void *<parameter>src</parameter></paramdef>
61        <paramdef>char *<parameter>dst</parameter></paramdef>
62        <paramdef>size_t <parameter>size</parameter></paramdef>
63      </funcprototype>
64</funcsynopsis>
65  </refsynopsisdiv>
66
67  <refsect1>
68    <title>DESCRIPTION</title>
69
70    <para><function>lwres_net_ntop()</function>
71      converts an IP address of protocol family
72      <parameter>af</parameter> &mdash; IPv4 or IPv6 &mdash; at
73      location <parameter>src</parameter> from network format to its
74      conventional representation as a string.  For IPv4 addresses,
75      that string would be a dotted-decimal.  An IPv6 address would be
76      represented in colon notation as described in RFC1884.
77    </para>
78
79    <para>
80      The generated string is copied to <parameter>dst</parameter>
81      provided
82      <parameter>size</parameter> indicates it is long enough to
83      store the
84      ASCII representation of the address.
85    </para>
86
87  </refsect1>
88  <refsect1>
89    <title>RETURN VALUES</title>
90
91    <para>
92      If successful, the function returns <parameter>dst</parameter>:
93      a pointer to a string containing the presentation format of the
94      address.  <function>lwres_net_ntop()</function> returns
95      <type>NULL</type> and sets the global variable
96      <constant>errno</constant> to <errorcode>EAFNOSUPPORT</errorcode> if
97      the protocol family given in <parameter>af</parameter> is
98      not
99      supported.
100    </para>
101
102  </refsect1>
103  <refsect1>
104    <title>SEE ALSO</title>
105    <para><citerefentry>
106        <refentrytitle>RFC1884</refentrytitle>
107      </citerefentry>,
108      <citerefentry>
109        <refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
110      </citerefentry>,
111      <citerefentry>
112        <refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>
113      </citerefentry>.
114    </para>
115  </refsect1>
116</refentry><!--
117 - Local variables:
118 - mode: sgml
119 - End:
120-->
121