Bv9ARM.ch12.html revision e9ed929fd1a190f29391be9c7ae324e7e56ff9c9
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - Copyright (C) 2000-2003 Internet Software Consortium.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - Permission to use, copy, modify, and/or distribute this software for any
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner - purpose with or without fee is hereby granted, provided that the above
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - copyright notice and this permission notice appear in all copies.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - PERFORMANCE OF THIS SOFTWARE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<!-- $Id$ -->
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<link rel="prev" href="Bv9ARM.ch11.html" title="Appendix�C.�General DNS Reference Information">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<link rel="next" href="Bv9ARM.ch13.html" title="Manual pages">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<tr><th colspan="3" align="center">Appendix�D.�BIND 9 DNS Library Support</th></tr>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<a name="Bv9ARM.ch12"></a>Appendix�D.�BIND 9 DNS Library Support</h2></div></div></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2615562">Prerequisite</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614002">Compilation</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614026">Installation</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614057">Known Defects/Restrictions</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614134">The dns.conf File</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614161">Sample Applications</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2615680">Library References</a></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<div class="titlepage"><div><div><h2 class="title" style="clear: both">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<a name="bind9.library"></a>BIND 9 DNS Library Support</h2></div></div></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<p>This version of BIND 9 "exports" its internal libraries so
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin that they can be used by third-party applications more easily (we
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin call them "export" libraries in this document). In addition to
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin all major DNS-related APIs BIND 9 is currently using, the export
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin libraries provide the following features:</p>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<li><p>The newly created "DNS client" module. This is a higher
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin level API that provides an interface to name resolution,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin single DNS transaction with a particular server, and dynamic
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin update. Regarding name resolution, it supports advanced
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin features such as DNSSEC validation and caching. This module
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin supports both synchronous and asynchronous mode.</p></li>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<li><p>The new "IRS" (Information Retrieval System) library.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin It provides an interface to parse the traditional resolv.conf
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin file and more advanced, DNS-specific configuration file for
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the rest of this package (see the description for the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<li><p>As part of the IRS library, newly implemented standard
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin address-name mapping functions, getaddrinfo() and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin getnameinfo(), are provided. They use the DNSSEC-aware
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin validating resolver backend, and could use other advanced
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin features of the BIND 9 libraries such as caching. The
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin getaddrinfo() function resolves both A and AAAA RRs
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin concurrently (when the address family is unspecified).</p></li>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin libraries than BIND 9's internal event task system.</p></li>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<a name="id2615562"></a>Prerequisite</h3></div></div></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<p>GNU make is required to build the export libraries (other
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin part of BIND 9 can still be built with other types of make). In
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the reminder of this document, "make" means GNU make. Note that
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin in some platforms you may need to invoke a different command name
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin than "make" (e.g. "gmake") to indicate it's GNU make.</p>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<a name="id2614002"></a>Compilation</h3></div></div></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin This will create (in addition to usual BIND 9 programs) and a
$ <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="id2614260"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
<a name="id2615401"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
returned by getaddrinfo(). If the dns.conf file exists and
<a name="id2615416"></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="id2615616"></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