1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
3 - Copyright (C) 2001 Internet Software Consortium.
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.
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.
19 <!-- $Id: lwres_inetntop.docbook,v 1.1 2004/03/15 20:35:25 as Exp $ -->
24 <date>Jun 30, 2000</date>
28 <refentrytitle>lwres_inetntop</refentrytitle>
29 <manvolnum>3</manvolnum>
30 <refmiscinfo>BIND9</refmiscinfo>
34 <refname>lwres_net_ntop</refname>
35 <refpurpose>lightweight resolver IP address presentation</refpurpose>
39 <funcsynopsisinfo>#include <lwres/net.h></funcsynopsisinfo>
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>
53 <title>DESCRIPTION</title>
56 <function>lwres_net_ntop()</function> converts an IP address of
57 protocol family <parameter>af</parameter> — IPv4 or IPv6 —
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.
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.
72 <title>RETURN VALUES</title>
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
86 <title>SEE ALSO</title>
89 <refentrytitle>RFC1884</refentrytitle>
92 <refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
95 <refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>