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