Bv9ARM.ch12.html revision 5d564da348e890e42f63eebf2dced9a05b41f4fb
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - Copyright (C) 2000-2003 Internet Software Consortium.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - Permission to use, copy, modify, and/or distribute this software for any
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - copyright notice and this permission notice appear in all copies.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<title>Appendix�D.�BIND 9 DNS Library Support</title>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<link rel="prev" href="Bv9ARM.ch11.html" title="Appendix�C.�General DNS Reference Information">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<link rel="next" href="Bv9ARM.ch13.html" title="Manual pages">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<table width="100%" summary="Navigation header">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<tr><th colspan="3" align="center">Appendix�D.�BIND 9 DNS Library Support</th></tr>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<div class="titlepage"><div><div><h2 class="title">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<a name="Bv9ARM.ch12"></a>Appendix�D.�BIND 9 DNS Library Support</h2></div></div></div>
785cb9cf4f6f42d4e1da4bf27aaf750a021be13dMichael Sawyer<dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616167">Prerequisite</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616177">Compilation</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613266">Installation</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2613297">Known Defects/Restrictions</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614670">The dns.conf File</a></span></dt>
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2614697">Sample Applications</a></span></dt>
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas Gustafsson<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2616284">Library References</a></span></dt>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<div class="titlepage"><div><div><h2 class="title" style="clear: both">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<a name="bind9.library"></a>BIND 9 DNS Library Support</h2></div></div></div>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<p>This version of BIND 9 "exports" its internal libraries so
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson that they can be used by third-party applications more easily (we
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson call them "export" libraries in this document). In addition to
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson all major DNS-related APIs BIND 9 is currently using, the export
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson libraries provide the following features:</p>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<div class="itemizedlist"><ul type="disc">
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<li><p>The newly created "DNS client" module. This is a higher
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson level API that provides an interface to name resolution,
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson single DNS transaction with a particular server, and dynamic
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson update. Regarding name resolution, it supports advanced
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson features such as DNSSEC validation and caching. This module
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson supports both synchronous and asynchronous mode.</p></li>
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<li><p>The new "IRS" (Information Retrieval System) library.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson It provides an interface to parse the traditional resolv.conf
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson file and more advanced, DNS-specific configuration file for
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson the rest of this package (see the description for the
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson<li><p>As part of the IRS library, newly implemented standard
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson address-name mapping functions, getaddrinfo() and
$ <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="id2614796"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
<a name="id2614982"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
returned by getaddrinfo(). If the dns.conf file exists and
<a name="id2614997"></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="id2616220"></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