Bv9ARM.ch12.html revision fa535fa05f36a1a45027faf9d116cfa3249d9d72
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - Copyright (C) 2000-2003 Internet Software Consortium.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - Permission to use, copy, modify, and/or distribute this software for any
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - purpose with or without fee is hereby granted, provided that the above
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - copyright notice and this permission notice appear in all copies.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - PERFORMANCE OF THIS SOFTWARE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<title>Appendix�D.�BIND 9 DNS Library Support</title>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<link rel="prev" href="Bv9ARM.ch11.html" title="Appendix�C.�General DNS Reference Information">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<link rel="next" href="Bv9ARM.ch13.html" title="Manual pages">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<table width="100%" summary="Navigation header">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<tr><th colspan="3" align="center">Appendix�D.�BIND 9 DNS Library Support</th></tr>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h2 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="Bv9ARM.ch12"></a>Appendix�D.�BIND 9 DNS Library Support</h2></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616563">Prerequisite</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616572">Compilation</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614344">Installation</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614375">Known Defects/Restrictions</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614930">The dns.conf File</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614956">Sample Applications</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616202">Library References</a></span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h2 class="title" style="clear: both">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="bind9.library"></a>BIND 9 DNS Library Support</h2></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>This version of BIND 9 "exports" its internal libraries so
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis that they can be used by third-party applications more easily (we
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis call them "export" libraries in this document). In addition to
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis all major DNS-related APIs BIND 9 is currently using, the export
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis libraries provide the following features:</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>The newly created "DNS client" module. This is a higher
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis level API that provides an interface to name resolution,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis single DNS transaction with a particular server, and dynamic
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis update. Regarding name resolution, it supports advanced
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis features such as DNSSEC validation and caching. This module
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis supports both synchronous and asynchronous mode.</p></li>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>The new "IRS" (Information Retrieval System) library.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis It provides an interface to parse the traditional resolv.conf
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis file and more advanced, DNS-specific configuration file for
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the rest of this package (see the description for the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>As part of the IRS library, newly implemented standard
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis address-name mapping functions, getaddrinfo() and
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis getnameinfo(), are provided. They use the DNSSEC-aware
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis validating resolver backend, and could use other advanced
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis features of the BIND 9 libraries such as caching. The
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis getaddrinfo() function resolves both A and AAAA RRs
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis concurrently (when the address family is unspecified).</p></li>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>An experimental framework to support other event
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis libraries than BIND 9's internal event task system.</p></li>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2616563"></a>Prerequisite</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>GNU make is required to build the export libraries (other
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis part of BIND 9 can still be built with other types of make). In
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the reminder of this document, "make" means GNU make. Note that
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis in some platforms you may need to invoke a different command name
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis than "make" (e.g. "gmake") to indicate it's GNU make.</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2616572"></a>Compilation</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>make</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis This will create (in addition to usual BIND 9 programs) and a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis separate set of libraries under the lib/export directory. For
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis example, <code class="filename">lib/export/dns/libdns.a</code> is the archive file of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis export version of the BIND 9 DNS library. Sample application
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis programs using the libraries will also be built under the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis lib/export/samples directory (see below).</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2614344"></a>Installation</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>cd lib/export</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>make install</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis This will install library object files under the directory
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specified by the --with-export-libdir configure option (default:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis EPREFIX/lib/bind9), and header files under the directory
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specified by the --with-export-includedir configure option
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Root privilege is normally required.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis "<span><strong class="command">make install</strong></span>" at the top directory will do the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis To see how to build your own
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis application after the installation, see
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis <code class="filename">lib/export/samples/Makefile-postinstall.in</code>.</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2614375"></a>Known Defects/Restrictions</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>Currently, win32 is not supported for the export
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis library. (Normal BIND 9 application can be built as
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>The "fixed" RRset order is not (currently) supported in
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the export library. If you want to use "fixed" RRset order
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis for, e.g. <span><strong class="command">named</strong></span> while still building the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis export library even without the fixed order support, build
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis them separately:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>/configure --enable-fixed-rrset <em class="replaceable"><code>[other flags, but not --enable-exportlib]</code></em></code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>make</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags, but not --enable-fixed-rrset]</code></em></code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>cd lib/export</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>make</code></strong>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>The client module and the IRS library currently do not
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis support DNSSEC validation using DLV (the underlying modules
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis can handle it, but there is no tunable interface to enable
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>RFC 5011 is not supported in the validating stub
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis resolver of the export library. In fact, it is not clear
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis whether it should: trust anchors would be a system-wide
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis configuration which would be managed by an administrator,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis while the stub resolver will be used by ordinary applications
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<li><p>Not all common <code class="filename">/etc/resolv.conf</code>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis options are supported
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis in the IRS library. The only available options in this
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2614930"></a>The dns.conf File</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>The IRS library supports an "advanced" configuration file
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis related to the DNS library for configuration parameters that
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis would be beyond the capability of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis <code class="filename">resolv.conf</code> file.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Specifically, it is intended to provide DNSSEC related
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis configuration parameters. By default the path to this
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis configuration file is <code class="filename">/etc/dns.conf</code>.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis This module is very
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis experimental and the configuration syntax or library interfaces
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis may change in future versions. Currently, only the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis <span><strong class="command">trusted-keys</strong></span>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis statement is supported, whose syntax is the same as the same name
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis of statement for <code class="filename">named.conf</code>. (See
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis <a href="Bv9ARM.ch06.html#trusted-keys" title="trusted-keys Statement Grammar">the section called “<span><strong class="command">trusted-keys</strong></span> Statement Grammar”</a> for details.)</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2614956"></a>Sample Applications</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>Some sample application programs using this API are
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis provided for reference. The following is a brief description of
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis these applications.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2614965"></a>sample: a simple stub resolver utility</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis It sends a query of a given name (of a given optional RR type) to a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specified recursive server, and prints the result as a list of
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis RRs. It can also act as a validating stub resolver if a trust
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis anchor is given via a set of command line options.</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: sample [options] server_address hostname
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Options and Arguments:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify the RR type of the query. The default is the A RR.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis [-a algorithm] [-e] -k keyname -K keystring
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify a command-line DNS key to validate the answer. For
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis example, to specify the following DNSKEY of example.com:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis����������������example.com.�3600�IN�DNSKEY�257�3�5�xxx<br>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify the options as follows:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -e means that this key is a zone's "key signing key" (as known
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis as "secure Entry point").
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis When -a is omitted rsasha1 will be used by default.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -s domain:alt_server_address
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify a separate recursive server address for the specific
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis "domain". Example: -s example.com:2001:db8::1234
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="term">server_address</span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis an IP(v4/v6) address of the recursive server to which queries
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<dt><span class="term">hostname</span></dt>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the domain name for the query
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2615056"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Similar to "sample", but accepts a list
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis of (query) domain names as a separate file and resolves the names
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis asynchronously.</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: sample-async [-s server_address] [-t RR_type] input_file</p>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Options and Arguments:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -s server_address
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis an IPv4 address of the recursive server to which queries are sent.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis (IPv6 addresses are not supported in this implementation)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify the RR type of the queries. The default is the A
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis a list of domain names to be resolved. each line
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis consists of a single domain name. Example:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2615109"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis It sends a query to a specified server, and
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis prints the response with minimal processing. It doesn't act as a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis "stub resolver": it stops the processing once it gets any
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis response from the server, whether it's a referral or an alias
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis (CNAME or DNAME) that would require further queries to get the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis ultimate answer. In other words, this utility acts as a very
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis simplified <span><strong class="command">dig</strong></span>.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: sample-request [-t RRtype] server_address hostname
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Options and Arguments:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify the RR type of
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the queries. The default is the A RR.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis server_address
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis address of the recursive server to which the query is sent.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the domain name for the query
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2615173"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis This is a test program
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis to check getaddrinfo() and getnameinfo() behavior. It takes a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis host name as an argument, calls getaddrinfo() with the given host
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis name, and calls getnameinfo() with the resulting IP addresses
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis returned by getaddrinfo(). If the dns.conf file exists and
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis defines a trust anchor, the underlying resolver will act as a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis validating resolver, and getaddrinfo()/getnameinfo() will fail
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis with an EAI_INSECUREDATA error when DNSSEC validation fails.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: sample-gai hostname
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2615188"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis It accepts a single update command as a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis command-line argument, sends an update request message to the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis authoritative server, and shows the response from the server. In
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis other words, this is a simplified <span><strong class="command">nsupdate</strong></span>.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: sample-update [options] (add|delete) "update data"
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Options and Arguments:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -a auth_server
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis An IP address of the authoritative server that has authority
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis for the zone containing the update name. This should normally
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis be the primary authoritative server that accepts dynamic
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis updates. It can also be a secondary server that is configured
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis to forward update requests to the primary server.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis A TSIG key file to secure the update transaction. The keyfile
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis format is the same as that for the nsupdate utility.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -p prerequisite
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis A prerequisite for the update (only one prerequisite can be
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specified). The prerequisite format is the same as that is
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis accepted by the nsupdate utility.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -r recursive_server
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis An IP address of a recursive server that this utility will
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis use. A recursive server may be necessary to identify the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis authoritative server address to which the update request is
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis The domain name of the zone that contains
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Specify the type of update operation. Either "add" or "delete"
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis must be specified.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Specify the data to be updated. A typical example of the data
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis would look like "name TTL RRtype RDATA".
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<h3 class="title">Note</h3>In practice, either -a or -r must be specified. Others can
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis be optional; the underlying library routine tries to identify the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis appropriate server and the zone name for the update.</div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Examples: assuming the primary authoritative server of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis dynamic.example.com zone has an IPv6 address 2001:db8::1234,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key add "foo.dynamic.example.com 30 IN A 192.168.2.1"</code></strong></pre>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis adds an A RR for foo.dynamic.example.com using the given key.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key delete "foo.dynamic.example.com 30 IN A"</code></strong></pre>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis removes all A RRs for foo.dynamic.example.com using the given key.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key delete "foo.dynamic.example.com"</code></strong></pre>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis removes all RRs for foo.dynamic.example.com using the given key.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h4 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2616138"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis It checks a set
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis of domains to see the name servers of the domains behave
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis correctly in terms of RFC 4074. This is included in the set of
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis sample programs to show how the export library can be used in a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis DNS-related application.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Usage: nsprobe [-d] [-v [-v...]] [-c cache_address] [input_file]
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis run in the "debug" mode. with this option nsprobe will dump
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis every RRs it receives.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis increase verbosity of other normal log messages. This can be
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specified multiple times
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -c cache_address
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specify an IP address of a recursive (caching) name server.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis nsprobe uses this server to get the NS RRset of each domain and
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the A and/or AAAA RRsets for the name servers. The default
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis value is 127.0.0.1.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis a file name containing a list of domain (zone) names to be
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis probed. when omitted the standard input will be used. Each
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis line of the input file specifies a single domain name such as
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis "example.com". In general this domain name must be the apex
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis name of some DNS zone (unlike normal "host names" such as
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis "www.example.com"). nsprobe first identifies the NS RRsets for
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the given domain name, and sends A and AAAA queries to these
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis servers for some "widely used" names under the zone;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis specifically, adding "www" and "ftp" to the zone name.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<div class="titlepage"><div><div><h3 class="title">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a name="id2616202"></a>Library References</h3></div></div></div>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p>As of this writing, there is no formal "manual" of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis libraries, except this document, header files (some of them
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis provide pretty detailed explanations), and sample application
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<table width="100%" summary="Navigation footer">
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<td width="40%" align="left" valign="top">Appendix�C.�General <acronym class="acronym">DNS</acronym> Reference Information�</td>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<td width="40%" align="right" valign="top">�Manual pages</td>
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis<p style="text-align: center;">BIND 9.11.0pre-alpha</p>