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