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