]> git.ipfire.org Git - people/ms/strongswan.git/blob - lib/liblwres/man/lwres_inetntop.docbook
- fixed stroke error output to starter
[people/ms/strongswan.git] / lib / liblwres / man / lwres_inetntop.docbook
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <!--
3 - Copyright (C) 2001 Internet Software Consortium.
4 -
5 - Permission to use, copy, modify, and 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.
8 -
9 - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
10 - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
11 - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
12 - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
13 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
14 - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15 - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
16 - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 -->
18
19 <!-- $Id: lwres_inetntop.docbook,v 1.1 2004/03/15 20:35:25 as 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>