lwres_inetntop.docbook revision 86b0285d7e65601645db4090d62ee6cb63abad6c
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - Copyright (C) 2001 Internet Software Consortium.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - Permission to use, copy, modify, and distribute this software for any
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - copyright notice and this permission notice appear in all copies.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson<!-- $Id: lwres_inetntop.docbook,v 1.3 2001/06/18 22:06:59 gson Exp $ -->
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</refentryinfo>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<refentrytitle>lwres_inetntop</refentrytitle>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<refpurpose>lightweight resolver IP address presentation</refpurpose>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<refsynopsisdiv>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcsynopsisinfo>#include <lwres/net.h></funcsynopsisinfo>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_net_ntop</function></funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</funcsynopsis>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</refsynopsisdiv>
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson<function>lwres_net_ntop()</function> converts an IP address of
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonprotocol family <parameter>af</parameter> — IPv4 or IPv6 —
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonat location <parameter>src</parameter> from network format to its
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonconventional representation as a string. For IPv4 addresses, that
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonstring would be a dotted-decimal. An IPv6 address would be
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonrepresented in colon notation as described in RFC1884.
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonThe generated string is copied to <parameter>dst</parameter> provided
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson<parameter>size</parameter> indicates it is long enough to store the
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonASCII representation of the address.
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonIf successful, the function returns <parameter>dst</parameter>:
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssona pointer to a string containing the presentation format of the
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonaddress. <function>lwres_net_ntop()</function> returns
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson<type>NULL</type> and sets the global variable
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson<constant>errno</constant> to <errorcode>EAFNOSUPPORT</errorcode> if
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonthe protocol family given in <parameter>af</parameter> is not
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</citerefentry>,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</citerefentry>,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</citerefentry>.