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