lwres_inetntop.docbook revision c651f15b30f1dae5cc2f00878fb5da5b3a35a468
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2000, 2001 Internet Software Consortium.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson - Permission to use, copy, modify, and distribute this software for any
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - copyright notice and this permission notice appear in all copies.
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!-- $Id: lwres_inetntop.docbook,v 1.5 2005/04/07 03:50:03 marka Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<refentryinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</refentryinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<refpurpose>lightweight resolver IP address presentation</refpurpose>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</refnamediv>
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews<refsynopsisdiv>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<funcsynopsis>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<funcsynopsisinfo>#include <lwres/net.h></funcsynopsisinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<funcprototype>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</funcprototype>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</funcsynopsis>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</refsynopsisdiv>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<function>lwres_net_ntop()</function> converts an IP address of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinprotocol family <parameter>af</parameter> — IPv4 or IPv6 —
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinat location <parameter>src</parameter> from network format to its
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinconventional representation as a string. For IPv4 addresses, that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinstring would be a dotted-decimal. An IPv6 address would be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinrepresented in colon notation as described in RFC1884.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThe generated string is copied to <parameter>dst</parameter> provided
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<parameter>size</parameter> indicates it is long enough to store the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinASCII representation of the address.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinIf successful, the function returns <parameter>dst</parameter>:
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrewsa pointer to a string containing the presentation format of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinaddress. <function>lwres_net_ntop()</function> returns
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<constant>errno</constant> to <errorcode>EAFNOSUPPORT</errorcode> if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinthe protocol family given in <parameter>af</parameter> is not
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<citerefentry>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</citerefentry>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<citerefentry>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</citerefentry>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<citerefentry>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</citerefentry>.