/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 121 lines · 110 code · 11 blank · 0 comment · 0 complexity · 31dc9278e4aa78dcbb2783d11848dba5 MD5 · raw file

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