Bv9ARM.ch12.html revision d9184858dd5d7677050a813d444c281c56f697aa
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Copyright (C) 2000-2003 Internet Software Consortium.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - Permission to use, copy, modify, and/or distribute this software for any
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - purpose with or without fee is hereby granted, provided that the above
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - copyright notice and this permission notice appear in all copies.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster - PERFORMANCE OF THIS SOFTWARE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<!-- $Id$ -->
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<title>Appendix�D.�BIND 9 DNS Library Support</title>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<link rel="prev" href="Bv9ARM.ch11.html" title="Appendix�C.�General DNS Reference Information">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<link rel="next" href="Bv9ARM.ch13.html" title="Manual pages">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<table width="100%" summary="Navigation header">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<tr><th colspan="3" align="center">Appendix�D.�BIND 9 DNS Library Support</th></tr>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<div class="titlepage"><div><div><h2 class="title">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<a name="Bv9ARM.ch12"></a>Appendix�D.�BIND 9 DNS Library Support</h2></div></div></div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614528">Prerequisite</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614537">Compilation</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613401">Installation</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613432">Known Defects/Restrictions</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613645">The dns.conf File</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613740">Sample Applications</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614986">Library References</a></span></dt>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<a name="bind9.library"></a>BIND 9 DNS Library Support</h2></div></div></div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<p>This version of BIND 9 "exports" its internal libraries so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster that they can be used by third-party applications more easily (we
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster call them "export" libraries in this document). In addition to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster all major DNS-related APIs BIND 9 is currently using, the export
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster libraries provide the following features:</p>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<li><p>The newly created "DNS client" module. This is a higher
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster level API that provides an interface to name resolution,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster single DNS transaction with a particular server, and dynamic
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster update. Regarding name resolution, it supports advanced
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster features such as DNSSEC validation and caching. This module
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster supports both synchronous and asynchronous mode.</p></li>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<li><p>The new "IRS" (Information Retrieval System) library.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster It provides an interface to parse the traditional resolv.conf
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster file and more advanced, DNS-specific configuration file for
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster the rest of this package (see the description for the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<li><p>As part of the IRS library, newly implemented standard
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster address-name mapping functions, getaddrinfo() and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster getnameinfo(), are provided. They use the DNSSEC-aware
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster validating resolver backend, and could use other advanced
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster features of the BIND 9 libraries such as caching. The
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster getaddrinfo() function resolves both A and AAAA RRs
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster concurrently (when the address family is unspecified).</p></li>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<li><p>An experimental framework to support other event
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster libraries than BIND 9's internal event task system.</p></li>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<div class="titlepage"><div><div><h3 class="title">
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<a name="id2614528"></a>Prerequisite</h3></div></div></div>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster<p>GNU make is required to build the export libraries (other
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster part of BIND 9 can still be built with other types of make). In
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster the reminder of this document, "make" means GNU make. Note that
$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
$ <strong class="userinput"><code>/configure --enable-fixed-rrset <em class="replaceable"><code>[other flags, but not --enable-exportlib]</code></em></code></strong>
$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags, but not --enable-fixed-rrset]</code></em></code></strong>
<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>
example, to specify the following DNSKEY of example.com:
-e -k example.com -K "xxx"
"domain". Example: -s example.com:2001:db8::1234
<a name="id2613840"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
<a name="id2614298"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
returned by getaddrinfo(). If the dns.conf file exists and
<a name="id2614313"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
dynamic.example.com zone has an IPv6 address 2001:db8::1234,
$ <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>
adds an A RR for foo.dynamic.example.com using the given key.
$ <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>
removes all A RRs for foo.dynamic.example.com using the given key.
$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key delete "foo.dynamic.example.com"</code></strong></pre>
removes all RRs for foo.dynamic.example.com using the given key.
<a name="id2614854"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
"example.com". In general this domain name must be the apex
"www.example.com"). nsprobe first identifies the NS RRsets for