summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/dns/include
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/dns/include')
-rw-r--r--contrib/bind9/lib/dns/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/include/dns/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/include/dns/acache.h445
-rw-r--r--contrib/bind9/lib/dns/include/dns/acl.h41
-rw-r--r--contrib/bind9/lib/dns/include/dns/adb.h289
-rw-r--r--contrib/bind9/lib/dns/include/dns/bit.h6
-rw-r--r--contrib/bind9/lib/dns/include/dns/byaddr.h72
-rw-r--r--contrib/bind9/lib/dns/include/dns/cache.h104
-rw-r--r--contrib/bind9/lib/dns/include/dns/callbacks.h26
-rw-r--r--contrib/bind9/lib/dns/include/dns/cert.h30
-rw-r--r--contrib/bind9/lib/dns/include/dns/compress.h143
-rw-r--r--contrib/bind9/lib/dns/include/dns/db.h626
-rw-r--r--contrib/bind9/lib/dns/include/dns/dbiterator.h133
-rw-r--r--contrib/bind9/lib/dns/include/dns/dbtable.h77
-rw-r--r--contrib/bind9/lib/dns/include/dns/diff.h105
-rw-r--r--contrib/bind9/lib/dns/include/dns/dispatch.h190
-rw-r--r--contrib/bind9/lib/dns/include/dns/dlz.h290
-rw-r--r--contrib/bind9/lib/dns/include/dns/dnssec.h122
-rw-r--r--contrib/bind9/lib/dns/include/dns/ds.h27
-rw-r--r--contrib/bind9/lib/dns/include/dns/events.h11
-rw-r--r--contrib/bind9/lib/dns/include/dns/fixedname.h19
-rw-r--r--contrib/bind9/lib/dns/include/dns/forward.h59
-rw-r--r--contrib/bind9/lib/dns/include/dns/journal.h81
-rw-r--r--contrib/bind9/lib/dns/include/dns/keyflags.h18
-rw-r--r--contrib/bind9/lib/dns/include/dns/keytable.h126
-rw-r--r--contrib/bind9/lib/dns/include/dns/keyvalues.h60
-rw-r--r--contrib/bind9/lib/dns/include/dns/lib.h12
-rw-r--r--contrib/bind9/lib/dns/include/dns/log.h21
-rw-r--r--contrib/bind9/lib/dns/include/dns/lookup.h55
-rw-r--r--contrib/bind9/lib/dns/include/dns/master.h151
-rw-r--r--contrib/bind9/lib/dns/include/dns/masterdump.h139
-rw-r--r--contrib/bind9/lib/dns/include/dns/message.h603
-rw-r--r--contrib/bind9/lib/dns/include/dns/name.h673
-rw-r--r--contrib/bind9/lib/dns/include/dns/ncache.h73
-rw-r--r--contrib/bind9/lib/dns/include/dns/nsec.h20
-rw-r--r--contrib/bind9/lib/dns/include/dns/opcode.h18
-rw-r--r--contrib/bind9/lib/dns/include/dns/order.h46
-rw-r--r--contrib/bind9/lib/dns/include/dns/peer.h40
-rw-r--r--contrib/bind9/lib/dns/include/dns/portlist.h52
-rw-r--r--contrib/bind9/lib/dns/include/dns/rbt.h478
-rw-r--r--contrib/bind9/lib/dns/include/dns/rcode.h50
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdata.h365
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdataclass.h36
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdatalist.h41
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdataset.h342
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdatasetiter.h67
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdataslab.h66
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdatatype.h36
-rw-r--r--contrib/bind9/lib/dns/include/dns/request.h169
-rw-r--r--contrib/bind9/lib/dns/include/dns/resolver.h232
-rw-r--r--contrib/bind9/lib/dns/include/dns/result.h12
-rw-r--r--contrib/bind9/lib/dns/include/dns/rootns.h14
-rw-r--r--contrib/bind9/lib/dns/include/dns/sdb.h27
-rw-r--r--contrib/bind9/lib/dns/include/dns/sdlz.h266
-rw-r--r--contrib/bind9/lib/dns/include/dns/secalg.h34
-rw-r--r--contrib/bind9/lib/dns/include/dns/secproto.h34
-rw-r--r--contrib/bind9/lib/dns/include/dns/soa.h7
-rw-r--r--contrib/bind9/lib/dns/include/dns/ssu.h86
-rw-r--r--contrib/bind9/lib/dns/include/dns/stats.h28
-rw-r--r--contrib/bind9/lib/dns/include/dns/tcpmsg.h50
-rw-r--r--contrib/bind9/lib/dns/include/dns/time.h14
-rw-r--r--contrib/bind9/lib/dns/include/dns/timer.h10
-rw-r--r--contrib/bind9/lib/dns/include/dns/tkey.h94
-rw-r--r--contrib/bind9/lib/dns/include/dns/tsig.h160
-rw-r--r--contrib/bind9/lib/dns/include/dns/ttl.h24
-rw-r--r--contrib/bind9/lib/dns/include/dns/types.h57
-rw-r--r--contrib/bind9/lib/dns/include/dns/validator.h4
-rw-r--r--contrib/bind9/lib/dns/include/dns/version.h6
-rw-r--r--contrib/bind9/lib/dns/include/dns/view.h369
-rw-r--r--contrib/bind9/lib/dns/include/dns/xfrin.h22
-rw-r--r--contrib/bind9/lib/dns/include/dns/zone.h887
-rw-r--r--contrib/bind9/lib/dns/include/dns/zonekey.h8
-rw-r--r--contrib/bind9/lib/dns/include/dns/zt.h98
-rw-r--r--contrib/bind9/lib/dns/include/dst/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/include/dst/dst.h372
-rw-r--r--contrib/bind9/lib/dns/include/dst/gssapi.h6
-rw-r--r--contrib/bind9/lib/dns/include/dst/lib.h6
-rw-r--r--contrib/bind9/lib/dns/include/dst/result.h6
78 files changed, 5763 insertions, 3829 deletions
diff --git a/contrib/bind9/lib/dns/include/Makefile.in b/contrib/bind9/lib/dns/include/Makefile.in
index 92dfb3b..593ad5a 100644
--- a/contrib/bind9/lib/dns/include/Makefile.in
+++ b/contrib/bind9/lib/dns/include/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.11.206.2 2004/12/09 04:07:19 marka Exp $
+# $Id: Makefile.in,v 1.12.18.1 2004/12/09 04:41:46 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/contrib/bind9/lib/dns/include/dns/Makefile.in b/contrib/bind9/lib/dns/include/dns/Makefile.in
index 267bc8d..3f367bc 100644
--- a/contrib/bind9/lib/dns/include/dns/Makefile.in
+++ b/contrib/bind9/lib/dns/include/dns/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.43.2.1.10.6 2004/03/08 09:04:34 marka Exp $
+# $Id: Makefile.in,v 1.50 2004/03/05 05:09:40 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/contrib/bind9/lib/dns/include/dns/acache.h b/contrib/bind9/lib/dns/include/dns/acache.h
new file mode 100644
index 0000000..50d7fc1
--- /dev/null
+++ b/contrib/bind9/lib/dns/include/dns/acache.h
@@ -0,0 +1,445 @@
+/*
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: acache.h,v 1.3.2.4 2006/05/03 00:07:49 marka Exp $ */
+
+#ifndef DNS_ACACHE_H
+#define DNS_ACACHE_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * Acache
+ *
+ * The Additional Cache Object
+ *
+ * This module manages internal caching entries that correspond to
+ * the additional section data of a DNS DB node (an RRset header, more
+ * accurately). An additional cache entry is expected to be (somehow)
+ * attached to a particular RR in a particular DB node, and contains a set
+ * of information of an additional data for the DB node.
+ *
+ * An additional cache object is intended to be created as a per-view
+ * object, and manages all cache entries within the view.
+ *
+ * The intended usage of the additional caching is to provide a short cut
+ * to additional glue RRs of an NS RR. For each NS RR, it is often
+ * necessary to look for glue RRs to make a proper response. Once the
+ * glue RRs are known, the additional caching allows the client to
+ * associate the information to the original NS RR so that further
+ * expensive lookups can be avoided for the NS RR.
+ *
+ * Each additional cache entry contains information to identify a
+ * particular DB node and (optionally) an associated RRset. The
+ * information consists of its zone, database, the version of the
+ * database, database node, and RRset.
+ *
+ * A "negative" information can also be cached. For example, if a glue
+ * RR does not exist as an authoritative data in the same zone as that
+ * of the NS RR, this fact can be cached by specifying a NULL pointer
+ * for the database, version, and node. (See the description for
+ * dns_acache_getentry() below for more details.)
+ *
+ * Since each member stored in an additional cache entry holds a reference
+ * to a corresponding object, a stale cache entry may cause unnecessary
+ * memory consumption. For instance, when a zone is reloaded, additional
+ * cache entries that have a reference to the zone (and its DB and/or
+ * DB nodes) can delay the cleanup of the referred objects. In order to
+ * minimize such a bad effect, this module provides several cleanup
+ * mechanisms.
+ *
+ * The first one is a shutdown procedure called when the associated view
+ * is shut down. In this case, dns_acache_shutdown() will be called and
+ * all cache entries will be purged. This mechanism will help the
+ * situation when the configuration is reloaded or the main server is
+ * stopped.
+ *
+ * Per-DB cleanup mechanism is also provided. Each additional cache entry
+ * is associated with related DB, which is expected to have been
+ * registered when the DB was created by dns_acache_setdb(). If a
+ * particular DB is going to be destroyed, the primary holder of the DB,
+ * a typical example of which is a zone, will call dns_acache_putdb().
+ * Then this module will clean-up all cache entries associated with the
+ * DB. This mechanism is effective when a secondary zone DB is going to
+ * be stale after a zone transfer.
+ *
+ * Finally, this module supports for periodic clean-up of stale entries.
+ * Each cache entry has a timestamp field, which is updated every time
+ * the entry is referred. A periodically invoked cleaner checks the
+ * timestamp of each entry, and purge entries that have not been referred
+ * for a certain period. The cleaner interval can be specified by
+ * dns_acache_setcleaninginterval(). If the periodic clean-up is not
+ * enough, it is also possible to specify the upper limit of entries
+ * in terms of the memory consumption. If the maximum value is
+ * specified, the cleaner is invoked when the memory consumption reaches
+ * the high watermark inferred from the maximum value. In this case,
+ * the cleaner will use more aggressive algorithm to decide the "victim"
+ * entries. The maximum value can be specified by
+ * dns_acache_setcachesize().
+ *
+ * When a cache entry is going to be purged within this module, the
+ * callback function specified at the creation time will be called.
+ * The callback function is expected to release all internal resources
+ * related to the entry, which will typically be specific to DB
+ * implementation, and to call dns_acache_detachentry(). The callback
+ * mechanism is very important, since the holder of an additional cache
+ * entry may not be able to initiate the clean-up of the entry, due to
+ * the reference ordering. For example, as long as an additional cache
+ * entry has a reference to a DB object, the DB cannot be freed, in which
+ * a DB node may have a reference to the cache entry.
+ *
+ * Credits:
+ * The basic idea of this kind of short-cut for frequently used
+ * information is similar to the "pre-compiled answer" approach adopted
+ * in nsd by NLnet LABS with RIPE NCC. Our work here is an independent
+ * effort, but the success of nsd encouraged us to pursue this path.
+ *
+ * The design and implementation of the periodic memory management and
+ * the upper limitation of memory consumption was derived from the cache
+ * DB implementation of BIND9.
+ *
+ * MP:
+ * There are two main locks in this module. One is for each entry, and
+ * the other is for the additional cache object.
+ *
+ * Reliability:
+ * The callback function for a cache entry is called with holding the
+ * entry lock. Thus, it implicitly assumes the callback function does not
+ * call a function that can require the lock. Typically, the only
+ * function that can be called from the callback function safely is
+ * dns_acache_detachentry(). The breakage of this implicit assumption
+ * may cause a deadlock.
+ *
+ * Resources:
+ * In a 32-bit architecture (such as i386), the following additional
+ * memory is required comparing to the case that disables this module.
+ * - 76 bytes for each additional cache entry
+ * - if the entry has a DNS name and associated RRset,
+ * * 44 bytes + size of the name (1-255 bytes)
+ * * 52 bytes x number_of_RRs
+ * - 28 bytes for each DB related to this module
+ *
+ * Using the additional cache also requires extra memory consumption in
+ * the DB implementation. In the current implementation for rbtdb, we
+ * need:
+ * - two additional pointers for each DB node (8 bytes for a 32-bit
+ * architecture
+ * - for each RR associated to an RR in a DB node, we also need
+ * a pointer and management objects to support the additional cache
+ * function. These are allocated on-demand. The total size is
+ * 32 bytes for a 32-bit architecture.
+ *
+ * Security:
+ * Since this module does not handle any low-level data directly,
+ * no security issue specific to this module is anticipated.
+ *
+ * Standards:
+ * None.
+ */
+
+/***
+ *** Imports
+ ***/
+
+#include <isc/mutex.h>
+#include <isc/lang.h>
+#include <isc/refcount.h>
+#include <isc/stdtime.h>
+
+#include <dns/types.h>
+
+/***
+ *** Functions
+ ***/
+ISC_LANG_BEGINDECLS
+
+isc_result_t
+dns_acache_create(dns_acache_t **acachep, isc_mem_t *mctx,
+ isc_taskmgr_t *taskmgr, isc_timermgr_t *timermgr);
+/*
+ * Create a new DNS additional cache object.
+ *
+ * Requires:
+ *
+ * 'mctx' is a valid memory context
+ *
+ * 'taskmgr' is a valid task manager
+ *
+ * 'timermgr' is a valid timer or NULL. If NULL, no periodic cleaning of
+ * the cache will take place.
+ *
+ * 'acachep' is a valid pointer, and *acachep == NULL
+ *
+ * Ensures:
+ *
+ * '*acachep' is attached to the newly created cache
+ *
+ * Returns:
+ *
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ * ISC_R_UNEXPECTED
+ */
+
+void
+dns_acache_attach(dns_acache_t *source, dns_acache_t **targetp);
+/*
+ * Attach *targetp to cache.
+ *
+ * Requires:
+ *
+ * 'acache' is a valid additional cache.
+ *
+ * 'targetp' points to a NULL dns_acache_t *.
+ *
+ * Ensures:
+ *
+ * *targetp is attached to the 'source' additional cache.
+ */
+
+void
+dns_acache_detach(dns_acache_t **acachep);
+/*
+ * Detach *acachep from its cache.
+ *
+ * Requires:
+ *
+ * '*acachep' points to a valid additional cache.
+ *
+ * Ensures:
+ *
+ * *acachep is NULL.
+ *
+ * If '*acachep' is the last reference to the cache and the additional
+ * cache does not have an outstanding task, all resources used by the
+ * cache will be freed.
+ */
+
+void
+dns_acache_setcleaninginterval(dns_acache_t *acache, unsigned int t);
+/*
+ * Set the periodic cleaning interval of an additional cache to 'interval'
+ * seconds.
+ */
+
+void
+dns_acache_setcachesize(dns_acache_t *acache, isc_uint32_t size);
+/*
+ * Set the maximum additional cache size. 0 means unlimited.
+ */
+
+isc_result_t
+dns_acache_setdb(dns_acache_t *acache, dns_db_t *db);
+/*
+ * Set 'db' in 'acache' when the db can be referred from acache, in order
+ * to provide a hint for resolving the back reference.
+ *
+ * Requires:
+ * 'acache' is a valid acache pointer.
+ * 'db' is a valid DNS DB pointer.
+ *
+ * Ensures:
+ * 'acache' will have a reference to 'db'.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_EXISTS (which means the specified 'db' is already set)
+ * ISC_R_NOMEMORY
+ */
+
+isc_result_t
+dns_acache_putdb(dns_acache_t *acache, dns_db_t *db);
+/*
+ * Release 'db' from 'acache' if it has been set by dns_acache_setdb().
+ *
+ * Requires:
+ * 'acache' is a valid acache pointer.
+ * 'db' is a valid DNS DB pointer.
+ *
+ * Ensures:
+ * 'acache' will release the reference to 'db'. Additionally, the content
+ * of each cache entry that is related to the 'db' will be released via
+ * the callback function.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOTFOUND (which means the specified 'db' is not set in 'acache')
+ * ISC_R_NOMEMORY
+ */
+
+void
+dns_acache_shutdown(dns_acache_t *acache);
+/*
+ * Shutdown 'acache'.
+ *
+ * Requires:
+ *
+ * '*acache' is a valid additional cache.
+ */
+
+isc_result_t
+dns_acache_createentry(dns_acache_t *acache, dns_db_t *origdb,
+ void (*callback)(dns_acacheentry_t *, void **),
+ void *cbarg, dns_acacheentry_t **entryp);
+/*
+ * Create an additional cache entry. A new entry is created and attached to
+ * the given additional cache object. A callback function is also associated
+ * with the created entry, which will be called when the cache entry is purged
+ * for some reason.
+ *
+ * Requires:
+ *
+ * 'acache' is a valid additional cache.
+ * 'entryp' is a valid pointer, and *entryp == NULL
+ * 'origdb' is a valid DNS DB pointer.
+ * 'callback' and 'cbarg' can be NULL. In this case, however, the entry
+ * is meaningless (and will be cleaned-up in the next periodical
+ * cleaning).
+ *
+ * Ensures:
+ * '*entryp' will point to a new additional cache entry.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ */
+
+isc_result_t
+dns_acache_getentry(dns_acacheentry_t *entry, dns_zone_t **zonep,
+ dns_db_t **dbp, dns_dbversion_t **versionp,
+ dns_dbnode_t **nodep, dns_name_t *fname,
+ dns_message_t *msg, isc_stdtime_t now);
+/*
+ * Get content from a particular additional cache entry.
+ *
+ * Requires:
+ *
+ * 'entry' is a valid additional cache entry.
+ * 'zonep' is a NULL pointer or '*zonep' == NULL (this is the only
+ * optional parameter.)
+ * 'dbp' is a valid pointer, and '*dbp' == NULL
+ * 'versionp' is a valid pointer, and '*versionp' == NULL
+ * 'nodep' is a valid pointer, and '*nodep' == NULL
+ * 'fname' is a valid DNS name.
+ * 'msg' is a valid DNS message.
+ *
+ * Ensures:
+ * Several possible cases can happen according to the content.
+ * 1. For a positive cache entry,
+ * '*zonep' will point to the corresponding zone (if zonep is a valid
+ * pointer),
+ * '*dbp' will point to a DB for the zone,
+ * '*versionp' will point to its version, and
+ * '*nodep' will point to the corresponding DB node.
+ * 'fname' will have the DNS name of the DB node and contain a list of
+ * rdataset for the node (which can be an empty list).
+ *
+ * 2. For a negative cache entry that means no corresponding zone exists,
+ * '*zonep' == NULL (if zonep is a valid pointer)
+ * '*dbp', '*versionp', and '*nodep' will be NULL.
+ *
+ * 3. For a negative cache entry that means no corresponding DB node
+ * exists, '*zonep' will point to the corresponding zone (if zonep is a
+ * valid pointer),
+ * '*dbp' will point to a corresponding DB for zone,
+ * '*versionp' will point to its version.
+ * '*nodep' will be kept as NULL.
+ * 'fname' will not change.
+ *
+ * On failure, no new references will be created.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ */
+
+isc_result_t
+dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
+ dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
+ dns_dbnode_t *node, dns_name_t *fname);
+/*
+ * Set content to a particular additional cache entry.
+ *
+ * Requires:
+ * 'acache' is a valid additional cache.
+ * 'entry' is a valid additional cache entry.
+ * All the others pointers are NULL or a valid pointer of the
+ * corresponding type.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ * ISC_R_NOTFOUND
+ */
+
+void
+dns_acache_cancelentry(dns_acacheentry_t *entry);
+/*
+ * Cancel the use of the cache entry 'entry'. This function is supposed to
+ * be called when the node that holds the entry finds the content is not
+ * correct any more. This function will try to release as much dependency as
+ * possible, and will be ready to be cleaned-up. The registered callback
+ * function will be canceled and will never called.
+ *
+ * Requires:
+ * 'entry' is a valid additional cache entry.
+ */
+
+void
+dns_acache_attachentry(dns_acacheentry_t *source, dns_acacheentry_t **targetp);
+/*
+ * Attach *targetp to the cache entry 'source'.
+ *
+ * Requires:
+ *
+ * 'source' is a valid additional cache entry.
+ *
+ * 'targetp' points to a NULL dns_acacheentry_t *.
+ *
+ * Ensures:
+ *
+ * *targetp is attached to 'source'.
+ */
+
+void
+dns_acache_detachentry(dns_acacheentry_t **entryp);
+/*
+ * Detach *entryp from its cache.
+ *
+ * Requires:
+ *
+ * '*entryp' points to a valid additional cache entry.
+ *
+ * Ensures:
+ *
+ * *entryp is NULL.
+ *
+ * If '*entryp' is the last reference to the entry,
+ * cache does not have an outstanding task, all resources used by the
+ * entry (including the entry object itself) will be freed.
+ */
+
+void
+dns_acache_countquerymiss(dns_acache_t *acache);
+/*
+ * Count up a missed acache query. XXXMLG need more docs.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* DNS_ACACHE_H */
diff --git a/contrib/bind9/lib/dns/include/dns/acl.h b/contrib/bind9/lib/dns/include/dns/acl.h
index ce4c8b6..34e394f 100644
--- a/contrib/bind9/lib/dns/include/dns/acl.h
+++ b/contrib/bind9/lib/dns/include/dns/acl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acl.h,v 1.20.52.5 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: acl.h,v 1.22.18.4 2006/03/02 00:37:21 marka Exp $ */
#ifndef DNS_ACL_H
#define DNS_ACL_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Address match list handling.
*/
@@ -75,10 +76,10 @@ struct dns_acl {
isc_mem_t *mctx;
isc_refcount_t refcount;
dns_aclelement_t *elements;
- unsigned int alloc; /* Elements allocated */
- unsigned int length; /* Elements initialized */
- char *name; /* Temporary use only */
- ISC_LINK(dns_acl_t) nextincache; /* Ditto */
+ unsigned int alloc; /*%< Elements allocated */
+ unsigned int length; /*%< Elements initialized */
+ char *name; /*%< Temporary use only */
+ ISC_LINK(dns_acl_t) nextincache; /*%< Ditto */
};
struct dns_aclenv {
@@ -98,26 +99,26 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
-/*
+/*%<
* Create a new ACL with room for 'n' elements.
* The elements are uninitialized and the length is 0.
*/
isc_result_t
dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt);
-/*
+/*%<
* Append an element to an existing ACL.
*/
isc_result_t
dns_acl_any(isc_mem_t *mctx, dns_acl_t **target);
-/*
+/*%<
* Create a new ACL that matches everything.
*/
isc_result_t
dns_acl_none(isc_mem_t *mctx, dns_acl_t **target);
-/*
+/*%<
* Create a new ACL that matches nothing.
*/
@@ -135,13 +136,13 @@ dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b);
isc_boolean_t
dns_acl_isinsecure(const dns_acl_t *a);
-/*
- * Return ISC_TRUE iff the acl 'a' is considered insecure, that is,
+/*%<
+ * Return #ISC_TRUE iff the acl 'a' is considered insecure, that is,
* if it contains IP addresses other than those of the local host.
* This is intended for applications such as printing warning
* messages for suspect ACLs; it is not intended for making access
* control decisions. We make no guarantee that an ACL for which
- * this function returns ISC_FALSE is safe.
+ * this function returns #ISC_FALSE is safe.
*/
isc_result_t
@@ -160,7 +161,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
const dns_aclenv_t *env,
int *match,
const dns_aclelement_t **matchelt);
-/*
+/*%<
* General, low-level ACL matching. This is expected to
* be useful even for weird stuff like the topology and sortlist statements.
*
@@ -181,7 +182,7 @@ dns_acl_match(const isc_netaddr_t *reqaddr,
* If there is no match, *match will be set to zero.
*
* Returns:
- * ISC_R_SUCCESS Always succeeds.
+ *\li #ISC_R_SUCCESS Always succeeds.
*/
isc_boolean_t
@@ -190,7 +191,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
const dns_aclelement_t *e,
const dns_aclenv_t *env,
const dns_aclelement_t **matchelt);
-/*
+/*%<
* Like dns_acl_match, but matches against the single ACL element 'e'
* rather than a complete list and returns ISC_TRUE iff it matched.
* To determine whether the match was prositive or negative, the
@@ -203,7 +204,7 @@ isc_result_t
dns_acl_elementmatch(const dns_acl_t *acl,
const dns_aclelement_t *elt,
const dns_aclelement_t **matchelt);
-/*
+/*%<
* Search for an ACL element in 'acl' which is exactly the same as 'elt'.
* If there is one, and 'matchelt' is non NULL, then '*matchelt' will point
* to the entry.
@@ -212,8 +213,8 @@ dns_acl_elementmatch(const dns_acl_t *acl,
* before adding an entry.
*
* Returns:
- * ISC_R_SUCCESS Match succeeds.
- * ISC_R_NOTFOUND Match fails.
+ *\li #ISC_R_SUCCESS Match succeeds.
+ *\li #ISC_R_NOTFOUND Match fails.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/adb.h b/contrib/bind9/lib/dns/include/dns/adb.h
index 7a17eff..1e3cd61 100644
--- a/contrib/bind9/lib/dns/include/dns/adb.h
+++ b/contrib/bind9/lib/dns/include/dns/adb.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: adb.h,v 1.66.2.5.2.4 2004/03/06 08:13:50 marka Exp $ */
+/* $Id: adb.h,v 1.76.18.3 2005/06/23 04:23:16 marka Exp $ */
#ifndef DNS_ADB_H
#define DNS_ADB_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ *\brief
* DNS Address Database
*
* This module implements an address database (ADB) for mapping a name
@@ -49,21 +50,21 @@
* Records are stored internally until a timer expires. The timer is the
* smaller of the TTL or signature validity period.
*
- * Lameness is stored per-zone, and this data hangs off each address field.
- * When an address is marked lame for a given zone the address will not
- * be returned to a caller.
+ * Lameness is stored per <qname,qtype> tuple, and this data hangs off each
+ * address field. When an address is marked lame for a given tuple the address
+ * will not be returned to a caller.
*
*
* MP:
*
- * The ADB takes care of all necessary locking.
+ *\li The ADB takes care of all necessary locking.
*
- * Only the task which initiated the name lookup can cancel the lookup.
+ *\li Only the task which initiated the name lookup can cancel the lookup.
*
*
* Security:
*
- * None, since all data stored is required to be pre-filtered.
+ *\li None, since all data stored is required to be pre-filtered.
* (Cache needs to be sane, fetches return bounds-checked and sanity-
* checked data, caller passes a good dns_name_t for the zone, etc)
*/
@@ -98,8 +99,8 @@ ISC_LANG_BEGINDECLS
typedef struct dns_adbname dns_adbname_t;
-/* dns_adbfind_t
- *
+/*!
+ *\brief
* Represents a lookup for a single name.
*
* On return, the client can safely use "list", and can reorder the list.
@@ -108,14 +109,14 @@ typedef struct dns_adbname dns_adbname_t;
*/
struct dns_adbfind {
/* Public */
- unsigned int magic; /* RO: magic */
- dns_adbaddrinfolist_t list; /* RO: list of addrs */
- unsigned int query_pending; /* RO: partial list */
- unsigned int partial_result; /* RO: addrs missing */
- unsigned int options; /* RO: options */
- isc_result_t result_v4; /* RO: v4 result */
- isc_result_t result_v6; /* RO: v6 result */
- ISC_LINK(dns_adbfind_t) publink; /* RW: client use */
+ unsigned int magic; /*%< RO: magic */
+ dns_adbaddrinfolist_t list; /*%< RO: list of addrs */
+ unsigned int query_pending; /*%< RO: partial list */
+ unsigned int partial_result; /*%< RO: addrs missing */
+ unsigned int options; /*%< RO: options */
+ isc_result_t result_v4; /*%< RO: v4 result */
+ isc_result_t result_v6; /*%< RO: v6 result */
+ ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
/* Private */
isc_mutex_t lock; /* locks all below */
@@ -161,34 +162,65 @@ struct dns_adbfind {
* At least one address was omitted from the list because it was lame.
* This bit will NEVER be set if _RETURNLAME is set in the createfind().
*/
+/*% Return addresses of type INET. */
#define DNS_ADBFIND_INET 0x00000001
+/*% Return addresses of type INET6. */
#define DNS_ADBFIND_INET6 0x00000002
#define DNS_ADBFIND_ADDRESSMASK 0x00000003
-
+/*%
+ * Only schedule an event if no addresses are known.
+ * Must set _WANTEVENT for this to be meaningful.
+ */
#define DNS_ADBFIND_EMPTYEVENT 0x00000004
+/*%
+ * An event is desired. Check this bit in the returned find to see
+ * if one will actually be generated.
+ */
#define DNS_ADBFIND_WANTEVENT 0x00000008
+/*%
+ * If set, fetches will not be generated unless no addresses are
+ * available in any of the address families requested.
+ */
#define DNS_ADBFIND_AVOIDFETCHES 0x00000010
+/*%
+ * Fetches will start using the closest zone data or use the root servers.
+ * This is useful for reestablishing glue that has expired.
+ */
#define DNS_ADBFIND_STARTATZONE 0x00000020
+/*%
+ * Glue or hints are ok. These are used when matching names already
+ * in the adb, and when dns databases are searched.
+ */
#define DNS_ADBFIND_GLUEOK 0x00000040
+/*%
+ * Glue or hints are ok. These are used when matching names already
+ * in the adb, and when dns databases are searched.
+ */
#define DNS_ADBFIND_HINTOK 0x00000080
+/*%
+ * Return lame servers in a find, so that all addresses are returned.
+ */
#define DNS_ADBFIND_RETURNLAME 0x00000100
+/*%
+ * Only schedule an event if no addresses are known.
+ * Must set _WANTEVENT for this to be meaningful.
+ */
#define DNS_ADBFIND_LAMEPRUNED 0x00000200
-/* dns_adbaddrinfo_t
- *
+/*%
* The answers to queries come back as a list of these.
*/
struct dns_adbaddrinfo {
- unsigned int magic; /* private */
+ unsigned int magic; /*%< private */
- isc_sockaddr_t sockaddr; /* [rw] */
- unsigned int srtt; /* [rw] microseconds */
- unsigned int flags; /* [rw] */
- dns_adbentry_t *entry; /* private */
+ isc_sockaddr_t sockaddr; /*%< [rw] */
+ unsigned int srtt; /*%< [rw] microseconds */
+ unsigned int flags; /*%< [rw] */
+ dns_adbentry_t *entry; /*%< private */
ISC_LINK(dns_adbaddrinfo_t) publink;
};
-/*
+/*!<
* The event sent to the caller task is just a plain old isc_event_t. It
* contains no data other than a simple status, passed in the "type" field
* to indicate that another address resolved, or all partially resolved
@@ -198,13 +230,13 @@ struct dns_adbaddrinfo {
*
* This is simply a standard event, with the "type" set to:
*
- * DNS_EVENT_ADBMOREADDRESSES -- another address resolved.
- * DNS_EVENT_ADBNOMOREADDRESSES -- all pending addresses failed,
+ *\li #DNS_EVENT_ADBMOREADDRESSES -- another address resolved.
+ *\li #DNS_EVENT_ADBNOMOREADDRESSES -- all pending addresses failed,
* were canceled, or otherwise will
* not be usable.
- * DNS_EVENT_ADBCANCELED -- The request was canceled by a
+ *\li #DNS_EVENT_ADBCANCELED -- The request was canceled by a
* 3rd party.
- * DNS_EVENT_ADBNAMEDELETED -- The name was deleted, so this request
+ *\li #DNS_EVENT_ADBNAMEDELETED -- The name was deleted, so this request
* was canceled.
*
* In each of these cases, the addresses returned by the initial call
@@ -219,89 +251,90 @@ struct dns_adbaddrinfo {
isc_result_t
dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *tmgr,
isc_taskmgr_t *taskmgr, dns_adb_t **newadb);
-/*
+/*%<
* Create a new ADB.
*
* Notes:
*
- * Generally, applications should not create an ADB directly, but
+ *\li Generally, applications should not create an ADB directly, but
* should instead call dns_view_createresolver().
*
* Requires:
*
- * 'mem' must be a valid memory context.
+ *\li 'mem' must be a valid memory context.
*
- * 'view' be a pointer to a valid view.
+ *\li 'view' be a pointer to a valid view.
*
- * 'tmgr' be a pointer to a valid timer manager.
+ *\li 'tmgr' be a pointer to a valid timer manager.
*
- * 'taskmgr' be a pointer to a valid task manager.
+ *\li 'taskmgr' be a pointer to a valid task manager.
*
- * 'newadb' != NULL && '*newadb' == NULL.
+ *\li 'newadb' != NULL && '*newadb' == NULL.
*
* Returns:
*
- * ISC_R_SUCCESS after happiness.
- * ISC_R_NOMEMORY after resource allocation failure.
+ *\li #ISC_R_SUCCESS after happiness.
+ *\li #ISC_R_NOMEMORY after resource allocation failure.
*/
void
dns_adb_attach(dns_adb_t *adb, dns_adb_t **adbp);
-/*
+/*%
* Attach to an 'adb' to 'adbp'.
*
* Requires:
- * 'adb' to be a valid dns_adb_t, created via dns_adb_create().
- * 'adbp' to be a valid pointer to a *dns_adb_t which is initialized
+ *\li 'adb' to be a valid dns_adb_t, created via dns_adb_create().
+ *\li 'adbp' to be a valid pointer to a *dns_adb_t which is initialized
* to NULL.
*/
void
dns_adb_detach(dns_adb_t **adb);
-/*
+/*%
* Delete the ADB. Sets *ADB to NULL. Cancels any outstanding requests.
*
* Requires:
*
- * 'adb' be non-NULL and '*adb' be a valid dns_adb_t, created via
+ *\li 'adb' be non-NULL and '*adb' be a valid dns_adb_t, created via
* dns_adb_create().
*/
void
dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp);
-/*
+/*%
* Send '*eventp' to 'task' when 'adb' has shutdown.
*
* Requires:
*
- * '*adb' is a valid dns_adb_t.
+ *\li '*adb' is a valid dns_adb_t.
*
- * eventp != NULL && *eventp is a valid event.
+ *\li eventp != NULL && *eventp is a valid event.
*
* Ensures:
*
- * *eventp == NULL
+ *\li *eventp == NULL
*
- * The event's sender field is set to the value of adb when the event
+ *\li The event's sender field is set to the value of adb when the event
* is sent.
*/
void
dns_adb_shutdown(dns_adb_t *adb);
-/*
+/*%<
* Shutdown 'adb'.
*
* Requires:
*
- * '*adb' is a valid dns_adb_t.
+ * \li '*adb' is a valid dns_adb_t.
*/
isc_result_t
dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
- void *arg, dns_name_t *name, dns_name_t *zone,
- unsigned int options, isc_stdtime_t now, dns_name_t *target,
+ void *arg, dns_name_t *name, dns_name_t *qname,
+ dns_rdatatype_t qtype, unsigned int options,
+ isc_stdtime_t now, dns_name_t *target,
in_port_t port, dns_adbfind_t **find);
-/*
+/*%<
* Main interface for clients. The adb will look up the name given in
* "name" and will build up a list of found addresses, and perhaps start
* internal fetches to resolve names that are unknown currently.
@@ -311,9 +344,9 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
* set to a pointer to the dns_adbfind_t returned by this function.
*
* If no events will be generated, the *find->result_v4 and/or result_v6
- * members may be examined for address lookup status. The usual ISC_R_SUCCESS,
- * ISC_R_FAILURE, and DNS_R_NX{DOMAIN,RRSET} are returned, along with
- * ISC_R_NOTFOUND meaning the ADB has not _yet_ found the values. In this
+ * members may be examined for address lookup status. The usual #ISC_R_SUCCESS,
+ * #ISC_R_FAILURE, and #DNS_R_NX{DOMAIN,RRSET} are returned, along with
+ * #ISC_R_NOTFOUND meaning the ADB has not _yet_ found the values. In this
* latter case, retrying may produce more addresses.
*
* If events will be returned, the result_v[46] members are only valid
@@ -346,42 +379,42 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
*
* Requires:
*
- * *adb be a valid isc_adb_t object.
+ *\li *adb be a valid isc_adb_t object.
*
- * If events are to be sent, *task be a valid task,
+ *\li If events are to be sent, *task be a valid task,
* and isc_taskaction_t != NULL.
*
- * *name is a valid dns_name_t.
+ *\li *name is a valid dns_name_t.
*
- * zone != NULL and *zone be a valid dns_name_t.
+ *\li qname != NULL and *qname be a valid dns_name_t.
*
- * target == NULL or target is a valid name with a buffer.
+ *\li target == NULL or target is a valid name with a buffer.
*
- * find != NULL && *find == NULL.
+ *\li find != NULL && *find == NULL.
*
* Returns:
*
- * ISC_R_SUCCESS Addresses might have been returned, and events will be
+ *\li #ISC_R_SUCCESS Addresses might have been returned, and events will be
* delivered for unresolved addresses.
- * ISC_R_NOMORE Addresses might have been returned, but no events
+ *\li #ISC_R_NOMORE Addresses might have been returned, but no events
* will ever be posted for this context. This is only
* returned if task != NULL.
- * ISC_R_NOMEMORY insufficient resources
- * DNS_R_ALIAS 'name' is an alias for another name.
+ *\li #ISC_R_NOMEMORY insufficient resources
+ *\li #DNS_R_ALIAS 'name' is an alias for another name.
*
* Calls, and returns error codes from:
*
- * isc_stdtime_get()
+ *\li isc_stdtime_get()
*
* Notes:
*
- * No internal reference to "name" exists after this function
+ *\li No internal reference to "name" exists after this function
* returns.
*/
void
dns_adb_cancelfind(dns_adbfind_t *find);
-/*
+/*%<
* Cancels the find, and sends the event off to the caller.
*
* It is an error to call dns_adb_cancelfind() on a find where
@@ -389,7 +422,7 @@ dns_adb_cancelfind(dns_adbfind_t *find);
*
* Note:
*
- * It is possible that the real completion event was posted just
+ *\li It is possible that the real completion event was posted just
* before the dns_adb_cancelfind() call was made. In this case,
* dns_adb_cancelfind() will do nothing. The event callback needs
* to be prepared to find this situation (i.e. result is valid but
@@ -397,101 +430,105 @@ dns_adb_cancelfind(dns_adbfind_t *find);
*
* Requires:
*
- * 'find' be a valid dns_adbfind_t pointer.
+ *\li 'find' be a valid dns_adbfind_t pointer.
*
- * events would have been posted to the task. This can be checked
+ *\li events would have been posted to the task. This can be checked
* with (find->options & DNS_ADBFIND_WANTEVENT).
*
* Ensures:
*
- * The event was posted to the task.
+ *\li The event was posted to the task.
*/
void
dns_adb_destroyfind(dns_adbfind_t **find);
-/*
+/*%<
* Destroys the find reference.
*
* Note:
*
- * This can only be called after the event was delivered for a
+ *\li This can only be called after the event was delivered for a
* find. Additionally, the event MUST have been freed via
* isc_event_free() BEFORE this function is called.
*
* Requires:
*
- * 'find' != NULL and *find be valid dns_adbfind_t pointer.
+ *\li 'find' != NULL and *find be valid dns_adbfind_t pointer.
*
* Ensures:
*
- * No "address found" events will be posted to the originating task
+ *\li No "address found" events will be posted to the originating task
* after this function returns.
*/
void
dns_adb_dump(dns_adb_t *adb, FILE *f);
-/*
+/*%<
* This function is only used for debugging. It will dump as much of the
* state of the running system as possible.
*
* Requires:
*
- * adb be valid.
+ *\li adb be valid.
*
- * f != NULL, and is a file open for writing.
+ *\li f != NULL, and is a file open for writing.
*/
void
dns_adb_dumpfind(dns_adbfind_t *find, FILE *f);
-/*
+/*%<
* This function is only used for debugging. Dump the data associated
* with a find.
*
* Requires:
*
- * find is valid.
+ *\li find is valid.
*
- * f != NULL, and is a file open for writing.
+ * \li f != NULL, and is a file open for writing.
*/
isc_result_t
-dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
- isc_stdtime_t expire_time);
-/*
- * Mark the given address as lame for the zone "zone". expire_time should
+dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *qname,
+ dns_rdatatype_t type, isc_stdtime_t expire_time);
+/*%<
+ * Mark the given address as lame for the <qname,qtype>. expire_time should
* be set to the time when the entry should expire. That is, if it is to
* expire 10 minutes in the future, it should set it to (now + 10 * 60).
*
* Requires:
*
- * adb be valid.
+ *\li adb be valid.
*
- * addr be valid.
+ *\li addr be valid.
*
- * zone be the zone used in the dns_adb_createfind() call.
+ *\li qname be the qname used in the dns_adb_createfind() call.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
- * ISC_R_NOMEMORY -- could not mark address as lame.
+ *\li #ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_NOMEMORY -- could not mark address as lame.
*/
/*
* A reasonable default for RTT adjustments
*/
-#define DNS_ADB_RTTADJDEFAULT 7 /* default scale */
-#define DNS_ADB_RTTADJREPLACE 0 /* replace with our rtt */
-#define DNS_ADB_RTTADJAGE 10 /* age this rtt */
+#define DNS_ADB_RTTADJDEFAULT 7 /*%< default scale */
+#define DNS_ADB_RTTADJREPLACE 0 /*%< replace with our rtt */
+#define DNS_ADB_RTTADJAGE 10 /*%< age this rtt */
void
dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
unsigned int rtt, unsigned int factor);
-/*
- * Mix the round trip time into the existing smoothed rtt. The formula used
+/*%<
+ * Mix the round trip time into the existing smoothed rtt.
+
+ * The formula used
* (where srtt is the existing rtt value, and rtt and factor are arguments to
* this function):
*
+ *\code
* new_srtt = (old_srtt / 10 * factor) + (rtt / 10 * (10 - factor));
+ *\endcode
*
* XXXRTH Do we want to publish the formula? What if we want to change how
* this works later on? Recommend/require that the units are
@@ -499,77 +536,79 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
*
* Requires:
*
- * adb be valid.
+ *\li adb be valid.
*
- * addr be valid.
+ *\li addr be valid.
*
- * 0 <= factor <= 10
+ *\li 0 <= factor <= 10
*
* Note:
*
- * The srtt in addr will be updated to reflect the new global
+ *\li The srtt in addr will be updated to reflect the new global
* srtt value. This may include changes made by others.
*/
void
dns_adb_changeflags(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
unsigned int bits, unsigned int mask);
-/*
+/*%
+ * Change Flags.
+ *
* Set the flags as given by:
*
- * newflags = (oldflags & ~mask) | (bits & mask);
+ *\li newflags = (oldflags & ~mask) | (bits & mask);
*
* Requires:
*
- * adb be valid.
+ *\li adb be valid.
*
- * addr be valid.
+ *\li addr be valid.
*/
isc_result_t
dns_adb_findaddrinfo(dns_adb_t *adb, isc_sockaddr_t *sa,
dns_adbaddrinfo_t **addrp, isc_stdtime_t now);
-/*
+/*%<
* Return a dns_adbaddrinfo_t that is associated with address 'sa'.
*
* Requires:
*
- * adb is valid.
+ *\li adb is valid.
*
- * sa is valid.
+ *\li sa is valid.
*
- * addrp != NULL && *addrp == NULL
+ *\li addrp != NULL && *addrp == NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_SHUTTINGDOWN
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SHUTTINGDOWN
*/
void
dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp);
-/*
+/*%<
* Free a dns_adbaddrinfo_t allocated by dns_adb_findaddrinfo().
*
* Requires:
*
- * adb is valid.
+ *\li adb is valid.
*
- * *addrp is a valid dns_adbaddrinfo_t *.
+ *\li *addrp is a valid dns_adbaddrinfo_t *.
*/
void
dns_adb_flush(dns_adb_t *adb);
-/*
+/*%<
* Flushes all cached data from the adb.
*
* Requires:
- * adb is valid.
+ *\li adb is valid.
*/
void
dns_adb_setadbsize(dns_adb_t *adb, isc_uint32_t size);
-/*
+/*%<
* Set a target memory size. If memory usage exceeds the target
* size entries will be removed before they would have expired on
* a random basis.
@@ -577,17 +616,17 @@ dns_adb_setadbsize(dns_adb_t *adb, isc_uint32_t size);
* If 'size' is 0 then memory usage is unlimited.
*
* Requires:
- * 'adb' is valid.
+ *\li 'adb' is valid.
*/
void
dns_adb_flushname(dns_adb_t *adb, dns_name_t *name);
-/*
+/*%<
* Flush 'name' from the adb cache.
*
* Requires:
- * 'adb' is valid.
- * 'name' is valid.
+ *\li 'adb' is valid.
+ *\li 'name' is valid.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/bit.h b/contrib/bind9/lib/dns/include/dns/bit.h
index e4a7d20..770f294 100644
--- a/contrib/bind9/lib/dns/include/dns/bit.h
+++ b/contrib/bind9/lib/dns/include/dns/bit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: bit.h,v 1.7.206.1 2004/03/06 08:13:51 marka Exp $ */
+/* $Id: bit.h,v 1.8.18.2 2005/04/29 00:16:09 marka Exp $ */
#ifndef DNS_BIT_H
#define DNS_BIT_H 1
+/*! \file */
+
#include <isc/int.h>
#include <isc/boolean.h>
diff --git a/contrib/bind9/lib/dns/include/dns/byaddr.h b/contrib/bind9/lib/dns/include/dns/byaddr.h
index 8f69cd9..1f1e88c 100644
--- a/contrib/bind9/lib/dns/include/dns/byaddr.h
+++ b/contrib/bind9/lib/dns/include/dns/byaddr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: byaddr.h,v 1.12.2.1.2.4 2004/03/08 09:04:34 marka Exp $ */
+/* $Id: byaddr.h,v 1.16.18.2 2005/04/29 00:16:09 marka Exp $ */
#ifndef DNS_BYADDR_H
#define DNS_BYADDR_H 1
@@ -24,28 +24,27 @@
***** Module Info
*****/
-/*
- * DNS ByAddr
- *
+/*! \file
+ * \brief
* The byaddr module provides reverse lookup services for IPv4 and IPv6
* addresses.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * RFCs: 1034, 1035, 2181, <TBS>
- * Drafts: <TBS>
+ *\li RFCs: 1034, 1035, 2181, TBS
+ *\li Drafts: TBS
*/
#include <isc/lang.h>
@@ -55,7 +54,7 @@
ISC_LANG_BEGINDECLS
-/*
+/*%
* A 'dns_byaddrevent_t' is returned when a byaddr completes.
* The sender field will be set to the byaddr that completed. If 'result'
* is ISC_R_SUCCESS, then 'names' will contain a list of names associated
@@ -72,76 +71,79 @@ typedef struct dns_byaddrevent {
* This option is deprecated since we now only consider nibbles.
#define DNS_BYADDROPT_IPV6NIBBLE 0x0001
*/
+/*% Note DNS_BYADDROPT_IPV6NIBBLE is now deprecated. */
#define DNS_BYADDROPT_IPV6INT 0x0002
isc_result_t
dns_byaddr_create(isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view,
unsigned int options, isc_task_t *task,
isc_taskaction_t action, void *arg, dns_byaddr_t **byaddrp);
-/*
+/*%<
* Find the domain name of 'address'.
*
* Notes:
*
- * There is a reverse lookup format for IPv6 addresses, 'nibble'
+ *\li There is a reverse lookup format for IPv6 addresses, 'nibble'
*
- * The 'nibble' format for that address is
+ *\li The 'nibble' format for that address is
*
+ * \code
* 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.
+ * \endcode
*
- * DNS_BYADDROPT_IPV6INT can be used to get nibble lookups under ip6.int.
+ *\li #DNS_BYADDROPT_IPV6INT can be used to get nibble lookups under ip6.int.
*
* Requires:
*
- * 'mctx' is a valid mctx.
+ *\li 'mctx' is a valid mctx.
*
- * 'address' is a valid IPv4 or IPv6 address.
+ *\li 'address' is a valid IPv4 or IPv6 address.
*
- * 'view' is a valid view which has a resolver.
+ *\li 'view' is a valid view which has a resolver.
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * byaddrp != NULL && *byaddrp == NULL
+ *\li byaddrp != NULL && *byaddrp == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*
- * Any resolver-related error (e.g. ISC_R_SHUTTINGDOWN) may also be
+ *\li Any resolver-related error (e.g. #ISC_R_SHUTTINGDOWN) may also be
* returned.
*/
void
dns_byaddr_cancel(dns_byaddr_t *byaddr);
-/*
+/*%<
* Cancel 'byaddr'.
*
* Notes:
*
- * If 'byaddr' has not completed, post its BYADDRDONE event with a
- * result code of ISC_R_CANCELED.
+ *\li If 'byaddr' has not completed, post its #BYADDRDONE event with a
+ * result code of #ISC_R_CANCELED.
*
* Requires:
*
- * 'byaddr' is a valid byaddr.
+ *\li 'byaddr' is a valid byaddr.
*/
void
dns_byaddr_destroy(dns_byaddr_t **byaddrp);
-/*
+/*%<
* Destroy 'byaddr'.
*
* Requires:
*
- * '*byaddrp' is a valid byaddr.
+ *\li '*byaddrp' is a valid byaddr.
*
- * The caller has received the BYADDRDONE event (either because the
+ *\li The caller has received the BYADDRDONE event (either because the
* byaddr completed or because dns_byaddr_cancel() was called).
*
* Ensures:
*
- * *byaddrp == NULL.
+ *\li *byaddrp == NULL.
*/
isc_result_t
@@ -151,7 +153,7 @@ dns_byaddr_createptrname(isc_netaddr_t *address, isc_boolean_t nibble,
isc_result_t
dns_byaddr_createptrname2(isc_netaddr_t *address, unsigned int options,
dns_name_t *name);
-/*
+/*%<
* Creates a name that would be used in a PTR query for this address. The
* nibble flag indicates that the 'nibble' format is to be used if an IPv6
* address is provided, instead of the 'bitstring' format. Since we dropped
@@ -160,8 +162,8 @@ dns_byaddr_createptrname2(isc_netaddr_t *address, unsigned int options,
*
* Requires:
*
- * 'address' is a valid address.
- * 'name' is a valid name with a dedicated buffer.
+ * \li 'address' is a valid address.
+ * \li 'name' is a valid name with a dedicated buffer.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/cache.h b/contrib/bind9/lib/dns/include/dns/cache.h
index 4b775c9..fc4f78e 100644
--- a/contrib/bind9/lib/dns/include/dns/cache.h
+++ b/contrib/bind9/lib/dns/include/dns/cache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cache.h,v 1.17.12.5 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: cache.h,v 1.19.18.3 2005/08/23 02:31:38 marka Exp $ */
#ifndef DNS_CACHE_H
#define DNS_CACHE_H 1
@@ -24,18 +24,17 @@
***** Module Info
*****/
-/*
- * cache
- *
+/*! \file
+ * \brief
* Defines dns_cache_t, the cache object.
*
* Notes:
- * A cache object contains DNS data of a single class.
+ *\li A cache object contains DNS data of a single class.
* Multiple classes will be handled by creating multiple
* views, each with a different class and its own cache.
*
* MP:
- * See notes at the individual functions.
+ *\li See notes at the individual functions.
*
* Reliability:
*
@@ -66,71 +65,70 @@ dns_cache_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
isc_timermgr_t *timermgr, dns_rdataclass_t rdclass,
const char *db_type, unsigned int db_argc, char **db_argv,
dns_cache_t **cachep);
-/*
+/*%<
* Create a new DNS cache.
*
* Requires:
*
- * 'mctx' is a valid memory context
+ *\li 'mctx' is a valid memory context
*
- * 'taskmgr' is a valid task manager and 'timermgr' is a valid timer
+ *\li 'taskmgr' is a valid task manager and 'timermgr' is a valid timer
* manager, or both are NULL. If NULL, no periodic cleaning of the
* cache will take place.
*
- * 'cachep' is a valid pointer, and *cachep == NULL
+ *\li 'cachep' is a valid pointer, and *cachep == NULL
*
* Ensures:
*
- * '*cachep' is attached to the newly created cache
+ *\li '*cachep' is attached to the newly created cache
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
void
dns_cache_attach(dns_cache_t *cache, dns_cache_t **targetp);
-/*
+/*%<
* Attach *targetp to cache.
*
* Requires:
*
- * 'cache' is a valid cache.
+ *\li 'cache' is a valid cache.
*
- * 'targetp' points to a NULL dns_cache_t *.
+ *\li 'targetp' points to a NULL dns_cache_t *.
*
* Ensures:
*
- * *targetp is attached to cache.
+ *\li *targetp is attached to cache.
*/
void
dns_cache_detach(dns_cache_t **cachep);
-/*
+/*%<
* Detach *cachep from its cache.
*
* Requires:
*
- * 'cachep' points to a valid cache.
+ *\li 'cachep' points to a valid cache.
*
* Ensures:
*
- * *cachep is NULL.
- *
- * If '*cachep' is the last reference to the cache,
+ *\li *cachep is NULL.
*
- * All resources used by the cache will be freed
+ *\li If '*cachep' is the last reference to the cache,
+ * all resources used by the cache will be freed
*/
void
dns_cache_attachdb(dns_cache_t *cache, dns_db_t **dbp);
-/*
+/*%<
* Attach *dbp to the cache's database.
*
* Notes:
*
- * This may be used to get a reference to the database for
+ *\li This may be used to get a reference to the database for
* the purpose of cache lookups (XXX currently it is also
* the way to add data to the cache, but having a
* separate dns_cache_add() interface instead would allow
@@ -140,39 +138,39 @@ dns_cache_attachdb(dns_cache_t *cache, dns_db_t **dbp);
*
* Requires:
*
- * 'cache' is a valid cache.
+ *\li 'cache' is a valid cache.
*
- * 'dbp' points to a NULL dns_db *.
+ *\li 'dbp' points to a NULL dns_db *.
*
* Ensures:
*
- * *dbp is attached to the database.
+ *\li *dbp is attached to the database.
*/
isc_result_t
-dns_cache_setfilename(dns_cache_t *cahce, const char *filename);
-/*
+dns_cache_setfilename(dns_cache_t *cache, const char *filename);
+/*%<
* If 'filename' is non-NULL, make the cache persistent.
* The cache's data will be stored in the given file.
* If 'filename' is NULL, make the cache non-persistent.
* Files that are no longer used are not unlinked automatically.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * Various file-related failures
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li Various file-related failures
*/
isc_result_t
dns_cache_load(dns_cache_t *cache);
-/*
+/*%<
* If the cache has a file name, load the cache contents from the file.
* Previous cache contents are not discarded.
* If no file name has been set, do nothing and return success.
*
* MT:
- * Multiple simultaneous attempts to load or dump the cache
+ *\li Multiple simultaneous attempts to load or dump the cache
* will be serialized with respect to one another, but
* the cache may be read and updated while the dump is
* in progress. Updates performed during loading
@@ -181,19 +179,19 @@ dns_cache_load(dns_cache_t *cache);
*
* Returns:
*
- * ISC_R_SUCCESS
- * Various failures depending on the database implementation type
+ *\li #ISC_R_SUCCESS
+ * \li Various failures depending on the database implementation type
*/
isc_result_t
dns_cache_dump(dns_cache_t *cache);
-/*
+/*%<
* If the cache has a file name, write the cache contents to disk,
* overwriting any preexisting file. If no file name has been set,
* do nothing and return success.
*
* MT:
- * Multiple simultaneous attempts to load or dump the cache
+ *\li Multiple simultaneous attempts to load or dump the cache
* will be serialized with respect to one another, but
* the cache may be read and updated while the dump is
* in progress. Updates performed during the dump may
@@ -201,13 +199,13 @@ dns_cache_dump(dns_cache_t *cache);
*
* Returns:
*
- * ISC_R_SUCCESS
- * Various failures depending on the database implementation type
+ *\li #ISC_R_SUCCESS
+ * \li Various failures depending on the database implementation type
*/
isc_result_t
dns_cache_clean(dns_cache_t *cache, isc_stdtime_t now);
-/*
+/*%<
* Force immediate cleaning of the cache, freeing all rdatasets
* whose TTL has expired as of 'now' and that have no pending
* references.
@@ -215,24 +213,24 @@ dns_cache_clean(dns_cache_t *cache, isc_stdtime_t now);
void
dns_cache_setcleaninginterval(dns_cache_t *cache, unsigned int interval);
-/*
+/*%<
* Set the periodic cache cleaning interval to 'interval' seconds.
*/
void
dns_cache_setcachesize(dns_cache_t *cache, isc_uint32_t size);
-/*
+/*%<
* Set the maximum cache size. 0 means unlimited.
*/
isc_result_t
dns_cache_flush(dns_cache_t *cache);
-/*
+/*%<
* Flushes all data from the cache.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
isc_result_t
@@ -241,13 +239,13 @@ dns_cache_flushname(dns_cache_t *cache, dns_name_t *name);
* Flushes a given name from the cache.
*
* Requires:
- * 'cache' to be valid.
- * 'name' to be valid.
+ *\li 'cache' to be valid.
+ *\li 'name' to be valid.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * other error returns.
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li other error returns.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/callbacks.h b/contrib/bind9/lib/dns/include/dns/callbacks.h
index 9c2710a..6aee70b 100644
--- a/contrib/bind9/lib/dns/include/dns/callbacks.h
+++ b/contrib/bind9/lib/dns/include/dns/callbacks.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: callbacks.h,v 1.15.2.2.8.1 2004/03/06 08:13:51 marka Exp $ */
+/* $Id: callbacks.h,v 1.18.18.2 2005/04/29 00:16:10 marka Exp $ */
#ifndef DNS_CALLBACKS_H
#define DNS_CALLBACKS_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -35,19 +37,19 @@ ISC_LANG_BEGINDECLS
***/
struct dns_rdatacallbacks {
- /*
+ /*%
* dns_load_master calls this when it has rdatasets to commit.
*/
dns_addrdatasetfunc_t add;
- /*
+ /*%
* dns_load_master / dns_rdata_fromtext call this to issue a error.
*/
void (*error)(struct dns_rdatacallbacks *, const char *, ...);
- /*
+ /*%
* dns_load_master / dns_rdata_fromtext call this to issue a warning.
*/
void (*warn)(struct dns_rdatacallbacks *, const char *, ...);
- /*
+ /*%
* Private data handles for use by the above callback functions.
*/
void *add_private;
@@ -61,20 +63,22 @@ struct dns_rdatacallbacks {
void
dns_rdatacallbacks_init(dns_rdatacallbacks_t *callbacks);
-/*
+/*%<
* Initialize 'callbacks'.
- * 'error' and 'warn' are set to default callbacks that print the
+ *
+ *
+ * \li 'error' and 'warn' are set to default callbacks that print the
* error message through the DNS library log context.
*
- * All other elements are initialized to NULL.
+ *\li All other elements are initialized to NULL.
*
* Requires:
- * 'callbacks' is a valid dns_rdatacallbacks_t,
+ * \li 'callbacks' is a valid dns_rdatacallbacks_t,
*/
void
dns_rdatacallbacks_init_stdio(dns_rdatacallbacks_t *callbacks);
-/*
+/*%<
* Like dns_rdatacallbacks_init, but logs to stdio.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/cert.h b/contrib/bind9/lib/dns/include/dns/cert.h
index 28a3d4c..4de1aec 100644
--- a/contrib/bind9/lib/dns/include/dns/cert.h
+++ b/contrib/bind9/lib/dns/include/dns/cert.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cert.h,v 1.12.206.1 2004/03/06 08:13:51 marka Exp $ */
+/* $Id: cert.h,v 1.13.18.2 2005/04/29 00:16:10 marka Exp $ */
#ifndef DNS_CERT_H
#define DNS_CERT_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,38 +30,38 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a certificate type.
* The text may contain either a mnemonic type name or a decimal type number.
*
* Requires:
- * 'certp' is a valid pointer.
+ *\li 'certp' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_RANGE numeric type is out of range
- * DNS_R_UNKNOWN mnemonic type is unknown
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_RANGE numeric type is out of range
+ *\li #DNS_R_UNKNOWN mnemonic type is unknown
*/
isc_result_t
dns_cert_totext(dns_cert_t cert, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of certificate type 'cert' into 'target'.
*
* Requires:
- * 'cert' is a valid cert.
+ *\li 'cert' is a valid cert.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
* Ensures:
- * If the result is success:
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/compress.h b/contrib/bind9/lib/dns/include/dns/compress.h
index 042a4ea..4d9c011 100644
--- a/contrib/bind9/lib/dns/include/dns/compress.h
+++ b/contrib/bind9/lib/dns/include/dns/compress.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress.h,v 1.29.2.2.8.3 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: compress.h,v 1.32.18.6 2006/03/02 00:37:21 marka Exp $ */
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
@@ -27,11 +27,12 @@
ISC_LANG_BEGINDECLS
-#define DNS_COMPRESS_NONE 0x00 /* no compression */
-#define DNS_COMPRESS_GLOBAL14 0x01 /* "normal" compression. */
-#define DNS_COMPRESS_ALL 0x01 /* all compression. */
+#define DNS_COMPRESS_NONE 0x00 /*%< no compression */
+#define DNS_COMPRESS_GLOBAL14 0x01 /*%< "normal" compression. */
+#define DNS_COMPRESS_ALL 0x01 /*%< all compression. */
+#define DNS_COMPRESS_CASESENSITIVE 0x02 /*%< case sensitive compression. */
-/*
+/*! \file
* Direct manipulation of the structures is strongly discouraged.
*/
@@ -49,198 +50,218 @@ struct dns_compressnode {
};
struct dns_compress {
- unsigned int magic; /* Magic number. */
- unsigned int allowed; /* Allowed methods. */
- int edns; /* Edns version or -1. */
- /* Global compression table. */
+ unsigned int magic; /*%< Magic number. */
+ unsigned int allowed; /*%< Allowed methods. */
+ int edns; /*%< Edns version or -1. */
+ /*% Global compression table. */
dns_compressnode_t *table[DNS_COMPRESS_TABLESIZE];
- /* Preallocated nodes for the table. */
+ /*% Preallocated nodes for the table. */
dns_compressnode_t initialnodes[DNS_COMPRESS_INITIALNODES];
- isc_uint16_t count; /* Number of nodes. */
- isc_mem_t *mctx; /* Memory context. */
+ isc_uint16_t count; /*%< Number of nodes. */
+ isc_mem_t *mctx; /*%< Memory context. */
};
typedef enum {
- DNS_DECOMPRESS_ANY, /* Any compression */
- DNS_DECOMPRESS_STRICT, /* Allowed compression */
- DNS_DECOMPRESS_NONE /* No compression */
+ DNS_DECOMPRESS_ANY, /*%< Any compression */
+ DNS_DECOMPRESS_STRICT, /*%< Allowed compression */
+ DNS_DECOMPRESS_NONE /*%< No compression */
} dns_decompresstype_t;
struct dns_decompress {
- unsigned int magic; /* Magic number. */
- unsigned int allowed; /* Allowed methods. */
- int edns; /* Edns version or -1. */
- dns_decompresstype_t type; /* Strict checking */
+ unsigned int magic; /*%< Magic number. */
+ unsigned int allowed; /*%< Allowed methods. */
+ int edns; /*%< Edns version or -1. */
+ dns_decompresstype_t type; /*%< Strict checking */
};
isc_result_t
dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx);
-/*
+/*%<
* Inialise the compression context structure pointed to by 'cctx'.
*
* Requires:
- * 'cctx' is a valid dns_compress_t structure.
- * 'mctx' is an initialized memory context.
+ * \li 'cctx' is a valid dns_compress_t structure.
+ * \li 'mctx' is an initialized memory context.
* Ensures:
- * cctx->global is initialized.
+ * \li cctx->global is initialized.
*
* Returns:
- * ISC_R_SUCCESS
- * failures from dns_rbt_create()
+ * \li #ISC_R_SUCCESS
+ * \li failures from dns_rbt_create()
*/
void
dns_compress_invalidate(dns_compress_t *cctx);
-/*
+/*%<
* Invalidate the compression structure pointed to by cctx.
*
* Requires:
- * 'cctx' to be initialized.
+ *\li 'cctx' to be initialized.
*/
void
dns_compress_setmethods(dns_compress_t *cctx, unsigned int allowed);
-/*
+/*%<
* Sets allowed compression methods.
*
* Requires:
- * 'cctx' to be initialized.
+ *\li 'cctx' to be initialized.
*/
unsigned int
dns_compress_getmethods(dns_compress_t *cctx);
-/*
+/*%<
* Gets allowed compression methods.
*
* Requires:
- * 'cctx' to be initialized.
+ *\li 'cctx' to be initialized.
*
* Returns:
- * allowed compression bitmap.
+ *\li allowed compression bitmap.
+ */
+
+void
+dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive);
+
+/*
+ * Preserve the case of compressed domain names.
+ *
+ * Requires:
+ * 'cctx' to be initialized.
+ */
+
+isc_boolean_t
+dns_compress_getsensitive(dns_compress_t *cctx);
+/*
+ * Return whether case is to be preservered when compressing
+ * domain names.
+ *
+ * Requires:
+ * 'cctx' to be initialized.
*/
int
dns_compress_getedns(dns_compress_t *cctx);
-/*
+/*%<
* Gets edns value.
*
* Requires:
- * 'cctx' to be initialized.
+ *\li 'cctx' to be initialized.
*
* Returns:
- * -1 .. 255
+ *\li -1 .. 255
*/
isc_boolean_t
dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset);
-/*
+/*%<
* Finds longest possible match of 'name' in the global compression table.
*
* Requires:
- * 'cctx' to be initialized.
- * 'name' to be a absolute name.
- * 'prefix' to be initialized.
- * 'offset' to point to an isc_uint16_t.
+ *\li 'cctx' to be initialized.
+ *\li 'name' to be a absolute name.
+ *\li 'prefix' to be initialized.
+ *\li 'offset' to point to an isc_uint16_t.
*
* Ensures:
- * 'prefix' and 'offset' are valid if ISC_TRUE is returned.
+ *\li 'prefix' and 'offset' are valid if ISC_TRUE is returned.
*
* Returns:
- * ISC_TRUE / ISC_FALSE
+ *\li #ISC_TRUE / #ISC_FALSE
*/
void
dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
const dns_name_t *prefix, isc_uint16_t offset);
-/*
+/*%<
* Add compression pointers for 'name' to the compression table,
* not replacing existing pointers.
*
* Requires:
- * 'cctx' initialized
+ *\li 'cctx' initialized
*
- * 'name' must be initialized and absolute, and must remain
+ *\li 'name' must be initialized and absolute, and must remain
* valid until the message compression is complete.
*
- * 'prefix' must be a prefix returned by
+ *\li 'prefix' must be a prefix returned by
* dns_compress_findglobal(), or the same as 'name'.
*/
void
dns_compress_rollback(dns_compress_t *cctx, isc_uint16_t offset);
-/*
+/*%<
* Remove any compression pointers from global table >= offset.
*
* Requires:
- * 'cctx' is initialized.
+ *\li 'cctx' is initialized.
*/
void
dns_decompress_init(dns_decompress_t *dctx, int edns,
dns_decompresstype_t type);
-/*
+/*%<
* Initializes 'dctx'.
* Records 'edns' and 'type' into the structure.
*
* Requires:
- * 'dctx' to be a valid pointer.
+ *\li 'dctx' to be a valid pointer.
*/
void
dns_decompress_invalidate(dns_decompress_t *dctx);
-/*
+/*%<
* Invalidates 'dctx'.
*
* Requires:
- * 'dctx' to be initialized
+ *\li 'dctx' to be initialized
*/
void
dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);
-/*
+/*%<
* Sets 'dctx->allowed' to 'allowed'.
*
* Requires:
- * 'dctx' to be initialized
+ *\li 'dctx' to be initialized
*/
unsigned int
dns_decompress_getmethods(dns_decompress_t *dctx);
-/*
+/*%<
* Returns 'dctx->allowed'
*
* Requires:
- * 'dctx' to be initialized
+ *\li 'dctx' to be initialized
*/
int
dns_decompress_edns(dns_decompress_t *dctx);
-/*
+/*%<
* Returns 'dctx->edns'
*
* Requires:
- * 'dctx' to be initialized
+ *\li 'dctx' to be initialized
*/
dns_decompresstype_t
dns_decompress_type(dns_decompress_t *dctx);
-/*
+/*%<
* Returns 'dctx->type'
*
* Requires:
- * 'dctx' to be initialized
+ *\li 'dctx' to be initialized
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/db.h b/contrib/bind9/lib/dns/include/dns/db.h
index 8e08882..a791a2e 100644
--- a/contrib/bind9/lib/dns/include/dns/db.h
+++ b/contrib/bind9/lib/dns/include/dns/db.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: db.h,v 1.67.12.8 2004/05/14 05:06:41 marka Exp $ */
+/* $Id: db.h,v 1.76.18.7 2005/10/13 02:12:25 marka Exp $ */
#ifndef DNS_DB_H
#define DNS_DB_H 1
@@ -24,31 +24,30 @@
***** Module Info
*****/
-/*
- * DNS DB
- *
+/*! \file
+ * \brief
* The DNS DB interface allows named rdatasets to be stored and retrieved.
*
* The dns_db_t type is like a "virtual class". To actually use
* DBs, an implementation of the class is required.
*
- * XXX <more> XXX
+ * XXX more XXX
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ * \li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ * \li No anticipated impact.
*
* Resources:
- * <TBS>
+ * \li TBS
*
* Security:
- * No anticipated impact.
+ * \li No anticipated impact.
*
* Standards:
- * None.
+ * \li None.
*/
/*****
@@ -76,7 +75,8 @@ typedef struct dns_dbmethods {
dns_dbload_t **dbloadp);
isc_result_t (*endload)(dns_db_t *db, dns_dbload_t **dbloadp);
isc_result_t (*dump)(dns_db_t *db, dns_dbversion_t *version,
- const char *filename);
+ const char *filename,
+ dns_masterformat_t masterformat);
void (*currentversion)(dns_db_t *db,
dns_dbversion_t **versionp);
isc_result_t (*newversion)(dns_db_t *db,
@@ -145,6 +145,7 @@ typedef struct dns_dbmethods {
isc_boolean_t (*ispersistent)(dns_db_t *db);
void (*overmem)(dns_db_t *db, isc_boolean_t overmem);
void (*settask)(dns_db_t *db, isc_task_t *);
+ isc_result_t (*getoriginnode)(dns_db_t *db, dns_dbnode_t **nodep);
} dns_dbmethods_t;
typedef isc_result_t
@@ -156,10 +157,10 @@ typedef isc_result_t
#define DNS_DB_MAGIC ISC_MAGIC('D','N','S','D')
#define DNS_DB_VALID(db) ISC_MAGIC_VALID(db, DNS_DB_MAGIC)
-/*
+/*%
* This structure is actually just the common prefix of a DNS db
* implementation's version of a dns_db_t.
- *
+ * \brief
* Direct use of this structure by clients is forbidden. DB implementations
* may change the structure. 'magic' must be DNS_DB_MAGIC for any of the
* dns_db_ routines to work. DB implementations must maintain all DB
@@ -179,7 +180,8 @@ struct dns_db {
#define DNS_DBATTR_CACHE 0x01
#define DNS_DBATTR_STUB 0x02
-/*
+/*@{*/
+/*%
* Options that can be specified for dns_db_find().
*/
#define DNS_DBFIND_GLUEOK 0x01
@@ -189,16 +191,19 @@ struct dns_db {
#define DNS_DBFIND_NOEXACT 0x10
#define DNS_DBFIND_FORCENSEC 0x20
#define DNS_DBFIND_COVERINGNSEC 0x40
+/*@}*/
-/*
+/*@{*/
+/*%
* Options that can be specified for dns_db_addrdataset().
*/
#define DNS_DBADD_MERGE 0x01
#define DNS_DBADD_FORCE 0x02
#define DNS_DBADD_EXACT 0x04
#define DNS_DBADD_EXACTTTL 0x08
+/*@}*/
-/*
+/*%
* Options that can be specified for dns_db_subtractrdataset().
*/
#define DNS_DBSUB_EXACT 0x01
@@ -215,78 +220,77 @@ isc_result_t
dns_db_create(isc_mem_t *mctx, const char *db_type, dns_name_t *origin,
dns_dbtype_t type, dns_rdataclass_t rdclass,
unsigned int argc, char *argv[], dns_db_t **dbp);
-/*
+/*%<
* Create a new database using implementation 'db_type'.
*
* Notes:
- * All names in the database must be subdomains of 'origin' and in class
+ * \li All names in the database must be subdomains of 'origin' and in class
* 'rdclass'. The database makes its own copy of the origin, so the
* caller may do whatever they like with 'origin' and its storage once the
* call returns.
*
- * DB implementation-specific parameters are passed using argc and argv.
+ * \li DB implementation-specific parameters are passed using argc and argv.
*
* Requires:
*
- * dbp != NULL and *dbp == NULL
+ * \li dbp != NULL and *dbp == NULL
*
- * 'origin' is a valid absolute domain name.
+ * \li 'origin' is a valid absolute domain name.
*
- * mctx is a valid memory context
+ * \li mctx is a valid memory context
*
* Ensures:
*
- * A copy of 'origin' has been made for the databases use, and the
+ * \li A copy of 'origin' has been made for the databases use, and the
* caller is free to do whatever they want with the name and storage
* associated with 'origin'.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_NOTFOUND db_type not found
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
+ * \li #ISC_R_NOTFOUND db_type not found
*
- * Many other errors are possible, depending on what db_type was
+ * \li Many other errors are possible, depending on what db_type was
* specified.
*/
void
dns_db_attach(dns_db_t *source, dns_db_t **targetp);
-/*
+/*%<
* Attach *targetp to source.
*
* Requires:
*
- * 'source' is a valid database.
+ * \li 'source' is a valid database.
*
- * 'targetp' points to a NULL dns_db_t *.
+ * \li 'targetp' points to a NULL dns_db_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ * \li *targetp is attached to source.
*/
void
dns_db_detach(dns_db_t **dbp);
-/*
+/*%<
* Detach *dbp from its database.
*
* Requires:
*
- * 'dbp' points to a valid database.
+ * \li 'dbp' points to a valid database.
*
* Ensures:
*
- * *dbp is NULL.
- *
- * If '*dbp' is the last reference to the database,
+ * \li *dbp is NULL.
*
- * All resources used by the database will be freed
+ * \li If '*dbp' is the last reference to the database,
+ * all resources used by the database will be freed
*/
isc_result_t
dns_db_ondestroy(dns_db_t *db, isc_task_t *task, isc_event_t **eventp);
-/*
+/*%<
* Causes 'eventp' to be sent to be sent to 'task' when the database is
* destroyed.
*
@@ -297,189 +301,198 @@ dns_db_ondestroy(dns_db_t *db, isc_task_t *task, isc_event_t **eventp);
isc_boolean_t
dns_db_iscache(dns_db_t *db);
-/*
+/*%<
* Does 'db' have cache semantics?
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
- * ISC_TRUE 'db' has cache semantics
- * ISC_FALSE otherwise
+ * \li #ISC_TRUE 'db' has cache semantics
+ * \li #ISC_FALSE otherwise
*/
isc_boolean_t
dns_db_iszone(dns_db_t *db);
-/*
+/*%<
* Does 'db' have zone semantics?
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
- * ISC_TRUE 'db' has zone semantics
- * ISC_FALSE otherwise
+ * \li #ISC_TRUE 'db' has zone semantics
+ * \li #ISC_FALSE otherwise
*/
isc_boolean_t
dns_db_isstub(dns_db_t *db);
-/*
+/*%<
* Does 'db' have stub semantics?
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
- * ISC_TRUE 'db' has zone semantics
- * ISC_FALSE otherwise
+ * \li #ISC_TRUE 'db' has zone semantics
+ * \li #ISC_FALSE otherwise
*/
isc_boolean_t
dns_db_issecure(dns_db_t *db);
-/*
+/*%<
* Is 'db' secure?
*
* Requires:
*
- * 'db' is a valid database with zone semantics.
+ * \li 'db' is a valid database with zone semantics.
*
* Returns:
- * ISC_TRUE 'db' is secure.
- * ISC_FALSE 'db' is not secure.
+ * \li #ISC_TRUE 'db' is secure.
+ * \li #ISC_FALSE 'db' is not secure.
*/
dns_name_t *
dns_db_origin(dns_db_t *db);
-/*
+/*%<
* The origin of the database.
*
* Note: caller must not try to change this name.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
*
- * The origin of the database.
+ * \li The origin of the database.
*/
dns_rdataclass_t
dns_db_class(dns_db_t *db);
-/*
+/*%<
* The class of the database.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
*
- * The class of the database.
+ * \li The class of the database.
*/
isc_result_t
dns_db_beginload(dns_db_t *db, dns_addrdatasetfunc_t *addp,
dns_dbload_t **dbloadp);
-/*
+/*%<
* Begin loading 'db'.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * This is the first attempt to load 'db'.
+ * \li This is the first attempt to load 'db'.
*
- * addp != NULL && *addp == NULL
+ * \li addp != NULL && *addp == NULL
*
- * dbloadp != NULL && *dbloadp == NULL
+ * \li dbloadp != NULL && *dbloadp == NULL
*
* Ensures:
*
- * On success, *addp will be a valid dns_addrdatasetfunc_t suitable
+ * \li On success, *addp will be a valid dns_addrdatasetfunc_t suitable
* for loading 'db'. *dbloadp will be a valid DB load context which
* should be used as 'arg' when *addp is called.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used, syntax errors in the master file, etc.
*/
isc_result_t
dns_db_endload(dns_db_t *db, dns_dbload_t **dbloadp);
-/*
+/*%<
* Finish loading 'db'.
*
* Requires:
*
- * 'db' is a valid database that is being loaded.
+ * \li 'db' is a valid database that is being loaded.
*
- * dbloadp != NULL and *dbloadp is a valid database load context.
+ * \li dbloadp != NULL and *dbloadp is a valid database load context.
*
* Ensures:
*
- * *dbloadp == NULL
+ * \li *dbloadp == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used, syntax errors in the master file, etc.
*/
isc_result_t
dns_db_load(dns_db_t *db, const char *filename);
-/*
+
+isc_result_t
+dns_db_load2(dns_db_t *db, const char *filename, dns_masterformat_t format);
+/*%<
* Load master file 'filename' into 'db'.
*
* Notes:
- * This routine is equivalent to calling
+ * \li This routine is equivalent to calling
*
+ *\code
* dns_db_beginload();
* dns_master_loadfile();
* dns_db_endload();
+ *\endcode
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * This is the first attempt to load 'db'.
+ * \li This is the first attempt to load 'db'.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used, syntax errors in the master file, etc.
*/
isc_result_t
dns_db_dump(dns_db_t *db, dns_dbversion_t *version, const char *filename);
-/*
+
+isc_result_t
+dns_db_dump2(dns_db_t *db, dns_dbversion_t *version, const char *filename,
+ dns_masterformat_t masterformat);
+/*%<
* Dump version 'version' of 'db' to master file 'filename'.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'version' is a valid version.
+ * \li 'version' is a valid version.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used, OS file errors, etc.
*/
@@ -489,68 +502,68 @@ dns_db_dump(dns_db_t *db, dns_dbversion_t *version, const char *filename);
void
dns_db_currentversion(dns_db_t *db, dns_dbversion_t **versionp);
-/*
+/*%<
* Open the current version for reading.
*
* Requires:
*
- * 'db' is a valid database with zone semantics.
+ * \li 'db' is a valid database with zone semantics.
*
- * versionp != NULL && *verisonp == NULL
+ * \li versionp != NULL && *verisonp == NULL
*
* Ensures:
*
- * On success, '*versionp' is attached to the current version.
+ * \li On success, '*versionp' is attached to the current version.
*
*/
isc_result_t
dns_db_newversion(dns_db_t *db, dns_dbversion_t **versionp);
-/*
+/*%<
* Open a new version for reading and writing.
*
* Requires:
*
- * 'db' is a valid database with zone semantics.
+ * \li 'db' is a valid database with zone semantics.
*
- * versionp != NULL && *verisonp == NULL
+ * \li versionp != NULL && *verisonp == NULL
*
* Ensures:
*
- * On success, '*versionp' is attached to the current version.
+ * \li On success, '*versionp' is attached to the current version.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
void
dns_db_attachversion(dns_db_t *db, dns_dbversion_t *source,
dns_dbversion_t **targetp);
-/*
+/*%<
* Attach '*targetp' to 'source'.
*
* Requires:
*
- * 'db' is a valid database with zone semantics.
+ * \li 'db' is a valid database with zone semantics.
*
- * source is a valid open version
+ * \li source is a valid open version
*
- * targetp != NULL && *targetp == NULL
+ * \li targetp != NULL && *targetp == NULL
*
* Ensures:
*
- * '*targetp' is attached to source.
+ * \li '*targetp' is attached to source.
*/
void
dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
isc_boolean_t commit);
-/*
+/*%<
* Close version '*versionp'.
*
* Note: if '*versionp' is a read-write version and 'commit' is ISC_TRUE,
@@ -560,19 +573,19 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
*
* Requires:
*
- * 'db' is a valid database with zone semantics.
+ * \li 'db' is a valid database with zone semantics.
*
- * '*versionp' refers to a valid version.
+ * \li '*versionp' refers to a valid version.
*
- * If committing a writable version, then there must be no other
+ * \li If committing a writable version, then there must be no other
* outstanding references to the version (e.g. an active rdataset
* iterator).
*
* Ensures:
*
- * *versionp == NULL
+ * \li *versionp == NULL
*
- * If *versionp is a read-write version, and commit is ISC_TRUE, then
+ * \li If *versionp is a read-write version, and commit is ISC_TRUE, then
* the version will become the current version. If !commit, then all
* changes made in the version will be undone, and the version will
* not become the current version.
@@ -585,37 +598,37 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
isc_result_t
dns_db_findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
dns_dbnode_t **nodep);
-/*
+/*%<
* Find the node with name 'name'.
*
* Notes:
- * If 'create' is ISC_TRUE and no node with name 'name' exists, then
+ * \li If 'create' is ISC_TRUE and no node with name 'name' exists, then
* such a node will be created.
*
- * This routine is for finding or creating a node with the specified
+ * \li This routine is for finding or creating a node with the specified
* name. There are no partial matches. It is not suitable for use
* in building responses to ordinary DNS queries; clients which wish
* to do that should use dns_db_find() instead.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'name' is a valid, non-empty, absolute name.
+ * \li 'name' is a valid, non-empty, absolute name.
*
- * nodep != NULL && *nodep == NULL
+ * \li nodep != NULL && *nodep == NULL
*
* Ensures:
*
- * On success, *nodep is attached to the node with name 'name'.
+ * \li On success, *nodep is attached to the node with name 'name'.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND If !create and name not found.
- * ISC_R_NOMEMORY Can only happen if create is ISC_TRUE.
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND If !create and name not found.
+ * \li #ISC_R_NOMEMORY Can only happen if create is ISC_TRUE.
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
@@ -624,44 +637,44 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
dns_rdatatype_t type, unsigned int options, isc_stdtime_t now,
dns_dbnode_t **nodep, dns_name_t *foundname,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Find the best match for 'name' and 'type' in version 'version' of 'db'.
*
* Notes:
*
- * If type == dns_rdataset_any, then rdataset will not be bound.
+ * \li If type == dns_rdataset_any, then rdataset will not be bound.
*
- * If 'options' does not have DNS_DBFIND_GLUEOK set, then no glue will
- * be returned. For zone databases, glue is as defined in RFC 2181.
+ * \li If 'options' does not have #DNS_DBFIND_GLUEOK set, then no glue will
+ * be returned. For zone databases, glue is as defined in RFC2181.
* For cache databases, glue is any rdataset with a trust of
* dns_trust_glue.
*
- * If 'options' does not have DNS_DBFIND_PENDINGOK set, then no
+ * \li If 'options' does not have #DNS_DBFIND_PENDINGOK set, then no
* pending data will be returned. This option is only meaningful for
* cache databases.
*
- * If the DNS_DBFIND_NOWILD option is set, then wildcard matching will
+ * \li If the #DNS_DBFIND_NOWILD option is set, then wildcard matching will
* be disabled. This option is only meaningful for zone databases.
*
- * If the DNS_DBFIND_FORCENSEC option is set, the database is assumed to
+ * \li If the #DNS_DBFIND_FORCENSEC option is set, the database is assumed to
* have NSEC records, and these will be returned when appropriate. This
* is only necessary when querying a database that was not secure
* when created.
*
- * If the DNS_DBFIND_COVERINGNSEC option is set, then look for a
+ * \li If the DNS_DBFIND_COVERINGNSEC option is set, then look for a
* NSEC record that potentially covers 'name' if a answer cannot
* be found. Note the returned NSEC needs to be checked to ensure
* that it is correct. This only affects answers returned from the
* cache.
*
- * To respond to a query for SIG records, the caller should create a
+ * \li To respond to a query for SIG records, the caller should create a
* rdataset iterator and extract the signatures from each rdataset.
*
- * Making queries of type ANY with DNS_DBFIND_GLUEOK is not recommended,
+ * \li Making queries of type ANY with #DNS_DBFIND_GLUEOK is not recommended,
* because the burden of determining whether a given rdataset is valid
* glue or not falls upon the caller.
*
- * The 'now' field is ignored if 'db' is a zone database. If 'db' is a
+ * \li The 'now' field is ignored if 'db' is a zone database. If 'db' is a
* cache database, an rdataset will not be found unless it expires after
* 'now'. Any ANY query will not match unless at least one rdataset at
* the node expires after 'now'. If 'now' is zero, then the current time
@@ -669,43 +682,41 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'type' is not SIG, or a meta-RR type other than 'ANY' (e.g. 'OPT').
+ * \li 'type' is not SIG, or a meta-RR type other than 'ANY' (e.g. 'OPT').
*
- * 'nodep' is NULL, or nodep is a valid pointer and *nodep == NULL.
+ * \li 'nodep' is NULL, or nodep is a valid pointer and *nodep == NULL.
*
- * 'foundname' is a valid name with a dedicated buffer.
+ * \li 'foundname' is a valid name with a dedicated buffer.
*
- * 'rdataset' is NULL, or is a valid unassociated rdataset.
+ * \li 'rdataset' is NULL, or is a valid unassociated rdataset.
*
- * Ensures:
- * On a non-error completion:
+ * Ensures,
+ * on a non-error completion:
*
- * If nodep != NULL, then it is bound to the found node.
+ * \li If nodep != NULL, then it is bound to the found node.
*
- * If foundname != NULL, then it contains the full name of the
+ * \li If foundname != NULL, then it contains the full name of the
* found node.
*
- * If rdataset != NULL and type != dns_rdatatype_any, then
+ * \li If rdataset != NULL and type != dns_rdatatype_any, then
* rdataset is bound to the found rdataset.
*
- * Returns:
- *
* Non-error results are:
*
- * ISC_R_SUCCESS The desired node and type were
+ * \li #ISC_R_SUCCESS The desired node and type were
* found.
*
- * DNS_R_WILDCARD The desired node and type were
+ * \li #DNS_R_WILDCARD The desired node and type were
* found after performing
* wildcard matching. This is
* only returned if the
- * DNS_DBFIND_INDICATEWILD
+ * #DNS_DBFIND_INDICATEWILD
* option is set; otherwise
- * ISC_R_SUCCESS is returned.
+ * #ISC_R_SUCCESS is returned.
*
- * DNS_R_GLUE The desired node and type were
+ * \li #DNS_R_GLUE The desired node and type were
* found, but are glue. This
* result can only occur if
* the DNS_DBFIND_GLUEOK option
@@ -720,7 +731,7 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* take care not to return invalid
* glue to a client.
*
- * DNS_R_DELEGATION The data requested is beneath
+ * \li #DNS_R_DELEGATION The data requested is beneath
* a zone cut. node, foundname,
* and rdataset reference the
* NS RRset of the zone cut.
@@ -728,7 +739,7 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* then this is the deepest known
* delegation.
*
- * DNS_R_ZONECUT type == dns_rdatatype_any, and
+ * \li #DNS_R_ZONECUT type == dns_rdatatype_any, and
* the desired node is a zonecut.
* The caller must take care not
* to return inappropriate glue
@@ -737,24 +748,24 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* database and DNS_DBFIND_GLUEOK
* is set.
*
- * DNS_R_DNAME The data requested is beneath
+ * \li #DNS_R_DNAME The data requested is beneath
* a DNAME. node, foundname,
* and rdataset reference the
* DNAME RRset.
*
- * DNS_R_CNAME The rdataset requested was not
+ * \li #DNS_R_CNAME The rdataset requested was not
* found, but there is a CNAME
* at the desired name. node,
* foundname, and rdataset
* reference the CNAME RRset.
*
- * DNS_R_NXDOMAIN The desired name does not
+ * \li #DNS_R_NXDOMAIN The desired name does not
* exist.
*
- * DNS_R_NXRRSET The desired name exists, but
+ * \li #DNS_R_NXRRSET The desired name exists, but
* the desired type does not.
*
- * ISC_R_NOTFOUND The desired name does not
+ * \li #ISC_R_NOTFOUND The desired name does not
* exist, and no delegation could
* be found. This result can only
* occur if 'db' is a cache
@@ -762,34 +773,34 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* use its nameserver(s) of last
* resort (e.g. root hints).
*
- * DNS_R_NCACHENXDOMAIN The desired name does not
+ * \li #DNS_R_NCACHENXDOMAIN The desired name does not
* exist. 'node' is bound to the
* cache node with the desired
* name, and 'rdataset' contains
* the negative caching proof.
*
- * DNS_R_NCACHENXRRSET The desired type does not
+ * \li #DNS_R_NCACHENXRRSET The desired type does not
* exist. 'node' is bound to the
* cache node with the desired
* name, and 'rdataset' contains
* the negative caching proof.
*
- * DNS_R_EMPTYNAME The name exists but there is
+ * \li #DNS_R_EMPTYNAME The name exists but there is
* no data at the name.
*
- * DNS_R_COVERINGNSEC The returned data is a NSEC
+ * \li #DNS_R_COVERINGNSEC The returned data is a NSEC
* that potentially covers 'name'.
*
* Error results:
*
- * ISC_R_NOMEMORY
+ * \li #ISC_R_NOMEMORY
*
- * DNS_R_BADDB Data that is required to be
+ * \li #DNS_R_BADDB Data that is required to be
* present in the DB, e.g. an NSEC
* record in a secure zone, is not
* present.
*
- * Other results are possible, and should all be treated as
+ * \li Other results are possible, and should all be treated as
* errors.
*/
@@ -798,100 +809,97 @@ dns_db_findzonecut(dns_db_t *db, dns_name_t *name,
unsigned int options, isc_stdtime_t now,
dns_dbnode_t **nodep, dns_name_t *foundname,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Find the deepest known zonecut which encloses 'name' in 'db'.
*
* Notes:
*
- * If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
+ * \li If the #DNS_DBFIND_NOEXACT option is set, then the zonecut returned
* (if any) will be the deepest known ancestor of 'name'.
*
- * If 'now' is zero, then the current time will be used.
+ * \li If 'now' is zero, then the current time will be used.
*
* Requires:
*
- * 'db' is a valid database with cache semantics.
+ * \li 'db' is a valid database with cache semantics.
*
- * 'nodep' is NULL, or nodep is a valid pointer and *nodep == NULL.
+ * \li 'nodep' is NULL, or nodep is a valid pointer and *nodep == NULL.
*
- * 'foundname' is a valid name with a dedicated buffer.
+ * \li 'foundname' is a valid name with a dedicated buffer.
*
- * 'rdataset' is NULL, or is a valid unassociated rdataset.
+ * \li 'rdataset' is NULL, or is a valid unassociated rdataset.
*
- * Ensures:
- * On a non-error completion:
+ * Ensures, on a non-error completion:
*
- * If nodep != NULL, then it is bound to the found node.
+ * \li If nodep != NULL, then it is bound to the found node.
*
- * If foundname != NULL, then it contains the full name of the
- * found node.
+ * \li If foundname != NULL, then it contains the full name of the
+ * found node.
*
- * If rdataset != NULL and type != dns_rdatatype_any, then
- * rdataset is bound to the found rdataset.
+ * \li If rdataset != NULL and type != dns_rdatatype_any, then
+ * rdataset is bound to the found rdataset.
*
- * Returns:
+ * Non-error results are:
*
- * Non-error results are:
- *
- * ISC_R_SUCCESS
+ * \li #ISC_R_SUCCESS
*
- * ISC_R_NOTFOUND
+ * \li #ISC_R_NOTFOUND
*
- * Other results are possible, and should all be treated as
- * errors.
+ * \li Other results are possible, and should all be treated as
+ * errors.
*/
void
dns_db_attachnode(dns_db_t *db, dns_dbnode_t *source, dns_dbnode_t **targetp);
-/*
+/*%<
* Attach *targetp to source.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'source' is a valid node.
+ * \li 'source' is a valid node.
*
- * 'targetp' points to a NULL dns_node_t *.
+ * \li 'targetp' points to a NULL dns_node_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ * \li *targetp is attached to source.
*/
void
dns_db_detachnode(dns_db_t *db, dns_dbnode_t **nodep);
-/*
+/*%<
* Detach *nodep from its node.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'nodep' points to a valid node.
+ * \li 'nodep' points to a valid node.
*
* Ensures:
*
- * *nodep is NULL.
+ * \li *nodep is NULL.
*/
isc_result_t
dns_db_expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now);
-/*
+/*%<
* Mark as stale all records at 'node' which expire at or before 'now'.
*
* Note: if 'now' is zero, then the current time will be used.
*
* Requires:
*
- * 'db' is a valid cache database.
+ * \li 'db' is a valid cache database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*/
void
dns_db_printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out);
-/*
+/*%<
* Print a textual representation of the contents of the node to
* 'out'.
*
@@ -899,9 +907,9 @@ dns_db_printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out);
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*/
/***
@@ -911,29 +919,29 @@ dns_db_printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out);
isc_result_t
dns_db_createiterator(dns_db_t *db, isc_boolean_t relative_names,
dns_dbiterator_t **iteratorp);
-/*
+/*%<
* Create an iterator for version 'version' of 'db'.
*
* Notes:
*
- * If 'relative_names' is ISC_TRUE, then node names returned by the
+ * \li If 'relative_names' is ISC_TRUE, then node names returned by the
* iterator will be relative to the iterator's current origin. If
- * ISC_FALSE, then the node names will be absolute.
+ * #ISC_FALSE, then the node names will be absolute.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * iteratorp != NULL && *iteratorp == NULL
+ * \li iteratorp != NULL && *iteratorp == NULL
*
* Ensures:
*
- * On success, *iteratorp will be a valid database iterator.
+ * \li On success, *iteratorp will be a valid database iterator.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*/
/***
@@ -949,62 +957,62 @@ dns_db_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
dns_rdatatype_t type, dns_rdatatype_t covers,
isc_stdtime_t now, dns_rdataset_t *rdataset,
dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Search for an rdataset of type 'type' at 'node' that are in version
* 'version' of 'db'. If found, make 'rdataset' refer to it.
*
* Notes:
*
- * If 'version' is NULL, then the current version will be used.
+ * \li If 'version' is NULL, then the current version will be used.
*
- * Care must be used when using this routine to build a DNS response:
+ * \li Care must be used when using this routine to build a DNS response:
* 'node' should have been found with dns_db_find(), not
* dns_db_findnode(). No glue checking is done. No checking for
* pending data is done.
*
- * The 'now' field is ignored if 'db' is a zone database. If 'db' is a
+ * \li The 'now' field is ignored if 'db' is a zone database. If 'db' is a
* cache database, an rdataset will not be found unless it expires after
* 'now'. If 'now' is zero, then the current time will be used.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ * \li 'rdataset' is a valid, disassociated rdataset.
*
- * 'sigrdataset' is a valid, disassociated rdataset, or it is NULL.
+ * \li 'sigrdataset' is a valid, disassociated rdataset, or it is NULL.
*
- * If 'covers' != 0, 'type' must be SIG.
+ * \li If 'covers' != 0, 'type' must be SIG.
*
- * 'type' is not a meta-RR type such as 'ANY' or 'OPT'.
+ * \li 'type' is not a meta-RR type such as 'ANY' or 'OPT'.
*
* Ensures:
*
- * On success, 'rdataset' is associated with the found rdataset.
+ * \li On success, 'rdataset' is associated with the found rdataset.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
isc_result_t
dns_db_allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
isc_stdtime_t now, dns_rdatasetiter_t **iteratorp);
-/*
+/*%<
* Make '*iteratorp' an rdataset iteratator for all rdatasets at 'node' in
* version 'version' of 'db'.
*
* Notes:
*
- * If 'version' is NULL, then the current version will be used.
+ * \li If 'version' is NULL, then the current version will be used.
*
- * The 'now' field is ignored if 'db' is a zone database. If 'db' is a
+ * \li The 'now' field is ignored if 'db' is a zone database. If 'db' is a
* cache database, an rdataset will not be found unless it expires after
* 'now'. Any ANY query will not match unless at least one rdataset at
* the node expires after 'now'. If 'now' is zero, then the current time
@@ -1012,22 +1020,22 @@ dns_db_allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*
- * iteratorp != NULL && *iteratorp == NULL
+ * \li iteratorp != NULL && *iteratorp == NULL
*
* Ensures:
*
- * On success, '*iteratorp' is a valid rdataset iterator.
+ * \li On success, '*iteratorp' is a valid rdataset iterator.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
@@ -1035,58 +1043,58 @@ isc_result_t
dns_db_addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
isc_stdtime_t now, dns_rdataset_t *rdataset,
unsigned int options, dns_rdataset_t *addedrdataset);
-/*
+/*%<
* Add 'rdataset' to 'node' in version 'version' of 'db'.
*
* Notes:
*
- * If the database has zone semantics, the DNS_DBADD_MERGE option is set,
+ * \li If the database has zone semantics, the #DNS_DBADD_MERGE option is set,
* and an rdataset of the same type as 'rdataset' already exists at
* 'node' then the contents of 'rdataset' will be merged with the existing
* rdataset. If the option is not set, then rdataset will replace any
* existing rdataset of the same type. If not merging and the
- * DNS_DBADD_FORCE option is set, then the data will update the database
+ * #DNS_DBADD_FORCE option is set, then the data will update the database
* without regard to trust levels. If not forcing the data, then the
* rdataset will only be added if its trust level is >= the trust level of
* any existing rdataset. Forcing is only meaningful for cache databases.
- * If DNS_DBADD_EXACT is set then there must be no rdata in common between
- * the old and new rdata sets. If DNS_DBADD_EXACTTTL is set then both
+ * If #DNS_DBADD_EXACT is set then there must be no rdata in common between
+ * the old and new rdata sets. If #DNS_DBADD_EXACTTTL is set then both
* the old and new rdata sets must have the same ttl.
*
- * The 'now' field is ignored if 'db' is a zone database. If 'db' is
+ * \li The 'now' field is ignored if 'db' is a zone database. If 'db' is
* a cache database, then the added rdataset will expire no later than
* now + rdataset->ttl.
*
- * If 'addedrdataset' is not NULL, then it will be attached to the
+ * \li If 'addedrdataset' is not NULL, then it will be attached to the
* resulting new rdataset in the database, or to the existing data if
* the existing data was better.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*
- * 'rdataset' is a valid, associated rdataset with the same class
+ * \li 'rdataset' is a valid, associated rdataset with the same class
* as 'db'.
*
- * 'addedrdataset' is NULL, or a valid, unassociated rdataset.
+ * \li 'addedrdataset' is NULL, or a valid, unassociated rdataset.
*
- * The database has zone semantics and 'version' is a valid
+ * \li The database has zone semantics and 'version' is a valid
* read-write version, or the database has cache semantics
* and version is NULL.
*
- * If the database has cache semantics, the DNS_DBADD_MERGE option must
+ * \li If the database has cache semantics, the #DNS_DBADD_MERGE option must
* not be set.
*
* Returns:
*
- * ISC_R_SUCCESS
- * DNS_R_UNCHANGED The operation did not change anything.
- * ISC_R_NOMEMORY
- * DNS_R_NOTEXACT
+ * \li #ISC_R_SUCCESS
+ * \li #DNS_R_UNCHANGED The operation did not change anything.
+ * \li #ISC_R_NOMEMORY
+ * \li #DNS_R_NOTEXACT
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
@@ -1094,41 +1102,41 @@ isc_result_t
dns_db_subtractrdataset(dns_db_t *db, dns_dbnode_t *node,
dns_dbversion_t *version, dns_rdataset_t *rdataset,
unsigned int options, dns_rdataset_t *newrdataset);
-/*
+/*%<
* Remove any rdata in 'rdataset' from 'node' in version 'version' of
* 'db'.
*
* Notes:
*
- * If 'newrdataset' is not NULL, then it will be attached to the
+ * \li If 'newrdataset' is not NULL, then it will be attached to the
* resulting new rdataset in the database, unless the rdataset has
* become nonexistent. If DNS_DBSUB_EXACT is set then all elements
* of 'rdataset' must exist at 'node'.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*
- * 'rdataset' is a valid, associated rdataset with the same class
+ * \li 'rdataset' is a valid, associated rdataset with the same class
* as 'db'.
*
- * 'newrdataset' is NULL, or a valid, unassociated rdataset.
+ * \li 'newrdataset' is NULL, or a valid, unassociated rdataset.
*
- * The database has zone semantics and 'version' is a valid
+ * \li The database has zone semantics and 'version' is a valid
* read-write version.
*
* Returns:
*
- * ISC_R_SUCCESS
- * DNS_R_UNCHANGED The operation did not change anything.
- * DNS_R_NXRRSET All rdata of the same type as those
+ * \li #ISC_R_SUCCESS
+ * \li #DNS_R_UNCHANGED The operation did not change anything.
+ * \li #DNS_R_NXRRSET All rdata of the same type as those
* in 'rdataset' have been deleted.
- * DNS_R_NOTEXACT Some part of 'rdataset' did not
+ * \li #DNS_R_NOTEXACT Some part of 'rdataset' did not
* exist and DNS_DBSUB_EXACT was set.
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
@@ -1136,134 +1144,154 @@ isc_result_t
dns_db_deleterdataset(dns_db_t *db, dns_dbnode_t *node,
dns_dbversion_t *version, dns_rdatatype_t type,
dns_rdatatype_t covers);
-/*
+/*%<
* Make it so that no rdataset of type 'type' exists at 'node' in version
* version 'version' of 'db'.
*
* Notes:
*
- * If 'type' is dns_rdatatype_any, then no rdatasets will exist in
+ * \li If 'type' is dns_rdatatype_any, then no rdatasets will exist in
* 'version' (provided that the dns_db_deleterdataset() isn't followed
* by one or more dns_db_addrdataset() calls).
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
- * 'node' is a valid node.
+ * \li 'node' is a valid node.
*
- * The database has zone semantics and 'version' is a valid
+ * \li The database has zone semantics and 'version' is a valid
* read-write version, or the database has cache semantics
* and version is NULL.
*
- * 'type' is not a meta-RR type, except for dns_rdatatype_any, which is
+ * \li 'type' is not a meta-RR type, except for dns_rdatatype_any, which is
* allowed.
*
- * If 'covers' != 0, 'type' must be SIG.
+ * \li If 'covers' != 0, 'type' must be SIG.
*
* Returns:
*
- * ISC_R_SUCCESS
- * DNS_R_UNCHANGED No rdatasets of 'type' existed before
+ * \li #ISC_R_SUCCESS
+ * \li #DNS_R_UNCHANGED No rdatasets of 'type' existed before
* the operation was attempted.
*
- * Other results are possible, depending upon the database
+ * \li Other results are possible, depending upon the database
* implementation used.
*/
isc_result_t
dns_db_getsoaserial(dns_db_t *db, dns_dbversion_t *ver, isc_uint32_t *serialp);
-/*
+/*%<
* Get the current SOA serial number from a zone database.
*
* Requires:
- * 'db' is a valid database with zone semantics.
- * 'ver' is a valid version.
+ * \li 'db' is a valid database with zone semantics.
+ * \li 'ver' is a valid version.
*/
void
dns_db_overmem(dns_db_t *db, isc_boolean_t overmem);
-/*
+/*%<
* Enable / disable agressive cache cleaning.
*/
unsigned int
dns_db_nodecount(dns_db_t *db);
-/*
+/*%<
* Count the number of nodes in 'db'.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
- * The number of nodes in the database
+ * \li The number of nodes in the database
*/
void
dns_db_settask(dns_db_t *db, isc_task_t *task);
-/*
+/*%<
* If task is set then the final detach maybe performed asynchronously.
*
* Requires:
- * 'db' is a valid database.
- * 'task' to be valid or NULL.
+ * \li 'db' is a valid database.
+ * \li 'task' to be valid or NULL.
*/
isc_boolean_t
dns_db_ispersistent(dns_db_t *db);
-/*
+/*%<
* Is 'db' persistent? A persistent database does not need to be loaded
* from disk or written to disk.
*
* Requires:
*
- * 'db' is a valid database.
+ * \li 'db' is a valid database.
*
* Returns:
- * ISC_TRUE 'db' is persistent.
- * ISC_FALSE 'db' is not persistent.
+ * \li #ISC_TRUE 'db' is persistent.
+ * \li #ISC_FALSE 'db' is not persistent.
*/
isc_result_t
dns_db_register(const char *name, dns_dbcreatefunc_t create, void *driverarg,
isc_mem_t *mctx, dns_dbimplementation_t **dbimp);
-/*
+/*%<
* Register a new database implementation and add it to the list of
* supported implementations.
*
* Requires:
*
- * 'name' is not NULL
- * 'order' is a valid function pointer
- * 'mctx' is a valid memory context
- * dbimp != NULL && *dbimp == NULL
+ * \li 'name' is not NULL
+ * \li 'order' is a valid function pointer
+ * \li 'mctx' is a valid memory context
+ * \li dbimp != NULL && *dbimp == NULL
*
* Returns:
- * ISC_R_SUCCESS The registration succeeded
- * ISC_R_NOMEMORY Out of memory
- * ISC_R_EXISTS A database implementation with the same name exists
+ * \li #ISC_R_SUCCESS The registration succeeded
+ * \li #ISC_R_NOMEMORY Out of memory
+ * \li #ISC_R_EXISTS A database implementation with the same name exists
*
* Ensures:
*
- * *dbimp points to an opaque structure which must be passed to
+ * \li *dbimp points to an opaque structure which must be passed to
* dns_db_unregister().
*/
void
dns_db_unregister(dns_dbimplementation_t **dbimp);
-/*
+/*%<
* Remove a database implementation from the the list of supported
* implementations. No databases of this type can be active when this
* is called.
*
* Requires:
- * dbimp != NULL && *dbimp == NULL
+ * \li dbimp != NULL && *dbimp == NULL
*
* Ensures:
*
- * Any memory allocated in *dbimp will be freed.
+ * \li Any memory allocated in *dbimp will be freed.
+ */
+
+isc_result_t
+dns_db_getoriginnode(dns_db_t *db, dns_dbnode_t **nodep);
+/*%<
+ * Get the origin DB node corresponding to the DB's zone. This function
+ * should typically succeed unless the underlying DB implementation doesn't
+ * support the feature.
+ *
+ * Requires:
+ *
+ * \li 'db' is a valid zone database.
+ * \li 'nodep' != NULL && '*nodep' == NULL
+ *
+ * Ensures:
+ * \li On success, '*nodep' will point to the DB node of the zone's origin.
+ *
+ * Returns:
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND - the DB implementation does not support this feature.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/dbiterator.h b/contrib/bind9/lib/dns/include/dns/dbiterator.h
index 8b8cb1b..47ce082 100644
--- a/contrib/bind9/lib/dns/include/dns/dbiterator.h
+++ b/contrib/bind9/lib/dns/include/dns/dbiterator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dbiterator.h,v 1.18.206.1 2004/03/06 08:13:54 marka Exp $ */
+/* $Id: dbiterator.h,v 1.19.18.2 2005/04/29 00:16:11 marka Exp $ */
#ifndef DNS_DBITERATOR_H
#define DNS_DBITERATOR_H 1
@@ -24,9 +24,8 @@
***** Module Info
*****/
-/*
- * DNS DB Iterator
- *
+/*! \file
+ * \brief
* The DNS DB Iterator interface allows iteration of all of the nodes in a
* database.
*
@@ -37,25 +36,25 @@
* It is the client's responsibility to call dns_db_detachnode() on all
* nodes returned.
*
- * XXX <more> XXX
+ * XXX &lt;more&gt; XXX
*
* MP:
- * The iterator itself is not locked. The caller must ensure
+ *\li The iterator itself is not locked. The caller must ensure
* synchronization.
*
- * The iterator methods ensure appropriate database locking.
+ *\li The iterator methods ensure appropriate database locking.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
/*****
@@ -89,7 +88,7 @@ typedef struct dns_dbiteratormethods {
#define DNS_DBITERATOR_MAGIC ISC_MAGIC('D','N','S','I')
#define DNS_DBITERATOR_VALID(dbi) ISC_MAGIC_VALID(dbi, DNS_DBITERATOR_MAGIC)
-/*
+/*%
* This structure is actually just the common prefix of a DNS db
* implementation's version of a dns_dbiterator_t.
*
@@ -110,136 +109,136 @@ struct dns_dbiterator {
void
dns_dbiterator_destroy(dns_dbiterator_t **iteratorp);
-/*
+/*%<
* Destroy '*iteratorp'.
*
* Requires:
*
- * '*iteratorp' is a valid iterator.
+ *\li '*iteratorp' is a valid iterator.
*
* Ensures:
*
- * All resources used by the iterator are freed.
+ *\li All resources used by the iterator are freed.
*
- * *iteratorp == NULL.
+ *\li *iteratorp == NULL.
*/
isc_result_t
dns_dbiterator_first(dns_dbiterator_t *iterator);
-/*
+/*%<
* Move the node cursor to the first node in the database (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no nodes in the database.
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no nodes in the database.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_last(dns_dbiterator_t *iterator);
-/*
+/*%<
* Move the node cursor to the last node in the database (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no nodes in the database.
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no nodes in the database.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name);
-/*
+/*%<
* Move the node cursor to the node with name 'name'.
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOTFOUND
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_prev(dns_dbiterator_t *iterator);
-/*
+/*%<
* Move the node cursor to the previous node in the database (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no more nodes in the
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no more nodes in the
* database.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_next(dns_dbiterator_t *iterator);
-/*
+/*%<
* Move the node cursor to the next node in the database (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no more nodes in the
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no more nodes in the
* database.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
dns_name_t *name);
-/*
+/*%<
* Return the current node.
*
* Notes:
- * If 'name' is not NULL, it will be set to the name of the node.
+ *\li If 'name' is not NULL, it will be set to the name of the node.
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
- * nodep != NULL && *nodep == NULL
+ *\li nodep != NULL && *nodep == NULL
*
- * The node cursor of 'iterator' is at a valid location (i.e. the
+ *\li The node cursor of 'iterator' is at a valid location (i.e. the
* result of last call to a cursor movement command was ISC_R_SUCCESS).
*
- * 'name' is NULL, or is a valid name with a dedicated buffer.
+ *\li 'name' is NULL, or is a valid name with a dedicated buffer.
*
* Returns:
*
- * ISC_R_SUCCESS
- * DNS_R_NEWORIGIN If this iterator was created with
+ *\li #ISC_R_SUCCESS
+ *\li #DNS_R_NEWORIGIN If this iterator was created with
* 'relative_names' set to ISC_TRUE,
- * then DNS_R_NEWORIGIN will be returned
+ * then #DNS_R_NEWORIGIN will be returned
* when the origin the names are
* relative to changes. This result
* can occur only when 'name' is not
* NULL. This is also a successful
* result.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_pause(dns_dbiterator_t *iterator);
-/*
+/*%<
* Pause iteration.
*
* Calling a cursor movement method or dns_dbiterator_current() may cause
@@ -250,47 +249,47 @@ dns_dbiterator_pause(dns_dbiterator_t *iterator);
* iterator method in the immediate future.
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Ensures:
- * Any database locks being held for efficiency of iterator access are
+ *\li Any database locks being held for efficiency of iterator access are
* released.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name);
-/*
+/*%<
* Return the origin to which returned node names are relative.
*
* Requires:
*
- * 'iterator' is a valid relative_names iterator.
+ *\li 'iterator' is a valid relative_names iterator.
*
- * 'name' is a valid name with a dedicated buffer.
+ *\li 'name' is a valid name with a dedicated buffer.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
void
dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, isc_boolean_t mode);
-/*
+/*%<
* Indicate that the given iterator is/is not cleaning the DB.
*
* Notes:
- * When 'mode' is ISC_TRUE,
+ *\li When 'mode' is ISC_TRUE,
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/dbtable.h b/contrib/bind9/lib/dns/include/dns/dbtable.h
index 3874b46..18d3e50 100644
--- a/contrib/bind9/lib/dns/include/dns/dbtable.h
+++ b/contrib/bind9/lib/dns/include/dns/dbtable.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dbtable.h,v 1.16.206.1 2004/03/06 08:13:55 marka Exp $ */
+/* $Id: dbtable.h,v 1.17.18.2 2005/04/29 00:16:11 marka Exp $ */
#ifndef DNS_DBTABLE_H
#define DNS_DBTABLE_H 1
@@ -24,26 +24,27 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* DNS DB Tables
*
- * XXX <TBS> XXX
+ * XXX TBS XXX
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * None.
+ *\li None.
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
#include <isc/lang.h>
@@ -57,106 +58,106 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
dns_dbtable_t **dbtablep);
-/*
+/*%<
* Make a new dbtable of class 'rdclass'
*
* Requires:
- * mctx != NULL
- * dbtablep != NULL && *dptablep == NULL
- * 'rdclass' is a valid class
+ *\li mctx != NULL
+ * \li dbtablep != NULL && *dptablep == NULL
+ *\li 'rdclass' is a valid class
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_UNEXPECTED
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_UNEXPECTED
*/
void
dns_dbtable_attach(dns_dbtable_t *source, dns_dbtable_t **targetp);
-/*
+/*%<
* Attach '*targetp' to 'source'.
*
* Requires:
*
- * 'source' is a valid dbtable.
+ *\li 'source' is a valid dbtable.
*
- * 'targetp' points to a NULL dns_dbtable_t *.
+ *\li 'targetp' points to a NULL dns_dbtable_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*/
void
dns_dbtable_detach(dns_dbtable_t **dbtablep);
-/*
+/*%<
* Detach *dbtablep from its dbtable.
*
* Requires:
*
- * '*dbtablep' points to a valid dbtable.
+ *\li '*dbtablep' points to a valid dbtable.
*
* Ensures:
*
- * *dbtablep is NULL.
- *
- * If '*dbtablep' is the last reference to the dbtable,
+ *\li *dbtablep is NULL.
*
- * All resources used by the dbtable will be freed
+ *\li If '*dbtablep' is the last reference to the dbtable,
+ * all resources used by the dbtable will be freed
*/
isc_result_t
dns_dbtable_add(dns_dbtable_t *dbtable, dns_db_t *db);
-/*
+/*%<
* Add 'db' to 'dbtable'.
*
* Requires:
- * 'dbtable' is a valid dbtable.
+ *\li 'dbtable' is a valid dbtable.
*
- * 'db' is a valid database with the same class as 'dbtable'
+ *\li 'db' is a valid database with the same class as 'dbtable'
*/
void
dns_dbtable_remove(dns_dbtable_t *dbtable, dns_db_t *db);
-/*
+/*%<
* Remove 'db' from 'dbtable'.
*
* Requires:
- * 'db' was previously added to 'dbtable'.
+ *\li 'db' was previously added to 'dbtable'.
*/
void
dns_dbtable_adddefault(dns_dbtable_t *dbtable, dns_db_t *db);
-/*
+/*%<
* Use 'db' as the result of a dns_dbtable_find() if no better match is
* available.
*/
void
dns_dbtable_getdefault(dns_dbtable_t *dbtable, dns_db_t **db);
-/*
+/*%<
* Get the 'db' used as the result of a dns_dbtable_find()
* if no better match is available.
*/
void
dns_dbtable_removedefault(dns_dbtable_t *dbtable);
-/*
+/*%<
* Remove the default db from 'dbtable'.
*/
isc_result_t
dns_dbtable_find(dns_dbtable_t *dbtable, dns_name_t *name,
unsigned int options, dns_db_t **dbp);
-/*
+/*%<
* Find the deepest match to 'name' in the dbtable, and return it
*
* Notes:
- * If the DNS_DBTABLEFIND_NOEXACT option is set, the best partial
+ *\li If the DNS_DBTABLEFIND_NOEXACT option is set, the best partial
* match (if any) to 'name' will be returned.
*
- * Returns: ISC_R_SUCCESS on success
- * <something else> no default and match
+ * Returns:
+ * \li #ISC_R_SUCCESS on success
+ *\li something else: no default and match
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/diff.h b/contrib/bind9/lib/dns/include/dns/diff.h
index 604f702..cd96a0b 100644
--- a/contrib/bind9/lib/dns/include/dns/diff.h
+++ b/contrib/bind9/lib/dns/include/dns/diff.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: diff.h,v 1.4.12.3 2004/03/08 09:04:35 marka Exp $ */
+/* $Id: diff.h,v 1.6.18.2 2005/04/29 00:16:12 marka Exp $ */
#ifndef DNS_DIFF_H
#define DNS_DIFF_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* A diff is a convenience type representing a list of changes to be
* made to a database.
*/
@@ -44,7 +45,7 @@
*** Types
***/
-/*
+/*%
* A dns_difftuple_t represents a single RR being added or deleted.
* The RR type and class are in the 'rdata' member; the class is always
* the real one, not a DynDNS meta-class, so that the rdatas can be
@@ -61,9 +62,9 @@
*/
typedef enum {
- DNS_DIFFOP_ADD, /* Add an RR. */
- DNS_DIFFOP_DEL, /* Delete an RR. */
- DNS_DIFFOP_EXISTS /* Assert RR existence. */
+ DNS_DIFFOP_ADD, /*%< Add an RR. */
+ DNS_DIFFOP_DEL, /*%< Delete an RR. */
+ DNS_DIFFOP_EXISTS /*%< Assert RR existence. */
} dns_diffop_t;
typedef struct dns_difftuple dns_difftuple_t;
@@ -82,7 +83,7 @@ struct dns_difftuple {
/* Variable-size name data and rdata follows. */
};
-/*
+/*%
* A dns_diff_t represents a set of changes being applied to
* a zone. Diffs are also used to represent "RRset exists
* (value dependent)" prerequisites.
@@ -116,106 +117,106 @@ isc_result_t
dns_difftuple_create(isc_mem_t *mctx,
dns_diffop_t op, dns_name_t *name, dns_ttl_t ttl,
dns_rdata_t *rdata, dns_difftuple_t **tp);
-/*
+/*%<
* Create a tuple. Deep copies are made of the name and rdata, so
* they need not remain valid after the call.
*
* Requires:
- * *tp != NULL && *tp == NULL.
+ *\li *tp != NULL && *tp == NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li ISC_R_SUCCESS
+ * \li ISC_R_NOMEMORY
*/
void
dns_difftuple_free(dns_difftuple_t **tp);
-/*
+/*%<
* Free a tuple.
*
* Requires:
- * **tp is a valid tuple.
+ * \li **tp is a valid tuple.
*
* Ensures:
- * *tp == NULL
- * All memory used by the tuple is freed.
+ * \li *tp == NULL
+ * \li All memory used by the tuple is freed.
*/
isc_result_t
dns_difftuple_copy(dns_difftuple_t *orig, dns_difftuple_t **copyp);
-/*
+/*%<
* Copy a tuple.
*
* Requires:
- * 'orig' points to a valid tuple
- * copyp != NULL && *copyp == NULL
+ * \li 'orig' points to a valid tuple
+ *\li copyp != NULL && *copyp == NULL
*/
void
dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff);
-/*
+/*%<
* Initialize a diff.
*
* Requires:
- * 'diff' points to an uninitialized dns_diff_t
- * allocated by the caller.
+ * \li 'diff' points to an uninitialized dns_diff_t
+ * \li allocated by the caller.
*
* Ensures:
- * '*diff' is a valid, empty diff.
+ * \li '*diff' is a valid, empty diff.
*/
void
dns_diff_clear(dns_diff_t *diff);
-/*
+/*%<
* Clear a diff, destroying all its tuples.
*
* Requires:
- * 'diff' points to a valid dns_diff_t.
+ * \li 'diff' points to a valid dns_diff_t.
*
* Ensures:
- * Any tuples in the diff are destroyed.
+ * \li Any tuples in the diff are destroyed.
* The diff now empty, but it is still valid
* and may be reused without calling dns_diff_init
* again. The only memory used is that of the
* dns_diff_t structure itself.
*
* Notes:
- * Managing the memory of the dns_diff_t structure itself
+ * \li Managing the memory of the dns_diff_t structure itself
* is the caller's responsibility.
*/
void
dns_diff_append(dns_diff_t *diff, dns_difftuple_t **tuple);
-/*
+/*%<
* Append a single tuple to a diff.
*
- * 'diff' is a valid diff.
- * '*tuple' is a valid tuple.
+ *\li 'diff' is a valid diff.
+ * \li '*tuple' is a valid tuple.
*
* Ensures:
- * *tuple is NULL.
- * The tuple has been freed, or will be freed when the diff is cleared.
+ *\li *tuple is NULL.
+ *\li The tuple has been freed, or will be freed when the diff is cleared.
*/
void
dns_diff_appendminimal(dns_diff_t *diff, dns_difftuple_t **tuple);
-/*
+/*%<
* Append 'tuple' to 'diff', removing any duplicate
* or conflicting updates as needed to create a minimal diff.
*
* Requires:
- * 'diff' is a minimal diff.
+ *\li 'diff' is a minimal diff.
*
* Ensures:
- * 'diff' is still a minimal diff.
- * *tuple is NULL.
- * The tuple has been freed, or will be freed when the diff is cleared.
+ *\li 'diff' is still a minimal diff.
+ * \li *tuple is NULL.
+ * \li The tuple has been freed, or will be freed when the diff is cleared.
*
*/
isc_result_t
dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare);
-/*
+/*%<
* Sort 'diff' in-place according to the comparison function 'compare'.
*/
@@ -223,7 +224,7 @@ isc_result_t
dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver);
isc_result_t
dns_diff_applysilently(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver);
-/*
+/*%<
* Apply 'diff' to the database 'db'.
*
* dns_diff_apply() logs warnings about updates with no effect or
@@ -234,44 +235,44 @@ dns_diff_applysilently(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver);
* but less efficient.
*
* Requires:
- * *diff is a valid diff (possibly empty), containing
- * tuples of type DNS_DIFFOP_ADD and/or
- * For DNS_DIFFOP_DEL tuples, the TTL is ignored.
+ *\li *diff is a valid diff (possibly empty), containing
+ * tuples of type #DNS_DIFFOP_ADD and/or
+ * For #DNS_DIFFOP_DEL tuples, the TTL is ignored.
*
*/
isc_result_t
dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc,
void *add_private);
-/*
+/*%<
* Like dns_diff_apply, but for use when loading a new database
* instead of modifying an existing one. This bypasses the
* database transaction mechanisms.
*
* Requires:
- * 'addfunc' is a valid dns_addradatasetfunc_t obtained from
+ *\li 'addfunc' is a valid dns_addradatasetfunc_t obtained from
* dns_db_beginload()
*
- * 'add_private' points to a corresponding dns_dbload_t *
+ *\li 'add_private' points to a corresponding dns_dbload_t *
* (XXX why is it a void pointer, then?)
*/
isc_result_t
dns_diff_print(dns_diff_t *diff, FILE *file);
-/*
+/*%<
* Print the differences to 'file' or if 'file' is NULL via the
* logging system.
*
* Require:
- * 'diff' to be valid.
- * 'file' to refer to a open file or NULL.
+ *\li 'diff' to be valid.
+ *\li 'file' to refer to a open file or NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_UNEXPECTED
- * any error from dns_rdataset_totext()
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_UNEXPECTED
+ *\li any error from dns_rdataset_totext()
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/dispatch.h b/contrib/bind9/lib/dns/include/dns/dispatch.h
index 201a65a..47f6b20 100644
--- a/contrib/bind9/lib/dns/include/dns/dispatch.h
+++ b/contrib/bind9/lib/dns/include/dns/dispatch.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.h,v 1.45.2.2.4.2 2004/03/06 08:13:55 marka Exp $ */
+/* $Id: dispatch.h,v 1.48.18.2 2005/04/29 00:16:12 marka Exp $ */
#ifndef DNS_DISPATCH_H
#define DNS_DISPATCH_H 1
@@ -24,14 +24,14 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* DNS Dispatch Management
- *
* Shared UDP and single-use TCP dispatches for queries and responses.
*
* MP:
*
- * All locking is performed internally to each dispatch.
+ *\li All locking is performed internally to each dispatch.
* Restrictions apply to dns_dispatch_removeresponse().
*
* Reliability:
@@ -40,12 +40,12 @@
*
* Security:
*
- * Depends on the isc_socket_t and dns_message_t for prevention of
+ *\li Depends on the isc_socket_t and dns_message_t for prevention of
* buffer overruns.
*
* Standards:
*
- * None.
+ *\li None.
*/
/***
@@ -61,7 +61,7 @@
ISC_LANG_BEGINDECLS
-/*
+/*%
* This event is sent to a task when a response comes in.
* No part of this structure should ever be modified by the caller,
* other than parts of the buffer. The holy parts of the buffer are
@@ -79,16 +79,17 @@ ISC_LANG_BEGINDECLS
*/
struct dns_dispatchevent {
- ISC_EVENT_COMMON(dns_dispatchevent_t); /* standard event common */
- isc_result_t result; /* result code */
- isc_int32_t id; /* message id */
- isc_sockaddr_t addr; /* address recv'd from */
- struct in6_pktinfo pktinfo; /* reply info for v6 */
- isc_buffer_t buffer; /* data buffer */
- isc_uint32_t attributes; /* mirrored from socket.h */
+ ISC_EVENT_COMMON(dns_dispatchevent_t); /*%< standard event common */
+ isc_result_t result; /*%< result code */
+ isc_int32_t id; /*%< message id */
+ isc_sockaddr_t addr; /*%< address recv'd from */
+ struct in6_pktinfo pktinfo; /*%< reply info for v6 */
+ isc_buffer_t buffer; /*%< data buffer */
+ isc_uint32_t attributes; /*%< mirrored from socket.h */
};
-/*
+/*@{*/
+/*%
* Attributes for added dispatchers.
*
* Values with the mask 0xffff0000 are application defined.
@@ -121,83 +122,84 @@ struct dns_dispatchevent {
#define DNS_DISPATCHATTR_NOLISTEN 0x00000020U
#define DNS_DISPATCHATTR_MAKEQUERY 0x00000040U
#define DNS_DISPATCHATTR_CONNECTED 0x00000080U
+/*@}*/
isc_result_t
dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
dns_dispatchmgr_t **mgrp);
-/*
+/*%<
* Creates a new dispatchmgr object.
*
* Requires:
- * "mctx" be a valid memory context.
+ *\li "mctx" be a valid memory context.
*
- * mgrp != NULL && *mgrp == NULL
+ *\li mgrp != NULL && *mgrp == NULL
*
- * "entropy" may be NULL, in which case an insecure random generator
+ *\li "entropy" may be NULL, in which case an insecure random generator
* will be used. If it is non-NULL, it must be a valid entropy
* source.
*
* Returns:
- * ISC_R_SUCCESS -- all ok
+ *\li ISC_R_SUCCESS -- all ok
*
- * anything else -- failure
+ *\li anything else -- failure
*/
void
dns_dispatchmgr_destroy(dns_dispatchmgr_t **mgrp);
-/*
+/*%<
* Destroys the dispatchmgr when it becomes empty. This could be
* immediately.
*
* Requires:
- * mgrp != NULL && *mgrp is a valid dispatchmgr.
+ *\li mgrp != NULL && *mgrp is a valid dispatchmgr.
*/
void
dns_dispatchmgr_setblackhole(dns_dispatchmgr_t *mgr, dns_acl_t *blackhole);
-/*
+/*%<
* Sets the dispatcher's "blackhole list," a list of addresses that will
* be ignored by all dispatchers created by the dispatchmgr.
*
* Requires:
- * mgrp is a valid dispatchmgr
- * blackhole is a valid acl
+ * \li mgrp is a valid dispatchmgr
+ * \li blackhole is a valid acl
*/
dns_acl_t *
dns_dispatchmgr_getblackhole(dns_dispatchmgr_t *mgr);
-/*
+/*%<
* Gets a pointer to the dispatcher's current blackhole list,
* without incrementing its reference count.
*
* Requires:
- * mgr is a valid dispatchmgr
+ *\li mgr is a valid dispatchmgr
* Returns:
- * A pointer to the current blackhole list, or NULL.
+ *\li A pointer to the current blackhole list, or NULL.
*/
void
dns_dispatchmgr_setblackportlist(dns_dispatchmgr_t *mgr,
dns_portlist_t *portlist);
-/*
+/*%<
* Sets a list of UDP ports that won't be used when creating a udp
* dispatch with a wildcard port.
*
* Requires:
- * mgr is a valid dispatchmgr
- * portlist to be NULL or a valid port list.
+ *\li mgr is a valid dispatchmgr
+ *\li portlist to be NULL or a valid port list.
*/
dns_portlist_t *
dns_dispatchmgr_getblackportlist(dns_dispatchmgr_t *mgr);
-/*
+/*%<
* Return the current port list.
*
* Requires:
- * mgr is a valid dispatchmgr
+ *\li mgr is a valid dispatchmgr
*/
@@ -210,29 +212,29 @@ dns_dispatch_getudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
unsigned int buckets, unsigned int increment,
unsigned int attributes, unsigned int mask,
dns_dispatch_t **dispp);
-/*
+/*%<
* Attach to existing dns_dispatch_t if one is found with dns_dispatchmgr_find,
* otherwise create a new UDP dispatch.
*
* Requires:
- * All pointer parameters be valid for their respective types.
+ *\li All pointer parameters be valid for their respective types.
*
- * dispp != NULL && *disp == NULL
+ *\li dispp != NULL && *disp == NULL
*
- * 512 <= buffersize <= 64k
+ *\li 512 <= buffersize <= 64k
*
- * maxbuffers > 0
+ *\li maxbuffers > 0
*
- * buckets < 2097169
+ *\li buckets < 2097169
*
- * increment > buckets
+ *\li increment > buckets
*
- * (attributes & DNS_DISPATCHATTR_TCP) == 0
+ *\li (attributes & DNS_DISPATCHATTR_TCP) == 0
*
* Returns:
- * ISC_R_SUCCESS -- success.
+ *\li ISC_R_SUCCESS -- success.
*
- * Anything else -- failure.
+ *\li Anything else -- failure.
*/
isc_result_t
@@ -241,7 +243,7 @@ dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
unsigned int maxbuffers, unsigned int maxrequests,
unsigned int buckets, unsigned int increment,
unsigned int attributes, dns_dispatch_t **dispp);
-/*
+/*%<
* Create a new dns_dispatch and attach it to the provided isc_socket_t.
*
* For all dispatches, "buffersize" is the maximum packet size we will
@@ -258,65 +260,65 @@ dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
*
* Requires:
*
- * mgr is a valid dispatch manager.
+ *\li mgr is a valid dispatch manager.
*
- * sock is a valid.
+ *\li sock is a valid.
*
- * task is a valid task that can be used internally to this dispatcher.
+ *\li task is a valid task that can be used internally to this dispatcher.
*
- * 512 <= buffersize <= 64k
+ * \li 512 <= buffersize <= 64k
*
- * maxbuffers > 0.
+ *\li maxbuffers > 0.
*
- * maxrequests <= maxbuffers.
+ *\li maxrequests <= maxbuffers.
*
- * buckets < 2097169 (the next prime after 65536 * 32)
+ *\li buckets < 2097169 (the next prime after 65536 * 32)
*
- * increment > buckets (and prime).
+ *\li increment > buckets (and prime).
*
- * attributes includes DNS_DISPATCHATTR_TCP and does not include
- * DNS_DISPATCHATTR_UDP.
+ *\li attributes includes #DNS_DISPATCHATTR_TCP and does not include
+ * #DNS_DISPATCHATTR_UDP.
*
* Returns:
- * ISC_R_SUCCESS -- success.
+ *\li ISC_R_SUCCESS -- success.
*
- * Anything else -- failure.
+ *\li Anything else -- failure.
*/
void
dns_dispatch_attach(dns_dispatch_t *disp, dns_dispatch_t **dispp);
-/*
+/*%<
* Attach to a dispatch handle.
*
* Requires:
- * disp is valid.
+ *\li disp is valid.
*
- * dispp != NULL && *dispp == NULL
+ *\li dispp != NULL && *dispp == NULL
*/
void
dns_dispatch_detach(dns_dispatch_t **dispp);
-/*
+/*%<
* Detaches from the dispatch.
*
* Requires:
- * dispp != NULL and *dispp be a valid dispatch.
+ *\li dispp != NULL and *dispp be a valid dispatch.
*/
void
dns_dispatch_starttcp(dns_dispatch_t *disp);
-/*
+/*%<
* Start processing of a TCP dispatch once the socket connects.
*
* Requires:
- * 'disp' is valid.
+ *\li 'disp' is valid.
*/
isc_result_t
dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
isc_task_t *task, isc_taskaction_t action, void *arg,
isc_uint16_t *idp, dns_dispentry_t **resp);
-/*
+/*%<
* Add a response entry for this dispatch.
*
* "*idp" is filled in with the assigned message ID, and *resp is filled in
@@ -327,24 +329,24 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
* or through dns_dispatch_removeresponse() for another to be delivered.
*
* Requires:
- * "idp" be non-NULL.
+ *\li "idp" be non-NULL.
*
- * "task" "action" and "arg" be set as appropriate.
+ *\li "task" "action" and "arg" be set as appropriate.
*
- * "dest" be non-NULL and valid.
+ *\li "dest" be non-NULL and valid.
*
- * "resp" be non-NULL and *resp be NULL
+ *\li "resp" be non-NULL and *resp be NULL
*
* Ensures:
*
- * <id, dest> is a unique tuple. That means incoming messages
+ *\li &lt;id, dest> is a unique tuple. That means incoming messages
* are identifiable.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
- * ISC_R_NOMEMORY -- memory could not be allocated.
- * ISC_R_NOMORE -- no more message ids can be allocated
+ *\li ISC_R_SUCCESS -- all is well.
+ *\li ISC_R_NOMEMORY -- memory could not be allocated.
+ *\li ISC_R_NOMORE -- no more message ids can be allocated
* for this destination.
*/
@@ -352,88 +354,90 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
void
dns_dispatch_removeresponse(dns_dispentry_t **resp,
dns_dispatchevent_t **sockevent);
-/*
+/*%<
* Stops the flow of responses for the provided id and destination.
* If "sockevent" is non-NULL, the dispatch event and associated buffer is
* also returned to the system.
*
* Requires:
- * "resp" != NULL and "*resp" contain a value previously allocated
+ *\li "resp" != NULL and "*resp" contain a value previously allocated
* by dns_dispatch_addresponse();
*
- * May only be called from within the task given as the 'task'
+ *\li May only be called from within the task given as the 'task'
* argument to dns_dispatch_addresponse() when allocating '*resp'.
*/
isc_socket_t *
dns_dispatch_getsocket(dns_dispatch_t *disp);
-/*
+/*%<
* Return the socket associated with this dispatcher.
*
* Requires:
- * disp is valid.
+ *\li disp is valid.
*
* Returns:
- * The socket the dispatcher is using.
+ *\li The socket the dispatcher is using.
*/
isc_result_t
dns_dispatch_getlocaladdress(dns_dispatch_t *disp, isc_sockaddr_t *addrp);
-/*
+/*%<
* Return the local address for this dispatch.
* This currently only works for dispatches using UDP sockets.
*
* Requires:
- * disp is valid.
- * addrp to be non null.
+ *\li disp is valid.
+ *\li addrp to be non null.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTIMPLEMENTED
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOTIMPLEMENTED
*/
void
dns_dispatch_cancel(dns_dispatch_t *disp);
-/*
+/*%<
* cancel outstanding clients
*
* Requires:
- * disp is valid.
+ *\li disp is valid.
*/
void
dns_dispatch_changeattributes(dns_dispatch_t *disp,
unsigned int attributes, unsigned int mask);
-/*
+/*%<
* Set the bits described by "mask" to the corresponding values in
* "attributes".
*
* That is:
*
+ * \code
* new = (old & ~mask) | (attributes & mask)
+ * \endcode
*
- * This function has a side effect when DNS_DISPATCHATTR_NOLISTEN changes.
+ * This function has a side effect when #DNS_DISPATCHATTR_NOLISTEN changes.
* When the flag becomes off, the dispatch will start receiving on the
* corresponding socket. When the flag becomes on, receive events on the
* corresponding socket will be canceled.
*
* Requires:
- * disp is valid.
+ *\li disp is valid.
*
- * attributes are reasonable for the dispatch. That is, setting the UDP
+ *\li attributes are reasonable for the dispatch. That is, setting the UDP
* attribute on a TCP socket isn't reasonable.
*/
void
dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event);
-/*
+/*%<
* Inform the dispatcher of a socket receive. This is used for sockets
* shared between dispatchers and clients. If the dispatcher fails to copy
* or send the event, nothing happens.
*
* Requires:
- * disp is valid, and the attribute DNS_DISPATCHATTR_NOLISTEN is set.
+ *\li disp is valid, and the attribute DNS_DISPATCHATTR_NOLISTEN is set.
* event != NULL
*/
diff --git a/contrib/bind9/lib/dns/include/dns/dlz.h b/contrib/bind9/lib/dns/include/dns/dlz.h
new file mode 100644
index 0000000..4c61c91
--- /dev/null
+++ b/contrib/bind9/lib/dns/include/dns/dlz.h
@@ -0,0 +1,290 @@
+/*
+ * Portions Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+ * USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
+ * conceived and contributed by Rob Butler.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+ * USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: dlz.h,v 1.2.2.2 2005/09/06 03:47:18 marka Exp $ */
+
+/*! \file */
+
+#ifndef DLZ_H
+#define DLZ_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * DLZ Interface
+ *
+ * The DLZ interface allows zones to be looked up using a driver instead of
+ * Bind's default in memory zone table.
+ *
+ *
+ * Reliability:
+ * No anticipated impact.
+ *
+ * Resources:
+ *
+ * Security:
+ * No anticipated impact.
+ *
+ * Standards:
+ * None.
+ */
+
+/*****
+ ***** Imports
+ *****/
+
+#include <dns/name.h>
+#include <dns/types.h>
+#include <dns/view.h>
+
+#include <isc/lang.h>
+
+ISC_LANG_BEGINDECLS
+
+/***
+ *** Types
+ ***/
+
+#define DNS_DLZ_MAGIC ISC_MAGIC('D','L','Z','D')
+#define DNS_DLZ_VALID(dlz) ISC_MAGIC_VALID(dlz, DNS_DLZ_MAGIC)
+
+typedef isc_result_t
+(*dns_dlzallowzonexfr_t)(void *driverarg, void *dbdata, isc_mem_t *mctx,
+ dns_rdataclass_t rdclass, dns_name_t *name,
+ isc_sockaddr_t *clientaddr,
+ dns_db_t **dbp);
+
+/*%<
+ * Method prototype. Drivers implementing the DLZ interface MUST
+ * supply an allow zone transfer method. This method is called when
+ * the DNS server is performing a zone transfer query. The driver's
+ * method should return ISC_R_SUCCESS and a database pointer to the
+ * name server if the zone is supported by the database, and zone
+ * transfer is allowed. Otherwise it will return ISC_R_NOTFOUND if
+ * the zone is not supported by the database, or ISC_R_NOPERM if zone
+ * transfers are not allowed. If an error occurs it should return a
+ * result code indicating the type of error.
+ */
+
+typedef isc_result_t
+(*dns_dlzcreate_t)(isc_mem_t *mctx, const char *dlzname, unsigned int argc,
+ char *argv[], void *driverarg, void **dbdata);
+
+/*%<
+ * Method prototype. Drivers implementing the DLZ interface MUST
+ * supply a create method. This method is called when the DNS server
+ * is starting up and creating drivers for use later.
+ */
+
+typedef void
+(*dns_dlzdestroy_t)(void *driverarg, void **dbdata);
+
+/*%<
+ * Method prototype. Drivers implementing the DLZ interface MUST
+ * supply a destroy method. This method is called when the DNS server
+ * is shuting down and no longer needs the driver.
+ */
+
+typedef isc_result_t
+(*dns_dlzfindzone_t)(void *driverarg, void *dbdata, isc_mem_t *mctx,
+ dns_rdataclass_t rdclass, dns_name_t *name,
+ dns_db_t **dbp);
+
+/*%<
+
+ * Method prototype. Drivers implementing the DLZ interface MUST
+ * supply a find zone method. This method is called when the DNS
+ * server is performing a query. The find zone method will be called
+ * with the longest possible name first, and continue to be called
+ * with successively shorter domain names, until any of the following
+ * occur:
+ *
+ * \li 1) a match is found, and the function returns (ISC_R_SUCCESS)
+ *
+ * \li 2) a problem occurs, and the functions returns anything other
+ * than (ISC_R_NOTFOUND)
+ * \li 3) we run out of domain name labels. I.E. we have tried the
+ * shortest domain name
+ * \li 4) the number of labels in the domain name is less than
+ * min_lables for dns_dlzfindzone
+ *
+ * The driver's find zone method should return ISC_R_SUCCESS and a
+ * database pointer to the name server if the zone is supported by the
+ * database. Otherwise it will return ISC_R_NOTFOUND, and a null
+ * pointer if the zone is not supported. If an error occurs it should
+ * return a result code indicating the type of error.
+ */
+
+/*% the methods supplied by a DLZ driver */
+typedef struct dns_dlzmethods {
+ dns_dlzcreate_t create;
+ dns_dlzdestroy_t destroy;
+ dns_dlzfindzone_t findzone;
+ dns_dlzallowzonexfr_t allowzonexfr;
+} dns_dlzmethods_t;
+
+/*% information about a DLZ driver */
+struct dns_dlzimplementation {
+ const char *name;
+ const dns_dlzmethods_t *methods;
+ isc_mem_t *mctx;
+ void *driverarg;
+ ISC_LINK(dns_dlzimplementation_t) link;
+};
+
+/*% an instance of a DLZ driver */
+struct dns_dlzdb {
+ unsigned int magic;
+ isc_mem_t *mctx;
+ dns_dlzimplementation_t *implementation;
+ void *dbdata;
+};
+
+
+/***
+ *** Method declarations
+ ***/
+
+isc_result_t
+dns_dlzallowzonexfr(dns_view_t *view, dns_name_t *name,
+ isc_sockaddr_t *clientaddr, dns_db_t **dbp);
+
+/*%<
+ * This method is called when the DNS server is performing a zone
+ * transfer query. It will call the DLZ driver's allow zone tranfer
+ * method.
+ */
+
+isc_result_t
+dns_dlzcreate(isc_mem_t *mctx, const char *dlzname,
+ const char *drivername, unsigned int argc,
+ char *argv[], dns_dlzdb_t **dbp);
+
+/*%<
+ * This method is called when the DNS server is starting up and
+ * creating drivers for use later. It will search the DLZ driver list
+ * for 'drivername' and return a DLZ driver via dbp if a match is
+ * found. If the DLZ driver supplies a create method, this function
+ * will call it.
+ */
+
+void
+dns_dlzdestroy(dns_dlzdb_t **dbp);
+
+/*%<
+ * This method is called when the DNS server is shuting down and no
+ * longer needs the driver. If the DLZ driver supplies a destroy
+ * methods, this function will call it.
+ */
+
+isc_result_t
+dns_dlzfindzone(dns_view_t *view, dns_name_t *name,
+ unsigned int minlabels, dns_db_t **dbp);
+
+/*%<
+ * This method is called when the DNS server is performing a query.
+ * It will call the DLZ driver's find zone method.
+ */
+
+isc_result_t
+dns_dlzregister(const char *drivername, const dns_dlzmethods_t *methods,
+ void *driverarg, isc_mem_t *mctx,
+ dns_dlzimplementation_t **dlzimp);
+
+/*%<
+ * Register a dynamically loadable zones (DLZ) driver for the database
+ * type 'drivername', implemented by the functions in '*methods'.
+ *
+ * dlzimp must point to a NULL dlz_implementation_t pointer. That is,
+ * dlzimp != NULL && *dlzimp == NULL. It will be assigned a value that
+ * will later be used to identify the driver when deregistering it.
+ */
+
+isc_result_t
+dns_dlzstrtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp);
+
+/*%<
+ * This method is called when the name server is starting up to parse
+ * the DLZ driver command line from named.conf. Basically it splits
+ * up a string into and argc / argv. The primary difference of this
+ * method is items between braces { } are considered only 1 word. for
+ * example the command line "this is { one grouped phrase } and this
+ * isn't" would be parsed into:
+ *
+ * \li argv[0]: "this"
+ * \li argv[1]: "is"
+ * \li argv{2]: " one grouped phrase "
+ * \li argv[3]: "and"
+ * \li argv[4]: "this"
+ * \li argv{5}: "isn't"
+ *
+ * braces should NOT be nested, more than one grouping in the command
+ * line is allowed. Notice, argv[2] has an extra space at the
+ * beginning and end. Extra spaces are not stripped between a
+ * grouping. You can do so in your driver if needed, or be sure not
+ * to put extra spaces before / after the braces.
+ */
+
+void
+dns_dlzunregister(dns_dlzimplementation_t **dlzimp);
+
+/*%<
+ * Removes the dlz driver from the list of registered dlz drivers.
+ * There must be no active dlz drivers of this type when this function
+ * is called.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* DLZ_H */
diff --git a/contrib/bind9/lib/dns/include/dns/dnssec.h b/contrib/bind9/lib/dns/include/dns/dnssec.h
index 5f86178..2804e03 100644
--- a/contrib/bind9/lib/dns/include/dns/dnssec.h
+++ b/contrib/bind9/lib/dns/include/dns/dnssec.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec.h,v 1.21.12.5 2004/03/08 09:04:35 marka Exp $ */
+/* $Id: dnssec.h,v 1.26.18.2 2005/04/29 00:16:12 marka Exp $ */
#ifndef DNS_DNSSEC_H
#define DNS_DNSSEC_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/stdtime.h>
@@ -32,51 +34,51 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_dnssec_keyfromrdata(dns_name_t *name, dns_rdata_t *rdata, isc_mem_t *mctx,
dst_key_t **key);
-/*
+/*%<
* Creates a DST key from a DNS record. Basically a wrapper around
* dst_key_fromdns().
*
* Requires:
- * 'name' is not NULL
- * 'rdata' is not NULL
- * 'mctx' is not NULL
- * 'key' is not NULL
- * '*key' is NULL
+ *\li 'name' is not NULL
+ *\li 'rdata' is not NULL
+ *\li 'mctx' is not NULL
+ *\li 'key' is not NULL
+ *\li '*key' is NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * DST_R_INVALIDPUBLICKEY
- * various errors from dns_name_totext
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li DST_R_INVALIDPUBLICKEY
+ *\li various errors from dns_name_totext
*/
isc_result_t
dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_stdtime_t *inception, isc_stdtime_t *expire,
isc_mem_t *mctx, isc_buffer_t *buffer, dns_rdata_t *sigrdata);
-/*
+/*%<
* Generates a SIG record covering this rdataset. This has no effect
* on existing SIG records.
*
* Requires:
- * 'name' (the owner name of the record) is a valid name
- * 'set' is a valid rdataset
- * 'key' is a valid key
- * 'inception' is not NULL
- * 'expire' is not NULL
- * 'mctx' is not NULL
- * 'buffer' is not NULL
- * 'sigrdata' is not NULL
+ *\li 'name' (the owner name of the record) is a valid name
+ *\li 'set' is a valid rdataset
+ *\li 'key' is a valid key
+ *\li 'inception' is not NULL
+ *\li 'expire' is not NULL
+ *\li 'mctx' is not NULL
+ *\li 'buffer' is not NULL
+ *\li 'sigrdata' is not NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_NOSPACE
- * DNS_R_INVALIDTIME - the expiration is before the inception
- * DNS_R_KEYUNAUTHORIZED - the key cannot sign this data (either
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_NOSPACE
+ *\li #DNS_R_INVALIDTIME - the expiration is before the inception
+ *\li #DNS_R_KEYUNAUTHORIZED - the key cannot sign this data (either
* it is not a zone key or its flags prevent
* authentication)
- * DST_R_*
+ *\li DST_R_*
*/
isc_result_t
@@ -88,35 +90,36 @@ isc_result_t
dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_boolean_t ignoretime, isc_mem_t *mctx,
dns_rdata_t *sigrdata, dns_name_t *wild);
-/*
+/*%<
* Verifies the SIG record covering this rdataset signed by a specific
* key. This does not determine if the key's owner is authorized to
* sign this record, as this requires a resolver or database.
* If 'ignoretime' is ISC_TRUE, temporal validity will not be checked.
*
* Requires:
- * 'name' (the owner name of the record) is a valid name
- * 'set' is a valid rdataset
- * 'key' is a valid key
- * 'mctx' is not NULL
- * 'sigrdata' is a valid rdata containing a SIG record
- * 'wild' if non-NULL then is a valid and has a buffer.
+ *\li 'name' (the owner name of the record) is a valid name
+ *\li 'set' is a valid rdataset
+ *\li 'key' is a valid key
+ *\li 'mctx' is not NULL
+ *\li 'sigrdata' is a valid rdata containing a SIG record
+ *\li 'wild' if non-NULL then is a valid and has a buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * DNS_R_FROMWILDCARD - the signature is valid and is from
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #DNS_R_FROMWILDCARD - the signature is valid and is from
* a wildcard expansion. dns_dnssec_verify2() only.
* 'wild' contains the name of the wildcard if non-NULL.
- * DNS_R_SIGINVALID - the signature fails to verify
- * DNS_R_SIGEXPIRED - the signature has expired
- * DNS_R_SIGFUTURE - the signature's validity period has not begun
- * DNS_R_KEYUNAUTHORIZED - the key cannot sign this data (either
+ *\li #DNS_R_SIGINVALID - the signature fails to verify
+ *\li #DNS_R_SIGEXPIRED - the signature has expired
+ *\li #DNS_R_SIGFUTURE - the signature's validity period has not begun
+ *\li #DNS_R_KEYUNAUTHORIZED - the key cannot sign this data (either
* it is not a zone key or its flags prevent
* authentication)
- * DST_R_*
+ *\li DST_R_*
*/
+/*@{*/
isc_result_t
dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node,
dns_name_t *name, isc_mem_t *mctx,
@@ -128,50 +131,51 @@ dns_dnssec_findzonekeys2(dns_db_t *db, dns_dbversion_t *ver,
const char *directory, isc_mem_t *mctx,
unsigned int maxkeys, dst_key_t **keys,
unsigned int *nkeys);
-/*
+/*%<
* Finds a set of zone keys.
* XXX temporary - this should be handled in dns_zone_t.
*/
+/*@}*/
isc_result_t
dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key);
-/*
+/*%<
* Signs a message with a SIG(0) record. This is implicitly called by
* dns_message_renderend() if msg->sig0key is not NULL.
*
* Requires:
- * 'msg' is a valid message
- * 'key' is a valid key that can be used for signing
+ *\li 'msg' is a valid message
+ *\li 'key' is a valid key that can be used for signing
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * DST_R_*
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li DST_R_*
*/
isc_result_t
dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
dst_key_t *key);
-/*
+/*%<
* Verifies a message signed by a SIG(0) record. This is not
* called implicitly by dns_message_parse(). If dns_message_signer()
* is called before dns_dnssec_verifymessage(), it will return
- * DNS_R_NOTVERIFIEDYET. dns_dnssec_verifymessage() will set
+ * #DNS_R_NOTVERIFIEDYET. dns_dnssec_verifymessage() will set
* the verified_sig0 flag in msg if the verify succeeds, and
* the sig0status field otherwise.
*
* Requires:
- * 'source' is a valid buffer containing the unparsed message
- * 'msg' is a valid message
- * 'key' is a valid key
+ *\li 'source' is a valid buffer containing the unparsed message
+ *\li 'msg' is a valid message
+ *\li 'key' is a valid key
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_NOTFOUND - no SIG(0) was found
- * DNS_R_SIGINVALID - the SIG record is not well-formed or
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_NOTFOUND - no SIG(0) was found
+ *\li #DNS_R_SIGINVALID - the SIG record is not well-formed or
* was not generated by the key.
- * DST_R_*
+ *\li DST_R_*
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/ds.h b/contrib/bind9/lib/dns/include/dns/ds.h
index 979ac9f..5e4cc40 100644
--- a/contrib/bind9/lib/dns/include/dns/ds.h
+++ b/contrib/bind9/lib/dns/include/dns/ds.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.h,v 1.3.2.1 2004/03/08 02:08:00 marka Exp $ */
+/* $Id: ds.h,v 1.3.20.5 2006/02/22 23:50:09 marka Exp $ */
#ifndef DNS_DS_H
#define DNS_DS_H 1
@@ -25,11 +25,12 @@
#include <dns/types.h>
#define DNS_DSDIGEST_SHA1 (1)
+#define DNS_DSDIGEST_SHA256 (2)
/*
- * Assuming SHA-1 digest type.
+ * Assuming SHA-256 digest type.
*/
-#define DNS_DS_BUFFERSIZE (24)
+#define DNS_DS_BUFFERSIZE (36)
ISC_LANG_BEGINDECLS
@@ -37,20 +38,26 @@ isc_result_t
dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
unsigned int digest_type, unsigned char *buffer,
dns_rdata_t *rdata);
-/*
+/*%<
* Build the rdata of a DS record.
*
* Requires:
- * key Points to a valid DNS KEY record.
- * buffer Points to a temporary buffer of at least
- * DNS_DS_BUFFERSIZE bytes.
- * rdata Points to an initialized dns_rdata_t.
+ *\li key Points to a valid DNS KEY record.
+ *\li buffer Points to a temporary buffer of at least
+ * #DNS_DS_BUFFERSIZE bytes.
+ *\li rdata Points to an initialized dns_rdata_t.
*
* Ensures:
- * *rdata Contains a valid DS rdata. The 'data' member refers
+ * \li *rdata Contains a valid DS rdata. The 'data' member refers
* to 'buffer'.
*/
+isc_boolean_t
+dns_ds_digest_supported(unsigned int digest_type);
+/*%<
+ * Is this digest algorithm supported by dns_ds_buildrdata()?
+ */
+
ISC_LANG_ENDDECLS
#endif /* DNS_DS_H */
diff --git a/contrib/bind9/lib/dns/include/dns/events.h b/contrib/bind9/lib/dns/include/dns/events.h
index 1e66139..d1ebef3 100644
--- a/contrib/bind9/lib/dns/include/dns/events.h
+++ b/contrib/bind9/lib/dns/include/dns/events.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,14 +15,15 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: events.h,v 1.37.2.1.4.4 2004/03/08 09:04:36 marka Exp $ */
+/* $Id: events.h,v 1.42.18.3 2005/04/29 00:16:13 marka Exp $ */
#ifndef DNS_EVENTS_H
#define DNS_EVENTS_H 1
#include <isc/eventclass.h>
-/*
+/*! \file
+ * \brief
* Registry of DNS event numbers.
*/
@@ -63,6 +64,10 @@
#define DNS_EVENT_DUMPQUANTUM (ISC_EVENTCLASS_DNS + 34)
#define DNS_EVENT_IMPORTRECVDONE (ISC_EVENTCLASS_DNS + 35)
#define DNS_EVENT_FREESTORAGE (ISC_EVENTCLASS_DNS + 36)
+#define DNS_EVENT_VIEWACACHESHUTDOWN (ISC_EVENTCLASS_DNS + 37)
+#define DNS_EVENT_ACACHECONTROL (ISC_EVENTCLASS_DNS + 38)
+#define DNS_EVENT_ACACHECLEAN (ISC_EVENTCLASS_DNS + 39)
+#define DNS_EVENT_ACACHEOVERMEM (ISC_EVENTCLASS_DNS + 40)
#define DNS_EVENT_FIRSTEVENT (ISC_EVENTCLASS_DNS + 0)
#define DNS_EVENT_LASTEVENT (ISC_EVENTCLASS_DNS + 65535)
diff --git a/contrib/bind9/lib/dns/include/dns/fixedname.h b/contrib/bind9/lib/dns/include/dns/fixedname.h
index 3ee306f..8380de6 100644
--- a/contrib/bind9/lib/dns/include/dns/fixedname.h
+++ b/contrib/bind9/lib/dns/include/dns/fixedname.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: fixedname.h,v 1.12.206.1 2004/03/06 08:13:55 marka Exp $ */
+/* $Id: fixedname.h,v 1.13.18.2 2005/04/29 00:16:13 marka Exp $ */
#ifndef DNS_FIXEDNAME_H
#define DNS_FIXEDNAME_H 1
@@ -24,28 +24,31 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Fixed-size Names
*
* dns_fixedname_t is a convenience type containing a name, an offsets table,
* and a dedicated buffer big enough for the longest possible name.
*
* MP:
- * The caller must ensure any required synchronization.
+ *\li The caller must ensure any required synchronization.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * Per dns_fixedname_t:
+ *\li Per dns_fixedname_t:
+ *\code
* sizeof(dns_name_t) + sizeof(dns_offsets_t) +
* sizeof(isc_buffer_t) + 255 bytes + structure padding
+ *\endcode
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
/*****
diff --git a/contrib/bind9/lib/dns/include/dns/forward.h b/contrib/bind9/lib/dns/include/dns/forward.h
index 1eb62d2..ddf6d7f 100644
--- a/contrib/bind9/lib/dns/include/dns/forward.h
+++ b/contrib/bind9/lib/dns/include/dns/forward.h
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: forward.h,v 1.2.206.3 2005/03/17 03:58:31 marka Exp $ */
+/* $Id: forward.h,v 1.3.18.3 2005/04/27 05:01:33 sra Exp $ */
#ifndef DNS_FORWARD_H
#define DNS_FORWARD_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/result.h>
@@ -34,68 +36,81 @@ struct dns_forwarders {
isc_result_t
dns_fwdtable_create(isc_mem_t *mctx, dns_fwdtable_t **fwdtablep);
-/*
+/*%<
* Creates a new forwarding table.
*
* Requires:
- * mctx is a valid memory context.
- * fwdtablep != NULL && *fwdtablep == NULL
+ * \li mctx is a valid memory context.
+ * \li fwdtablep != NULL && *fwdtablep == NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*/
isc_result_t
dns_fwdtable_add(dns_fwdtable_t *fwdtable, dns_name_t *name,
isc_sockaddrlist_t *addrs, dns_fwdpolicy_t policy);
-/*
+/*%<
* Adds an entry to the forwarding table. The entry associates
* a domain with a list of forwarders and a forwarding policy. The
* addrs list is copied if not empty, so the caller should free its copy.
*
* Requires:
- * fwdtable is a valid forwarding table.
- * name is a valid name
- * addrs is a valid list of sockaddrs, which may be empty.
+ * \li fwdtable is a valid forwarding table.
+ * \li name is a valid name
+ * \li addrs is a valid list of sockaddrs, which may be empty.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*/
isc_result_t
dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name,
dns_forwarders_t **forwardersp);
+/*%<
+ * Finds a domain in the forwarding table. The closest matching parent
+ * domain is returned.
+ *
+ * Requires:
+ * \li fwdtable is a valid forwarding table.
+ * \li name is a valid name
+ * \li forwardersp != NULL && *forwardersp == NULL
+ *
+ * Returns:
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND
+ */
isc_result_t
dns_fwdtable_find2(dns_fwdtable_t *fwdtable, dns_name_t *name,
dns_name_t *foundname, dns_forwarders_t **forwardersp);
-/*
+/*%<
* Finds a domain in the forwarding table. The closest matching parent
* domain is returned.
*
* Requires:
- * fwdtable is a valid forwarding table.
- * name is a valid name
- * forwardersp != NULL && *forwardersp == NULL
- * foundname to be NULL or a valid name with buffer.
+ * \li fwdtable is a valid forwarding table.
+ * \li name is a valid name
+ * \li forwardersp != NULL && *forwardersp == NULL
+ * \li foundname to be NULL or a valid name with buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND
*/
void
dns_fwdtable_destroy(dns_fwdtable_t **fwdtablep);
-/*
+/*%<
* Destroys a forwarding table.
*
* Requires:
- * fwtablep != NULL && *fwtablep != NULL
+ * \li fwtablep != NULL && *fwtablep != NULL
*
* Ensures:
- * all memory associated with the forwarding table is freed.
+ * \li all memory associated with the forwarding table is freed.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/journal.h b/contrib/bind9/lib/dns/include/dns/journal.h
index fdf6094..b776a30 100644
--- a/contrib/bind9/lib/dns/include/dns/journal.h
+++ b/contrib/bind9/lib/dns/include/dns/journal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: journal.h,v 1.23.12.3 2004/03/08 09:04:36 marka Exp $ */
+/* $Id: journal.h,v 1.25.18.2 2005/04/29 00:16:13 marka Exp $ */
#ifndef DNS_JOURNAL_H
#define DNS_JOURNAL_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Database journalling.
*/
@@ -44,7 +45,7 @@
*** Types
***/
-/*
+/*%
* A dns_journal_t represents an open journal file. This is an opaque type.
*
* A particular dns_journal_t object may be opened for writing, in which case
@@ -67,19 +68,21 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
dns_diffop_t op, dns_difftuple_t **tp);
-/*
+/*!< brief
* Create a diff tuple for the current database SOA.
* XXX this probably belongs somewhere else.
*/
+/*@{*/
#define DNS_SERIAL_GT(a, b) ((int)(((a) - (b)) & 0xFFFFFFFF) > 0)
#define DNS_SERIAL_GE(a, b) ((int)(((a) - (b)) & 0xFFFFFFFF) >= 0)
-/*
+/*!< brief
* Compare SOA serial numbers. DNS_SERIAL_GT(a, b) returns true iff
* a is "greater than" b where "greater than" is as defined in RFC1982.
* DNS_SERIAL_GE(a, b) returns true iff a is "greater than or equal to" b.
*/
+/*@}*/
/**************************************************************************/
/*
@@ -89,7 +92,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
isc_result_t
dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
dns_journal_t **journalp);
-/*
+/*%<
* Open the journal file 'filename' and create a dns_journal_t object for it.
*
* If 'write' is ISC_TRUE, the journal is open for writing. If it does
@@ -101,7 +104,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
void
dns_journal_destroy(dns_journal_t **journalp);
-/*
+/*%<
* Destroy a dns_journal_t, closing any open files and freeing its memory.
*/
@@ -112,52 +115,52 @@ dns_journal_destroy(dns_journal_t **journalp);
isc_result_t
dns_journal_begin_transaction(dns_journal_t *j);
-/*
+/*%<
* Prepare to write a new transaction to the open journal file 'j'.
*
* Requires:
- * 'j' is open for writing.
+ * \li 'j' is open for writing.
*/
isc_result_t
dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff);
-/*
+/*%<
* Write 'diff' to the current transaction of journal file 'j'.
*
* Requires:
- * 'j' is open for writing and dns_journal_begin_transaction()
+ * \li 'j' is open for writing and dns_journal_begin_transaction()
* has been called.
*
- * 'diff' is a full or partial, correctly ordered IXFR
+ *\li 'diff' is a full or partial, correctly ordered IXFR
* difference sequence.
*/
isc_result_t
dns_journal_commit(dns_journal_t *j);
-/*
+/*%<
* Commit the current transaction of journal file 'j'.
*
* Requires:
- * 'j' is open for writing and dns_journal_begin_transaction()
+ * \li 'j' is open for writing and dns_journal_begin_transaction()
* has been called.
*
- * dns_journal_writediff() has been called one or more times
+ * \li dns_journal_writediff() has been called one or more times
* to form a complete, correctly ordered IXFR difference
* sequence.
*/
isc_result_t
dns_journal_write_transaction(dns_journal_t *j, dns_diff_t *diff);
-/*
+/*%
* Write a complete transaction at once to a journal file,
* sorting it if necessary, and commit it. Equivalent to calling
* dns_diff_sort(), dns_journal_begin_transaction(),
* dns_journal_writediff(), and dns_journal_commit().
*
* Requires:
- * 'j' is open for writing.
+ *\li 'j' is open for writing.
*
- * 'diff' contains exactly one SOA deletion, one SOA addition
+ * \li 'diff' contains exactly one SOA deletion, one SOA addition
* with a greater serial number, and possibly other changes,
* in arbitrary order.
*/
@@ -171,46 +174,48 @@ isc_uint32_t
dns_journal_first_serial(dns_journal_t *j);
isc_uint32_t
dns_journal_last_serial(dns_journal_t *j);
-/*
+/*%<
* Get the first and last addressable serial number in the journal.
*/
isc_result_t
dns_journal_iter_init(dns_journal_t *j,
isc_uint32_t begin_serial, isc_uint32_t end_serial);
-/*
+/*%<
* Prepare to iterate over the transactions that will bring the database
* from SOA serial number 'begin_serial' to 'end_serial'.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_RANGE begin_serial is outside the addressable range.
- * ISC_R_NOTFOUND begin_serial is within the range of adressable
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_RANGE begin_serial is outside the addressable range.
+ *\li ISC_R_NOTFOUND begin_serial is within the range of adressable
* serial numbers covered by the journal, but
* this particular serial number does not exist.
*/
+/*@{*/
isc_result_t
dns_journal_first_rr(dns_journal_t *j);
isc_result_t
dns_journal_next_rr(dns_journal_t *j);
-/*
+/*%<
* Position the iterator at the first/next RR in a journal
* transaction sequence established using dns_journal_iter_init().
*
* Requires:
- * dns_journal_iter_init() has been called.
+ * \li dns_journal_iter_init() has been called.
*
*/
+/*@}*/
void
dns_journal_current_rr(dns_journal_t *j, dns_name_t **name, isc_uint32_t *ttl,
dns_rdata_t **rdata);
-/*
+/*%<
* Get the name, ttl, and rdata of the current journal RR.
*
* Requires:
- * The last call to dns_journal_first_rr() or dns_journal_next_rr()
+ * \li The last call to dns_journal_first_rr() or dns_journal_next_rr()
* returned ISC_R_SUCCESS.
*/
@@ -221,22 +226,22 @@ dns_journal_current_rr(dns_journal_t *j, dns_name_t **name, isc_uint32_t *ttl,
isc_result_t
dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename);
-/*
+/*%<
* Roll forward (play back) the journal file "filename" into the
* database "db". This should be called when the server starts
* after a shutdown or crash.
*
* Requires:
- * 'mctx' is a valid memory context.
- * 'db' is a valid database which does not have a version
+ *\li 'mctx' is a valid memory context.
+ *\li 'db' is a valid database which does not have a version
* open for writing.
- * 'filename' is the name of the journal file belonging to 'db'.
+ * \li 'filename' is the name of the journal file belonging to 'db'.
*
* Returns:
- * DNS_R_NOJOURNAL when journal does not exist.
- * ISC_R_NOTFOUND when current serial in not in journal.
- * ISC_R_RANGE when current serial in not in journals range.
- * ISC_R_SUCCESS journal has been applied successfully to database.
+ *\li DNS_R_NOJOURNAL when journal does not exist.
+ *\li ISC_R_NOTFOUND when current serial in not in journal.
+ *\li ISC_R_RANGE when current serial in not in journals range.
+ *\li ISC_R_SUCCESS journal has been applied successfully to database.
* others
*/
@@ -249,7 +254,7 @@ dns_db_diff(isc_mem_t *mctx,
dns_db_t *dba, dns_dbversion_t *dbvera,
dns_db_t *dbb, dns_dbversion_t *dbverb,
const char *journal_filename);
-/*
+/*%<
* Compare the databases 'dba' and 'dbb' and generate a journal
* entry containing the changes to make 'dba' from 'dbb' (note
* the order). This journal entry will consist of a single,
@@ -260,7 +265,7 @@ dns_db_diff(isc_mem_t *mctx,
isc_result_t
dns_journal_compact(isc_mem_t *mctx, char *filename, isc_uint32_t serial,
isc_uint32_t target_size);
-/*
+/*%<
* Attempt to compact the journal if it is greater that 'target_size'.
* Changes from 'serial' onwards will be preserved. If the journal
* exists and is non-empty 'serial' must exist in the journal.
diff --git a/contrib/bind9/lib/dns/include/dns/keyflags.h b/contrib/bind9/lib/dns/include/dns/keyflags.h
index 025b137..665b517 100644
--- a/contrib/bind9/lib/dns/include/dns/keyflags.h
+++ b/contrib/bind9/lib/dns/include/dns/keyflags.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keyflags.h,v 1.9.206.1 2004/03/06 08:13:56 marka Exp $ */
+/* $Id: keyflags.h,v 1.10.18.2 2005/04/29 00:16:13 marka Exp $ */
#ifndef DNS_KEYFLAGS_H
#define DNS_KEYFLAGS_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,7 +30,7 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNSSEC KEY flags value.
* The text may contain either a set of flag mnemonics separated by
* vertical bars or a decimal flags value. For compatibility with
@@ -37,14 +39,14 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source);
* are also accepted.
*
* Requires:
- * 'flagsp' is a valid pointer.
+ *\li 'flagsp' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_RANGE numeric flag value is out of range
- * DNS_R_UNKNOWN mnemonic flag is unknown
+ *\li ISC_R_SUCCESS on success
+ *\li ISC_R_RANGE numeric flag value is out of range
+ *\li DNS_R_UNKNOWN mnemonic flag is unknown
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/keytable.h b/contrib/bind9/lib/dns/include/dns/keytable.h
index f3a21a6..b8bfcc1 100644
--- a/contrib/bind9/lib/dns/include/dns/keytable.h
+++ b/contrib/bind9/lib/dns/include/dns/keytable.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keytable.h,v 1.10.206.3 2006/01/06 00:01:42 marka Exp $ */
+/* $Id: keytable.h,v 1.11.18.3 2005/12/05 00:00:03 marka Exp $ */
#ifndef DNS_KEYTABLE_H
#define DNS_KEYTABLE_H 1
@@ -24,22 +24,21 @@
***** Module Info
*****/
-/*
- * Key Tables
- *
+/*! \file
+ * \brief
* The keytable module provides services for storing and retrieving DNSSEC
* trusted keys, as well as the ability to find the deepest matching key
* for a given domain name.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*/
#include <isc/lang.h>
@@ -52,203 +51,202 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_keytable_create(isc_mem_t *mctx, dns_keytable_t **keytablep);
-/*
+/*%<
* Create a keytable.
*
* Requires:
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*
- * keytablep != NULL && *keytablep == NULL
+ *\li keytablep != NULL && *keytablep == NULL
*
* Ensures:
*
- * On success, *keytablep is a valid, empty key table.
+ *\li On success, *keytablep is a valid, empty key table.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Any other result indicates failure.
+ *\li Any other result indicates failure.
*/
void
dns_keytable_attach(dns_keytable_t *source, dns_keytable_t **targetp);
-/*
+/*%<
* Attach *targetp to source.
*
* Requires:
*
- * 'source' is a valid keytable.
+ *\li 'source' is a valid keytable.
*
- * 'targetp' points to a NULL dns_keytable_t *.
+ *\li 'targetp' points to a NULL dns_keytable_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*/
void
dns_keytable_detach(dns_keytable_t **keytablep);
-/*
+/*%<
* Detach *keytablep from its keytable.
*
* Requires:
*
- * 'keytablep' points to a valid keytable.
+ *\li 'keytablep' points to a valid keytable.
*
* Ensures:
*
- * *keytablep is NULL.
- *
- * If '*keytablep' is the last reference to the keytable,
+ *\li *keytablep is NULL.
*
- * All resources used by the keytable will be freed
+ *\li If '*keytablep' is the last reference to the keytable,
+ * all resources used by the keytable will be freed
*/
isc_result_t
dns_keytable_add(dns_keytable_t *keytable, dst_key_t **keyp);
-/*
+/*%<
* Add '*keyp' to 'keytable'.
*
* Notes:
*
- * Ownership of *keyp is transferred to the keytable.
+ *\li Ownership of *keyp is transferred to the keytable.
*
* Requires:
*
- * keyp != NULL && *keyp is a valid dst_key_t *.
+ *\li keyp != NULL && *keyp is a valid dst_key_t *.
*
* Ensures:
*
- * On success, *keyp == NULL
+ *\li On success, *keyp == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Any other result indicates failure.
+ *\li Any other result indicates failure.
*/
isc_result_t
dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
dns_secalg_t algorithm, dns_keytag_t tag,
dns_keynode_t **keynodep);
-/*
+/*%<
* Search for a key named 'name', matching 'algorithm' and 'tag' in
* 'keytable'. This finds the first instance which matches. Use
* dns_keytable_findnextkeynode() to find other instances.
*
* Requires:
*
- * 'keytable' is a valid keytable.
+ *\li 'keytable' is a valid keytable.
*
- * 'name' is a valid absolute name.
+ *\li 'name' is a valid absolute name.
*
- * keynodep != NULL && *keynodep == NULL
+ *\li keynodep != NULL && *keynodep == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * DNS_R_PARTIALMATCH the name existed in the keytable.
- * ISC_R_NOTFOUND
+ *\li ISC_R_SUCCESS
+ *\li DNS_R_PARTIALMATCH the name existed in the keytable.
+ *\li ISC_R_NOTFOUND
*
- * Any other result indicates an error.
+ *\li Any other result indicates an error.
*/
isc_result_t
dns_keytable_findnextkeynode(dns_keytable_t *keytable, dns_keynode_t *keynode,
dns_keynode_t **nextnodep);
-/*
+/*%<
* Search for the next key with the same properties as 'keynode' in
* 'keytable' as found by dns_keytable_findkeynode().
*
* Requires:
*
- * 'keytable' is a valid keytable.
+ *\li 'keytable' is a valid keytable.
*
- * 'keynode' is a valid keynode.
+ *\li 'keynode' is a valid keynode.
*
- * nextnodep != NULL && *nextnodep == NULL
+ *\li nextnodep != NULL && *nextnodep == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOTFOUND
*
- * Any other result indicates an error.
+ *\li Any other result indicates an error.
*/
isc_result_t
dns_keytable_finddeepestmatch(dns_keytable_t *keytable, dns_name_t *name,
dns_name_t *foundname);
-/*
+/*%<
* Search for the deepest match of 'name' in 'keytable'.
*
* Requires:
*
- * 'keytable' is a valid keytable.
+ *\li 'keytable' is a valid keytable.
*
- * 'name' is a valid absolute name.
+ *\li 'name' is a valid absolute name.
*
- * 'foundname' is a name with a dedicated buffer.
+ *\li 'foundname' is a name with a dedicated buffer.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOTFOUND
*
- * Any other result indicates an error.
+ *\li Any other result indicates an error.
*/
void
dns_keytable_detachkeynode(dns_keytable_t *keytable,
dns_keynode_t **keynodep);
-/*
+/*%<
* Give back a keynode found via dns_keytable_findkeynode().
*
* Requires:
*
- * 'keytable' is a valid keytable.
+ *\li 'keytable' is a valid keytable.
*
- * *keynodep is a valid keynode returned by a call to
+ *\li *keynodep is a valid keynode returned by a call to
* dns_keytable_findkeynode().
*
* Ensures:
*
- * *keynodep == NULL
+ *\li *keynodep == NULL
*/
isc_result_t
dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
isc_boolean_t *wantdnssecp);
-/*
+/*%<
* Is 'name' at or beneath a trusted key?
*
* Requires:
*
- * 'keytable' is a valid keytable.
+ *\li 'keytable' is a valid keytable.
*
- * 'name' is a valid absolute name.
+ *\li 'name' is a valid absolute name.
*
- * '*wantsdnssecp' is a valid isc_boolean_t.
+ *\li '*wantsdnssecp' is a valid isc_boolean_t.
*
* Ensures:
*
- * On success, *wantsdnssecp will be ISC_TRUE if and only if 'name'
+ *\li On success, *wantsdnssecp will be ISC_TRUE if and only if 'name'
* is at or beneath a trusted key.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Any other result is an error.
+ *\li Any other result is an error.
*/
dst_key_t *
dns_keynode_key(dns_keynode_t *keynode);
-/*
+/*%<
* Get the DST key associated with keynode.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/keyvalues.h b/contrib/bind9/lib/dns/include/dns/keyvalues.h
index ef9e821..df17ace 100644
--- a/contrib/bind9/lib/dns/include/dns/keyvalues.h
+++ b/contrib/bind9/lib/dns/include/dns/keyvalues.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,36 +15,38 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keyvalues.h,v 1.11.12.3 2004/03/06 08:13:56 marka Exp $ */
+/* $Id: keyvalues.h,v 1.15.18.2 2005/04/29 00:16:14 marka Exp $ */
#ifndef DNS_KEYVALUES_H
#define DNS_KEYVALUES_H 1
+/*! \file */
+
/*
* Flags field of the KEY RR rdata
*/
-#define DNS_KEYFLAG_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define DNS_KEYTYPE_AUTHCONF 0x0000 /* Key usable for both */
-#define DNS_KEYTYPE_CONFONLY 0x8000 /* Key usable for confidentiality */
-#define DNS_KEYTYPE_AUTHONLY 0x4000 /* Key usable for authentication */
-#define DNS_KEYTYPE_NOKEY 0xC000 /* No key usable for either; no key */
+#define DNS_KEYFLAG_TYPEMASK 0xC000 /*%< Mask for "type" bits */
+#define DNS_KEYTYPE_AUTHCONF 0x0000 /*%< Key usable for both */
+#define DNS_KEYTYPE_CONFONLY 0x8000 /*%< Key usable for confidentiality */
+#define DNS_KEYTYPE_AUTHONLY 0x4000 /*%< Key usable for authentication */
+#define DNS_KEYTYPE_NOKEY 0xC000 /*%< No key usable for either; no key */
#define DNS_KEYTYPE_NOAUTH DNS_KEYTYPE_CONFONLY
#define DNS_KEYTYPE_NOCONF DNS_KEYTYPE_AUTHONLY
-#define DNS_KEYFLAG_RESERVED2 0x2000 /* reserved - must be zero */
-#define DNS_KEYFLAG_EXTENDED 0x1000 /* key has extended flags */
-#define DNS_KEYFLAG_RESERVED4 0x0800 /* reserved - must be zero */
-#define DNS_KEYFLAG_RESERVED5 0x0400 /* reserved - must be zero */
-#define DNS_KEYFLAG_OWNERMASK 0x0300 /* these bits determine the type */
-#define DNS_KEYOWNER_USER 0x0000 /* key is assoc. with user */
-#define DNS_KEYOWNER_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define DNS_KEYOWNER_ZONE 0x0100 /* key is zone key */
-#define DNS_KEYOWNER_RESERVED 0x0300 /* reserved meaning */
-#define DNS_KEYFLAG_RESERVED8 0x0080 /* reserved - must be zero */
-#define DNS_KEYFLAG_RESERVED9 0x0040 /* reserved - must be zero */
-#define DNS_KEYFLAG_RESERVED10 0x0020 /* reserved - must be zero */
-#define DNS_KEYFLAG_RESERVED11 0x0010 /* reserved - must be zero */
-#define DNS_KEYFLAG_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
+#define DNS_KEYFLAG_RESERVED2 0x2000 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_EXTENDED 0x1000 /*%< key has extended flags */
+#define DNS_KEYFLAG_RESERVED4 0x0800 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_RESERVED5 0x0400 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_OWNERMASK 0x0300 /*%< these bits determine the type */
+#define DNS_KEYOWNER_USER 0x0000 /*%< key is assoc. with user */
+#define DNS_KEYOWNER_ENTITY 0x0200 /*%< key is assoc. with entity eg host */
+#define DNS_KEYOWNER_ZONE 0x0100 /*%< key is zone key */
+#define DNS_KEYOWNER_RESERVED 0x0300 /*%< reserved meaning */
+#define DNS_KEYFLAG_RESERVED8 0x0080 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_RESERVED9 0x0040 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_RESERVED10 0x0020 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_RESERVED11 0x0010 /*%< reserved - must be zero */
+#define DNS_KEYFLAG_SIGNATORYMASK 0x000F /*%< key can sign RR's of same name */
#define DNS_KEYFLAG_RESERVEDMASK (DNS_KEYFLAG_RESERVED2 | \
DNS_KEYFLAG_RESERVED4 | \
@@ -53,21 +55,21 @@
DNS_KEYFLAG_RESERVED9 | \
DNS_KEYFLAG_RESERVED10 | \
DNS_KEYFLAG_RESERVED11 )
-#define DNS_KEYFLAG_KSK 0x0001 /* key signing key */
+#define DNS_KEYFLAG_KSK 0x0001 /*%< key signing key */
-#define DNS_KEYFLAG_RESERVEDMASK2 0xFFFF /* no bits defined here */
+#define DNS_KEYFLAG_RESERVEDMASK2 0xFFFF /*%< no bits defined here */
/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define DNS_KEYALG_RSAMD5 1 /* RSA with MD5 */
+#define DNS_KEYALG_RSAMD5 1 /*%< RSA with MD5 */
#define DNS_KEYALG_RSA DNS_KEYALG_RSAMD5
-#define DNS_KEYALG_DH 2 /* Diffie Hellman KEY */
-#define DNS_KEYALG_DSA 3 /* DSA KEY */
+#define DNS_KEYALG_DH 2 /*%< Diffie Hellman KEY */
+#define DNS_KEYALG_DSA 3 /*%< DSA KEY */
#define DNS_KEYALG_DSS NS_ALG_DSA
#define DNS_KEYALG_ECC 4
#define DNS_KEYALG_RSASHA1 5
#define DNS_KEYALG_INDIRECT 252
#define DNS_KEYALG_PRIVATEDNS 253
-#define DNS_KEYALG_PRIVATEOID 254 /* Key begins with OID giving alg */
+#define DNS_KEYALG_PRIVATEOID 254 /*%< Key begins with OID giving alg */
/* Protocol values */
#define DNS_KEYPROTO_RESERVED 0
@@ -78,11 +80,11 @@
#define DNS_KEYPROTO_ANY 255
/* Signatures */
-#define DNS_SIG_RSAMINBITS 512 /* Size of a mod or exp in bits */
+#define DNS_SIG_RSAMINBITS 512 /*%< Size of a mod or exp in bits */
#define DNS_SIG_RSAMAXBITS 2552
/* Total of binary mod and exp */
#define DNS_SIG_RSAMAXBYTES ((DNS_SIG_RSAMAXBITS+7/8)*2+3)
- /* Max length of text sig block */
+ /*%< Max length of text sig block */
#define DNS_SIG_RSAMAXBASE64 (((DNS_SIG_RSAMAXBYTES+2)/3)*4)
#define DNS_SIG_RSAMINSIZE ((DNS_SIG_RSAMINBITS+7)/8)
#define DNS_SIG_RSAMAXSIZE ((DNS_SIG_RSAMAXBITS+7)/8)
diff --git a/contrib/bind9/lib/dns/include/dns/lib.h b/contrib/bind9/lib/dns/include/dns/lib.h
index e53dd2b..d59dde3 100644
--- a/contrib/bind9/lib/dns/include/dns/lib.h
+++ b/contrib/bind9/lib/dns/include/dns/lib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,21 +15,27 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.h,v 1.6.12.3 2004/03/08 09:04:36 marka Exp $ */
+/* $Id: lib.h,v 1.8.18.4 2005/09/20 04:33:48 marka Exp $ */
#ifndef DNS_LIB_H
#define DNS_LIB_H 1
+/*! \file */
+
#include <isc/types.h>
#include <isc/lang.h>
ISC_LANG_BEGINDECLS
+/*%
+ * Tuning: external query load in packets per seconds.
+ */
+LIBDNS_EXTERNAL_DATA extern unsigned int dns_pps;
LIBDNS_EXTERNAL_DATA extern isc_msgcat_t *dns_msgcat;
void
dns_lib_initmsgcat(void);
-/*
+/*%<
* Initialize the DNS library's message catalog, dns_msgcat, if it
* has not already been initialized.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/log.h b/contrib/bind9/lib/dns/include/dns/log.h
index 9901fc9..7bee174 100644
--- a/contrib/bind9/lib/dns/include/dns/log.h
+++ b/contrib/bind9/lib/dns/include/dns/log.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,9 +15,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.30.2.1.10.2 2004/03/06 08:13:57 marka Exp $ */
+/* $Id: log.h,v 1.33.18.4 2005/09/05 00:18:27 marka Exp $ */
-/* Principal Authors: DCL */
+/*! \file
+ * \author Principal Authors: DCL */
#ifndef DNS_LOG_H
#define DNS_LOG_H 1
@@ -69,33 +70,35 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
#define DNS_LOGMODULE_SDB (&dns_modules[22])
#define DNS_LOGMODULE_DIFF (&dns_modules[23])
#define DNS_LOGMODULE_HINTS (&dns_modules[24])
+#define DNS_LOGMODULE_ACACHE (&dns_modules[25])
+#define DNS_LOGMODULE_DLZ (&dns_modules[26])
ISC_LANG_BEGINDECLS
void
dns_log_init(isc_log_t *lctx);
-/*
+/*%
* Make the libdns categories and modules available for use with the
* ISC logging library.
*
* Requires:
- * lctx is a valid logging context.
+ *\li lctx is a valid logging context.
*
- * dns_log_init() is called only once.
+ *\li dns_log_init() is called only once.
*
* Ensures:
- * The catgories and modules defined above are available for
+ * \li The catgories and modules defined above are available for
* use by isc_log_usechannnel() and isc_log_write().
*/
void
dns_log_setcontext(isc_log_t *lctx);
-/*
+/*%
* Make the libdns library use the provided context for logging internal
* messages.
*
* Requires:
- * lctx is a valid logging context.
+ *\li lctx is a valid logging context.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/lookup.h b/contrib/bind9/lib/dns/include/dns/lookup.h
index 2be254c..aea6f84 100644
--- a/contrib/bind9/lib/dns/include/dns/lookup.h
+++ b/contrib/bind9/lib/dns/include/dns/lookup.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lookup.h,v 1.5.206.1 2004/03/06 08:13:57 marka Exp $ */
+/* $Id: lookup.h,v 1.6.18.2 2005/04/29 00:16:15 marka Exp $ */
#ifndef DNS_LOOKUP_H
#define DNS_LOOKUP_H 1
@@ -24,29 +24,28 @@
***** Module Info
*****/
-/*
- * DNS Lookup
- *
+/*! \file
+ * \brief
* The lookup module performs simple DNS lookups. It implements
* the full resolver algorithm, both looking for local data and
* resoving external names as necessary.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * RFCs: 1034, 1035, 2181, <TBS>
- * Drafts: <TBS>
+ *\li RFCs: 1034, 1035, 2181, TBS
+ *\li Drafts: TBS
*/
#include <isc/lang.h>
@@ -56,7 +55,7 @@
ISC_LANG_BEGINDECLS
-/*
+/*%
* A 'dns_lookupevent_t' is returned when a lookup completes.
* The sender field will be set to the lookup that completed. If 'result'
* is ISC_R_SUCCESS, then 'names' will contain a list of names associated
@@ -77,60 +76,60 @@ isc_result_t
dns_lookup_create(isc_mem_t *mctx, dns_name_t *name, dns_rdatatype_t type,
dns_view_t *view, unsigned int options, isc_task_t *task,
isc_taskaction_t action, void *arg, dns_lookup_t **lookupp);
-/*
+/*%<
* Finds the rrsets matching 'name' and 'type'.
*
* Requires:
*
- * 'mctx' is a valid mctx.
+ *\li 'mctx' is a valid mctx.
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'view' is a valid view which has a resolver.
+ *\li 'view' is a valid view which has a resolver.
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * lookupp != NULL && *lookupp == NULL
+ *\li lookupp != NULL && *lookupp == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMEMORY
*
- * Any resolver-related error (e.g. ISC_R_SHUTTINGDOWN) may also be
+ *\li Any resolver-related error (e.g. ISC_R_SHUTTINGDOWN) may also be
* returned.
*/
void
dns_lookup_cancel(dns_lookup_t *lookup);
-/*
+/*%<
* Cancel 'lookup'.
*
* Notes:
*
- * If 'lookup' has not completed, post its LOOKUPDONE event with a
+ *\li If 'lookup' has not completed, post its LOOKUPDONE event with a
* result code of ISC_R_CANCELED.
*
* Requires:
*
- * 'lookup' is a valid lookup.
+ *\li 'lookup' is a valid lookup.
*/
void
dns_lookup_destroy(dns_lookup_t **lookupp);
-/*
+/*%<
* Destroy 'lookup'.
*
* Requires:
*
- * '*lookupp' is a valid lookup.
+ *\li '*lookupp' is a valid lookup.
*
- * The caller has received the LOOKUPDONE event (either because the
+ *\li The caller has received the LOOKUPDONE event (either because the
* lookup completed or because dns_lookup_cancel() was called).
*
* Ensures:
*
- * *lookupp == NULL.
+ *\li *lookupp == NULL.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/master.h b/contrib/bind9/lib/dns/include/dns/master.h
index 0b861c6..1f94c8c 100644
--- a/contrib/bind9/lib/dns/include/dns/master.h
+++ b/contrib/bind9/lib/dns/include/dns/master.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.h,v 1.31.2.3.2.7 2004/03/08 09:04:36 marka Exp $ */
+/* $Id: master.h,v 1.38.18.6 2005/06/20 01:19:43 marka Exp $ */
#ifndef DNS_MASTER_H
#define DNS_MASTER_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -33,21 +35,60 @@
/*
* Flags to be passed in the 'options' argument in the functions below.
*/
-#define DNS_MASTER_AGETTL 0x00000001 /* Age the ttl based on $DATE. */
-#define DNS_MASTER_MANYERRORS 0x00000002 /* Continue processing on errors. */
-#define DNS_MASTER_NOINCLUDE 0x00000004 /* Disallow $INCLUDE directives. */
-#define DNS_MASTER_ZONE 0x00000008 /* Loading a zone master file. */
-#define DNS_MASTER_HINT 0x00000010 /* Loading a hint master file. */
-#define DNS_MASTER_SLAVE 0x00000020 /* Loading a slave master file. */
-#define DNS_MASTER_CHECKNS 0x00000040 /* Check NS records to see if
- * they are an address */
-#define DNS_MASTER_FATALNS 0x00000080 /* Treat DNS_MASTER_CHECKNS
- * matches as fatal */
+#define DNS_MASTER_AGETTL 0x00000001 /*%< Age the ttl based on $DATE. */
+#define DNS_MASTER_MANYERRORS 0x00000002 /*%< Continue processing on errors. */
+#define DNS_MASTER_NOINCLUDE 0x00000004 /*%< Disallow $INCLUDE directives. */
+#define DNS_MASTER_ZONE 0x00000008 /*%< Loading a zone master file. */
+#define DNS_MASTER_HINT 0x00000010 /*%< Loading a hint master file. */
+#define DNS_MASTER_SLAVE 0x00000020 /*%< Loading a slave master file. */
+#define DNS_MASTER_CHECKNS 0x00000040 /*%<
+ * Check NS records to see
+ * if they are an address
+ */
+#define DNS_MASTER_FATALNS 0x00000080 /*%<
+ * Treat DNS_MASTER_CHECKNS
+ * matches as fatal
+ */
#define DNS_MASTER_CHECKNAMES 0x00000100
#define DNS_MASTER_CHECKNAMESFAIL 0x00000200
+#define DNS_MASTER_CHECKWILDCARD 0x00000400 /* Check for internal wildcards. */
+#define DNS_MASTER_CHECKMX 0x00000800
+#define DNS_MASTER_CHECKMXFAIL 0x00001000
ISC_LANG_BEGINDECLS
+/*
+ * Structures that implement the "raw" format for master dump.
+ * These are provided for a reference purpose only; in the actual
+ * encoding, we directly read/write each field so that the encoded data
+ * is always "packed", regardless of the hardware architecture.
+ */
+#define DNS_RAWFORMAT_VERSION 0
+
+/* Common header */
+typedef struct {
+ isc_uint32_t format; /* must be
+ * dns_masterformat_raw */
+ isc_uint32_t version; /* compatibility for future
+ * extensions */
+ isc_uint32_t dumptime; /* timestamp on creation
+ * (currently unused)
+ */
+} dns_masterrawheader_t;
+
+/* The structure for each RRset */
+typedef struct {
+ isc_uint32_t totallen; /* length of the data for this
+ * RRset, including the
+ * "header" part */
+ dns_rdataclass_t rdclass; /* 16-bit class */
+ dns_rdatatype_t type; /* 16-bit type */
+ dns_rdatatype_t covers; /* same as type */
+ dns_ttl_t ttl; /* 32-bit TTL */
+ isc_uint32_t nrdata; /* number of RRs in this set */
+ /* followed by encoded owner name, and then rdata */
+} dns_masterrawrdataset_t;
+
/***
*** Function
***/
@@ -62,6 +103,16 @@ dns_master_loadfile(const char *master_file,
isc_mem_t *mctx);
isc_result_t
+dns_master_loadfile2(const char *master_file,
+ dns_name_t *top,
+ dns_name_t *origin,
+ dns_rdataclass_t zclass,
+ unsigned int options,
+ dns_rdatacallbacks_t *callbacks,
+ isc_mem_t *mctx,
+ dns_masterformat_t format);
+
+isc_result_t
dns_master_loadstream(FILE *stream,
dns_name_t *top,
dns_name_t *origin,
@@ -100,6 +151,18 @@ dns_master_loadfileinc(const char *master_file,
dns_loadctx_t **ctxp, isc_mem_t *mctx);
isc_result_t
+dns_master_loadfileinc2(const char *master_file,
+ dns_name_t *top,
+ dns_name_t *origin,
+ dns_rdataclass_t zclass,
+ unsigned int options,
+ dns_rdatacallbacks_t *callbacks,
+ isc_task_t *task,
+ dns_loaddonefunc_t done, void *done_arg,
+ dns_loadctx_t **ctxp, isc_mem_t *mctx,
+ dns_masterformat_t format);
+
+isc_result_t
dns_master_loadstreaminc(FILE *stream,
dns_name_t *top,
dns_name_t *origin,
@@ -132,8 +195,8 @@ dns_master_loadlexerinc(isc_lex_t *lex,
dns_loaddonefunc_t done, void *done_arg,
dns_loadctx_t **ctxp, isc_mem_t *mctx);
-/*
- * Loads a RFC 1305 master file from a file, stream, buffer, or existing
+/*%<
+ * Loads a RFC1305 master file from a file, stream, buffer, or existing
* lexer into rdatasets and then calls 'callbacks->commit' to commit the
* rdatasets. Rdata memory belongs to dns_master_load and will be
* reused / released when the callback completes. dns_load_master will
@@ -150,63 +213,63 @@ dns_master_loadlexerinc(isc_lex_t *lex,
* not called.
*
* Requires:
- * 'master_file' points to a valid string.
- * 'lexer' points to a valid lexer.
- * 'top' points to a valid name.
- * 'origin' points to a valid name.
- * 'callbacks->commit' points to a valid function.
- * 'callbacks->error' points to a valid function.
- * 'callbacks->warn' points to a valid function.
- * 'mctx' points to a valid memory context.
- * 'task' and 'done' to be valid.
- * 'lmgr' to be valid.
- * 'ctxp != NULL && ctxp == NULL'.
+ *\li 'master_file' points to a valid string.
+ *\li 'lexer' points to a valid lexer.
+ *\li 'top' points to a valid name.
+ *\li 'origin' points to a valid name.
+ *\li 'callbacks->commit' points to a valid function.
+ *\li 'callbacks->error' points to a valid function.
+ *\li 'callbacks->warn' points to a valid function.
+ *\li 'mctx' points to a valid memory context.
+ *\li 'task' and 'done' to be valid.
+ *\li 'lmgr' to be valid.
+ *\li 'ctxp != NULL && ctxp == NULL'.
*
* Returns:
- * ISC_R_SUCCESS upon successfully loading the master file.
- * ISC_R_SEENINCLUDE upon successfully loading the master file with
+ *\li ISC_R_SUCCESS upon successfully loading the master file.
+ *\li ISC_R_SEENINCLUDE upon successfully loading the master file with
* a $INCLUDE statement.
- * ISC_R_NOMEMORY out of memory.
- * ISC_R_UNEXPECTEDEND expected to be able to read a input token and
+ *\li ISC_R_NOMEMORY out of memory.
+ *\li ISC_R_UNEXPECTEDEND expected to be able to read a input token and
* there was not one.
- * ISC_R_UNEXPECTED
- * DNS_R_NOOWNER failed to specify a ownername.
- * DNS_R_NOTTL failed to specify a ttl.
- * DNS_R_BADCLASS record class did not match zone class.
- * DNS_R_CONTINUE load still in progress (dns_master_load*inc() only).
- * Any dns_rdata_fromtext() error code.
- * Any error code from callbacks->commit().
+ *\li ISC_R_UNEXPECTED
+ *\li DNS_R_NOOWNER failed to specify a ownername.
+ *\li DNS_R_NOTTL failed to specify a ttl.
+ *\li DNS_R_BADCLASS record class did not match zone class.
+ *\li DNS_R_CONTINUE load still in progress (dns_master_load*inc() only).
+ *\li Any dns_rdata_fromtext() error code.
+ *\li Any error code from callbacks->commit().
*/
void
dns_loadctx_detach(dns_loadctx_t **ctxp);
-/*
+/*%<
* Detach from the load context.
*
* Requires:
- * '*ctxp' to be valid.
+ *\li '*ctxp' to be valid.
*
* Ensures:
- * '*ctxp == NULL'
+ *\li '*ctxp == NULL'
*/
void
dns_loadctx_attach(dns_loadctx_t *source, dns_loadctx_t **target);
-/*
+/*%<
* Attach to the load context.
*
* Requires:
- * 'source' to be valid.
- * 'target != NULL && *target == NULL'.
+ *\li 'source' to be valid.
+ *\li 'target != NULL && *target == NULL'.
*/
void
dns_loadctx_cancel(dns_loadctx_t *ctx);
-/*
+/*%<
* Cancel loading the zone file associated with this load context.
*
* Requires:
- * 'ctx' to be valid
+ *\li 'ctx' to be valid
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/masterdump.h b/contrib/bind9/lib/dns/include/dns/masterdump.h
index 888c588..8cf5c13 100644
--- a/contrib/bind9/lib/dns/include/dns/masterdump.h
+++ b/contrib/bind9/lib/dns/include/dns/masterdump.h
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: masterdump.h,v 1.22.12.10 2005/09/06 02:12:41 marka Exp $ */
+/* $Id: masterdump.h,v 1.31.14.4 2005/09/01 03:04:28 marka Exp $ */
#ifndef DNS_MASTERDUMP_H
#define DNS_MASTERDUMP_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -46,10 +48,10 @@ typedef struct dns_master_style dns_master_style_t;
* rdata.h.
*/
-/* Omit the owner name when possible. */
+/*% Omit the owner name when possible. */
#define DNS_STYLEFLAG_OMIT_OWNER 0x00010000U
-/*
+/*%
* Omit the TTL when possible. If DNS_STYLEFLAG_TTL is
* also set, this means no TTLs are ever printed
* because $TTL directives are generated before every
@@ -67,32 +69,32 @@ typedef struct dns_master_style dns_master_style_t;
*/
#define DNS_STYLEFLAG_OMIT_TTL 0x00020000U
-/* Omit the class when possible. */
+/*% Omit the class when possible. */
#define DNS_STYLEFLAG_OMIT_CLASS 0x00040000U
-/* Output $TTL directives. */
+/*% Output $TTL directives. */
#define DNS_STYLEFLAG_TTL 0x00080000U
-/*
+/*%
* Output $ORIGIN directives and print owner names relative to
* the origin when possible.
*/
#define DNS_STYLEFLAG_REL_OWNER 0x00100000U
-/* Print domain names in RR data in relative form when possible.
+/*% Print domain names in RR data in relative form when possible.
For this to take effect, DNS_STYLEFLAG_REL_OWNER must also be set. */
#define DNS_STYLEFLAG_REL_DATA 0x00200000U
-/* Print the trust level of each rdataset. */
+/*% Print the trust level of each rdataset. */
#define DNS_STYLEFLAG_TRUST 0x00400000U
-/* Print negative caching entries. */
+/*% Print negative caching entries. */
#define DNS_STYLEFLAG_NCACHE 0x00800000U
-/* Never print the TTL */
+/*% Never print the TTL */
#define DNS_STYLEFLAG_NO_TTL 0x01000000U
-/* Never print the CLASS */
+/*% Never print the CLASS */
#define DNS_STYLEFLAG_NO_CLASS 0x02000000U
ISC_LANG_BEGINDECLS
@@ -101,7 +103,7 @@ ISC_LANG_BEGINDECLS
*** Constants
***/
-/*
+/*%
* The default master file style.
*
* This uses $TTL directives to avoid the need to dedicate a
@@ -110,13 +112,13 @@ ISC_LANG_BEGINDECLS
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_default;
-/*
+/*%
* A master file style that dumps zones to a very generic format easily
* imported/checked with external tools.
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full;
-/*
+/*%
* A master file style that prints explicit TTL values on each
* record line, never using $TTL statements. The TTL has a tab
* stop of its own, but the class and type share one.
@@ -124,13 +126,13 @@ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full;
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t
dns_master_style_explicitttl;
-/*
+/*%
* A master style format designed for cache files. It prints explicit TTL
* values on each record line and never uses $ORIGIN or relative names.
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_cache;
-/*
+/*%
* A master style that prints name, ttl, class, type, and value on
* every line. Similar to explicitttl above, but more verbose.
* Intended for generating master files which can be easily parsed
@@ -138,7 +140,7 @@ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_cache;
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_simple;
-/*
+/*%
* The style used for debugging, "dig" output, etc.
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_debug;
@@ -149,54 +151,55 @@ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_debug;
void
dns_dumpctx_attach(dns_dumpctx_t *source, dns_dumpctx_t **target);
-/*
+/*%<
* Attach to a dump context.
*
* Require:
- * 'source' to be valid.
- * 'target' to be non NULL and '*target' to be NULL.
+ *\li 'source' to be valid.
+ *\li 'target' to be non NULL and '*target' to be NULL.
*/
void
dns_dumpctx_detach(dns_dumpctx_t **dctxp);
-/*
+/*%<
* Detach from a dump context.
*
* Require:
- * 'dctxp' to point to a valid dump context.
+ *\li 'dctxp' to point to a valid dump context.
*
* Ensures:
- * '*dctxp' is NULL.
+ *\li '*dctxp' is NULL.
*/
void
dns_dumpctx_cancel(dns_dumpctx_t *dctx);
-/*
+/*%<
* Cancel a in progress dump.
*
* Require:
- * 'dctx' to be valid.
+ *\li 'dctx' to be valid.
*/
dns_dbversion_t *
dns_dumpctx_version(dns_dumpctx_t *dctx);
-/*
+/*%<
* Return the version handle (if any) of the database being dumped.
*
* Require:
- * 'dctx' to be valid.
+ *\li 'dctx' to be valid.
*/
dns_db_t *
dns_dumpctx_db(dns_dumpctx_t *dctx);
-/*
+/*%<
* Return the database being dumped.
*
* Require:
- * 'dctx' to be valid.
+ *\li 'dctx' to be valid.
*/
+/*@{*/
isc_result_t
dns_master_dumptostreaminc(isc_mem_t *mctx, dns_db_t *db,
dns_dbversion_t *version,
@@ -208,26 +211,37 @@ isc_result_t
dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
dns_dbversion_t *version,
const dns_master_style_t *style, FILE *f);
-/*
- * Dump the database 'db' to the steam 'f' in RFC1035 master
- * file format, in the style defined by 'style'
- * (e.g., &dns_default_master_style_default)
+
+isc_result_t
+dns_master_dumptostream2(isc_mem_t *mctx, dns_db_t *db,
+ dns_dbversion_t *version,
+ const dns_master_style_t *style,
+ dns_masterformat_t format, FILE *f);
+/*%<
+ * Dump the database 'db' to the steam 'f' in the specified format by
+ * 'format'. If the format is dns_masterformat_text (the RFC1035 format),
+ * 'style' specifies the file style (e.g., &dns_master_style_default).
+ *
+ * dns_master_dumptostream() is an old form of dns_master_dumptostream2(),
+ * which always specifies the dns_masterformat_text format.
*
* Temporary dynamic memory may be allocated from 'mctx'.
*
* Require:
- * 'task' to be valid.
- * 'done' to be non NULL.
- * 'dctxp' to be non NULL && '*dctxp' to be NULL.
+ *\li 'task' to be valid.
+ *\li 'done' to be non NULL.
+ *\li 'dctxp' to be non NULL && '*dctxp' to be NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_CONTINUE dns_master_dumptostreaminc() only.
- * ISC_R_NOMEMORY
- * Any database or rrset iterator error.
- * Any dns_rdata_totext() error code.
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_CONTINUE dns_master_dumptostreaminc() only.
+ *\li ISC_R_NOMEMORY
+ *\li Any database or rrset iterator error.
+ *\li Any dns_rdata_totext() error code.
*/
+/*@}*/
+/*@{*/
isc_result_t
dns_master_dumpinc(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
const dns_master_style_t *style, const char *filename,
@@ -235,39 +249,56 @@ dns_master_dumpinc(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
dns_dumpctx_t **dctxp);
isc_result_t
+dns_master_dumpinc2(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
+ const dns_master_style_t *style, const char *filename,
+ isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg, dns_dumpctx_t **dctxp, dns_masterformat_t format);
+
+isc_result_t
dns_master_dump(isc_mem_t *mctx, dns_db_t *db,
dns_dbversion_t *version,
const dns_master_style_t *style, const char *filename);
-/*
- * Dump the database 'db' to the file 'filename' in RFC1035 master
- * file format, in the style defined by 'style'
- * (e.g., &dns_default_master_style_default)
+
+isc_result_t
+dns_master_dump2(isc_mem_t *mctx, dns_db_t *db,
+ dns_dbversion_t *version,
+ const dns_master_style_t *style, const char *filename,
+ dns_masterformat_t format);
+
+/*%<
+ * Dump the database 'db' to the file 'filename' in the specified format by
+ * 'format'. If the format is dns_masterformat_text (the RFC1035 format),
+ * 'style' specifies the file style (e.g., &dns_master_style_default).
+ *
+ * dns_master_dumpinc() and dns_master_dump() are old forms of _dumpinc2()
+ * and _dump2(), respectively, which always specify the dns_masterformat_text
+ * format.
*
* Temporary dynamic memory may be allocated from 'mctx'.
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_CONTINUE dns_master_dumpinc() only.
- * ISC_R_NOMEMORY
- * Any database or rrset iterator error.
- * Any dns_rdata_totext() error code.
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_CONTINUE dns_master_dumpinc() only.
+ *\li ISC_R_NOMEMORY
+ *\li Any database or rrset iterator error.
+ *\li Any dns_rdata_totext() error code.
*/
+/*@}*/
isc_result_t
dns_master_rdatasettotext(dns_name_t *owner_name,
dns_rdataset_t *rdataset,
const dns_master_style_t *style,
isc_buffer_t *target);
-/*
+/*%<
* Convert 'rdataset' to text format, storing the result in 'target'.
*
* Notes:
- * The rdata cursor position will be changed.
+ *\li The rdata cursor position will be changed.
*
* Requires:
- * 'rdataset' is a valid non-question rdataset.
+ *\li 'rdataset' is a valid non-question rdataset.
*
- * 'rdataset' is not empty.
+ *\li 'rdataset' is not empty.
*/
isc_result_t
diff --git a/contrib/bind9/lib/dns/include/dns/message.h b/contrib/bind9/lib/dns/include/dns/message.h
index 960c11a..9002b83 100644
--- a/contrib/bind9/lib/dns/include/dns/message.h
+++ b/contrib/bind9/lib/dns/include/dns/message.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.h,v 1.100.2.3.8.10 2006/02/28 06:32:54 marka Exp $ */
+/* $Id: message.h,v 1.114.18.6 2006/03/02 23:19:20 marka Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
@@ -33,7 +33,9 @@
#include <dst/dst.h>
-/*
+/*! \file
+ * \brief Message Handling Module
+ *
* How this beast works:
*
* When a dns message is received in a buffer, dns_message_fromwire() is called
@@ -54,9 +56,9 @@
* one of two ways. Assume a name was allocated via
* dns_message_gettempname():
*
- * (1) insert it into a section, using dns_message_addname().
+ *\li (1) insert it into a section, using dns_message_addname().
*
- * (2) return it to the message using dns_message_puttempname().
+ *\li (2) return it to the message using dns_message_puttempname().
*
* The same applies to rdatasets.
*
@@ -74,6 +76,7 @@
* Since the buffer itself exists until the message is destroyed, this sort
* of code can be written:
*
+ * \code
* buffer = isc_buffer_allocate(mctx, 512);
* name = NULL;
* name = dns_message_gettempname(message, &name);
@@ -81,6 +84,7 @@
* result = dns_name_fromtext(name, &source, dns_rootname, ISC_FALSE,
* buffer);
* dns_message_takebuffer(message, &buffer);
+ * \endcode
*
*
* TODO:
@@ -102,7 +106,7 @@
#define DNS_MESSAGE_REPLYPRESERVE (DNS_MESSAGEFLAG_RD|DNS_MESSAGEFLAG_CD)
#define DNS_MESSAGEEXTFLAG_REPLYPRESERVE (DNS_MESSAGEEXTFLAG_DO)
-#define DNS_MESSAGE_HEADERLEN 12 /* 6 isc_uint16_t's */
+#define DNS_MESSAGE_HEADERLEN 12 /*%< 6 isc_uint16_t's */
#define DNS_MESSAGE_MAGIC ISC_MAGIC('M','S','G','@')
#define DNS_MESSAGE_VALID(msg) ISC_MAGIC_VALID(msg, DNS_MESSAGE_MAGIC)
@@ -140,32 +144,32 @@ typedef int dns_messagetextflag_t;
/*
* These tell the message library how the created dns_message_t will be used.
*/
-#define DNS_MESSAGE_INTENTUNKNOWN 0 /* internal use only */
-#define DNS_MESSAGE_INTENTPARSE 1 /* parsing messages */
-#define DNS_MESSAGE_INTENTRENDER 2 /* rendering */
+#define DNS_MESSAGE_INTENTUNKNOWN 0 /*%< internal use only */
+#define DNS_MESSAGE_INTENTPARSE 1 /*%< parsing messages */
+#define DNS_MESSAGE_INTENTRENDER 2 /*%< rendering */
/*
* Control behavior of parsing
*/
-#define DNS_MESSAGEPARSE_PRESERVEORDER 0x0001 /* preserve rdata order */
-#define DNS_MESSAGEPARSE_BESTEFFORT 0x0002 /* return a message if a
+#define DNS_MESSAGEPARSE_PRESERVEORDER 0x0001 /*%< preserve rdata order */
+#define DNS_MESSAGEPARSE_BESTEFFORT 0x0002 /*%< return a message if a
recoverable parse error
occurs */
-#define DNS_MESSAGEPARSE_CLONEBUFFER 0x0004 /* save a copy of the
+#define DNS_MESSAGEPARSE_CLONEBUFFER 0x0004 /*%< save a copy of the
source buffer */
-#define DNS_MESSAGEPARSE_IGNORETRUNCATION 0x0008 /* trucation errors are
+#define DNS_MESSAGEPARSE_IGNORETRUNCATION 0x0008 /*%< trucation errors are
* not fatal. */
/*
* Control behavior of rendering
*/
-#define DNS_MESSAGERENDER_ORDERED 0x0001 /* don't change order */
-#define DNS_MESSAGERENDER_PARTIAL 0x0002 /* allow a partial rdataset */
-#define DNS_MESSAGERENDER_OMITDNSSEC 0x0004 /* omit DNSSEC records */
-#define DNS_MESSAGERENDER_PREFER_A 0x0008 /* prefer A records in
- * additional section. */
-#define DNS_MESSAGERENDER_PREFER_AAAA 0x0010 /* prefer AAAA records in
- * additional section. */
+#define DNS_MESSAGERENDER_ORDERED 0x0001 /*%< don't change order */
+#define DNS_MESSAGERENDER_PARTIAL 0x0002 /*%< allow a partial rdataset */
+#define DNS_MESSAGERENDER_OMITDNSSEC 0x0004 /*%< omit DNSSEC records */
+#define DNS_MESSAGERENDER_PREFER_A 0x0008 /*%< prefer A records in
+ additional section. */
+#define DNS_MESSAGERENDER_PREFER_AAAA 0x0010 /*%< prefer AAAA records in
+ additional section. */
typedef struct dns_msgblock dns_msgblock_t;
@@ -248,32 +252,32 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp);
-/*
+/*%<
* Create msg structure.
*
* This function will allocate some internal blocks of memory that are
* expected to be needed for parsing or rendering nearly any type of message.
*
* Requires:
- * 'mctx' be a valid memory context.
+ *\li 'mctx' be a valid memory context.
*
- * 'msgp' be non-null and '*msg' be NULL.
+ *\li 'msgp' be non-null and '*msg' be NULL.
*
- * 'intent' must be one of DNS_MESSAGE_INTENTPARSE or
- * DNS_MESSAGE_INTENTRENDER.
+ *\li 'intent' must be one of DNS_MESSAGE_INTENTPARSE or
+ * #DNS_MESSAGE_INTENTRENDER.
*
* Ensures:
- * The data in "*msg" is set to indicate an unused and empty msg
+ *\li The data in "*msg" is set to indicate an unused and empty msg
* structure.
*
* Returns:
- * ISC_R_NOMEMORY -- out of memory
- * ISC_R_SUCCESS -- success
+ *\li #ISC_R_NOMEMORY -- out of memory
+ *\li #ISC_R_SUCCESS -- success
*/
void
dns_message_reset(dns_message_t *msg, unsigned int intent);
-/*
+/*%<
* Reset a message structure to default state. All internal lists are freed
* or reset to a default state as well. This is simply a more efficient
* way to call dns_message_destroy() followed by dns_message_allocate(),
@@ -286,22 +290,22 @@ dns_message_reset(dns_message_t *msg, unsigned int intent);
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'intent' is DNS_MESSAGE_INTENTPARSE or DNS_MESSAGE_INTENTRENDER
+ *\li 'intent' is DNS_MESSAGE_INTENTPARSE or DNS_MESSAGE_INTENTRENDER
*/
void
dns_message_destroy(dns_message_t **msgp);
-/*
+/*%<
* Destroy all state in the message.
*
* Requires:
*
- * 'msgp' be valid.
+ *\li 'msgp' be valid.
*
* Ensures:
- * '*msgp' == NULL
+ *\li '*msgp' == NULL
*/
isc_result_t
@@ -316,85 +320,83 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
const dns_master_style_t *style,
dns_messagetextflag_t flags,
isc_buffer_t *target);
-/*
+/*%<
* Convert section 'section' or 'pseudosection' of message 'msg' to
* a cleartext representation
*
* Notes:
- * See dns_message_totext for meanings of flags.
+ * \li See dns_message_totext for meanings of flags.
*
* Requires:
*
- * 'msg' is a valid message.
+ *\li 'msg' is a valid message.
*
- * 'style' is a valid master dump style.
+ *\li 'style' is a valid master dump style.
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
- * 'section' is a valid section label.
+ *\li 'section' is a valid section label.
*
* Ensures:
*
- * If the result is success:
- *
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
- * ISC_R_NOMORE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
+ *\li #ISC_R_NOMORE
*
- * Note: On error return, *target may be partially filled with data.
+ *\li Note: On error return, *target may be partially filled with data.
*/
isc_result_t
dns_message_totext(dns_message_t *msg, const dns_master_style_t *style,
dns_messagetextflag_t flags, isc_buffer_t *target);
-/*
+/*%<
* Convert all sections of message 'msg' to a cleartext representation
*
* Notes:
- * In flags, If DNS_MESSAGETEXTFLAG_OMITDOT is set, then the
+ * \li In flags, If #DNS_MESSAGETEXTFLAG_OMITDOT is set, then the
* final '.' in absolute names will not be emitted. If
- * DNS_MESSAGETEXTFLAG_NOCOMMENTS is cleared, lines beginning
+ * #DNS_MESSAGETEXTFLAG_NOCOMMENTS is cleared, lines beginning
* with ";;" will be emitted indicating section name. If
- * DNS_MESSAGETEXTFLAG_NOHEADERS is cleared, header lines will
+ * #DNS_MESSAGETEXTFLAG_NOHEADERS is cleared, header lines will
* be emitted.
*
* Requires:
*
- * 'msg' is a valid message.
+ *\li 'msg' is a valid message.
*
- * 'style' is a valid master dump style.
+ *\li 'style' is a valid master dump style.
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
* Ensures:
*
- * If the result is success:
- *
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
- * ISC_R_NOMORE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
+ *\li #ISC_R_NOMORE
*
- * Note: On error return, *target may be partially filled with data.
+ *\li Note: On error return, *target may be partially filled with data.
*/
isc_result_t
dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
unsigned int options);
-/*
+/*%<
* Parse raw wire data in 'source' as a DNS message.
*
* OPT records are detected and stored in the pseudo-section "opt".
* TSIGs are detected and stored in the pseudo-section "tsig".
*
- * If DNS_MESSAGEPARSE_PRESERVEORDER is set, or if the opcode of the message
+ * If #DNS_MESSAGEPARSE_PRESERVEORDER is set, or if the opcode of the message
* is UPDATE, a separate dns_name_t object will be created for each RR in the
* message. Each such dns_name_t will have a single rdataset containing the
* single RR, and the order of the RRs in the message is preserved.
@@ -403,39 +405,39 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
* of rdatasets. To access the names and their data, use
* dns_message_firstname() and dns_message_nextname().
*
- * If DNS_MESSAGEPARSE_BESTEFFORT is set, errors in message content will
+ * If #DNS_MESSAGEPARSE_BESTEFFORT is set, errors in message content will
* not be considered FORMERRs. If the entire message can be parsed, it
* will be returned and DNS_R_RECOVERABLE will be returned.
*
- * If DNS_MESSAGEPARSE_IGNORETRUNCATION is set then return as many complete
+ * If #DNS_MESSAGEPARSE_IGNORETRUNCATION is set then return as many complete
* RR's as possible, DNS_R_RECOVERABLE will be returned.
*
* OPT and TSIG records are always handled specially, regardless of the
* 'preserve_order' setting.
*
* Requires:
- * "msg" be valid.
+ *\li "msg" be valid.
*
- * "buffer" be a wire format buffer.
+ *\li "buffer" be a wire format buffer.
*
* Ensures:
- * The buffer's data format is correct.
+ *\li The buffer's data format is correct.
*
- * The buffer's contents verify as correct regarding header bits, buffer
+ *\li The buffer's contents verify as correct regarding header bits, buffer
* and rdata sizes, etc.
*
* Returns:
- * ISC_R_SUCCESS -- all is well
- * ISC_R_NOMEMORY -- no memory
- * DNS_R_RECOVERABLE -- the message parsed properly, but contained
+ *\li #ISC_R_SUCCESS -- all is well
+ *\li #ISC_R_NOMEMORY -- no memory
+ *\li #DNS_R_RECOVERABLE -- the message parsed properly, but contained
* errors.
- * Many other errors possible XXXMLG
+ *\li Many other errors possible XXXMLG
*/
isc_result_t
dns_message_renderbegin(dns_message_t *msg, dns_compress_t *cctx,
isc_buffer_t *buffer);
-/*
+/*%<
* Begin rendering on a message. Only one call can be made to this function
* per message.
*
@@ -447,24 +449,24 @@ dns_message_renderbegin(dns_message_t *msg, dns_compress_t *cctx,
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'cctx' be valid.
+ *\li 'cctx' be valid.
*
- * 'buffer' is a valid buffer.
+ *\li 'buffer' is a valid buffer.
*
* Side Effects:
*
- * The buffer is cleared before it is used.
+ *\li The buffer is cleared before it is used.
*
* Returns:
- * ISC_R_SUCCESS -- all is well
- * ISC_R_NOSPACE -- output buffer is too small
+ *\li #ISC_R_SUCCESS -- all is well
+ *\li #ISC_R_NOSPACE -- output buffer is too small
*/
isc_result_t
dns_message_renderchangebuffer(dns_message_t *msg, isc_buffer_t *buffer);
-/*
+/*%<
* Reset the buffer. This can be used after growing the old buffer
* on a ISC_R_NOSPACE return from most of the render functions.
*
@@ -474,20 +476,20 @@ dns_message_renderchangebuffer(dns_message_t *msg, isc_buffer_t *buffer);
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*
- * buffer != NULL.
+ *\li buffer != NULL.
*
* Returns:
- * ISC_R_NOSPACE -- new buffer is too small
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_NOSPACE -- new buffer is too small
+ *\li #ISC_R_SUCCESS -- all is well.
*/
isc_result_t
dns_message_renderreserve(dns_message_t *msg, unsigned int space);
-/*
+/*%<
* XXXMLG should use size_t rather than unsigned int once the buffer
* API is cleaned up
*
@@ -495,18 +497,18 @@ dns_message_renderreserve(dns_message_t *msg, unsigned int space);
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*
* Returns:
- * ISC_R_SUCCESS -- all is well.
- * ISC_R_NOSPACE -- not enough free space in the buffer.
+ *\li #ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_NOSPACE -- not enough free space in the buffer.
*/
void
dns_message_renderrelease(dns_message_t *msg, unsigned int space);
-/*
+/*%<
* XXXMLG should use size_t rather than unsigned int once the buffer
* API is cleaned up
*
@@ -514,87 +516,87 @@ dns_message_renderrelease(dns_message_t *msg, unsigned int space);
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'space' is less than or equal to the total amount of space reserved
+ *\li 'space' is less than or equal to the total amount of space reserved
* via prior calls to dns_message_renderreserve().
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*/
isc_result_t
dns_message_rendersection(dns_message_t *msg, dns_section_t section,
unsigned int options);
-/*
+/*%<
* Render all names, rdatalists, etc from the given section at the
* specified priority or higher.
*
* Requires:
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'section' be a valid section.
+ *\li 'section' be a valid section.
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*
* Returns:
- * ISC_R_SUCCESS -- all records were written, and there are
+ *\li #ISC_R_SUCCESS -- all records were written, and there are
* no more records for this section.
- * ISC_R_NOSPACE -- Not enough room in the buffer to write
+ *\li #ISC_R_NOSPACE -- Not enough room in the buffer to write
* all records requested.
- * DNS_R_MOREDATA -- All requested records written, and there
+ *\li #DNS_R_MOREDATA -- All requested records written, and there
* are records remaining for this section.
*/
void
dns_message_renderheader(dns_message_t *msg, isc_buffer_t *target);
-/*
+/*%<
* Render the message header. This is implicitly called by
* dns_message_renderend().
*
* Requires:
*
- * 'msg' be a valid message.
+ *\li 'msg' be a valid message.
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*
- * 'target' is a valid buffer with enough space to hold a message header
+ *\li 'target' is a valid buffer with enough space to hold a message header
*/
isc_result_t
dns_message_renderend(dns_message_t *msg);
-/*
+/*%<
* Finish rendering to the buffer. Note that more data can be in the
* 'msg' structure. Destroying the structure will free this, or in a multi-
* part EDNS1 message this data can be rendered to another buffer later.
*
* Requires:
*
- * 'msg' be a valid message.
+ *\li 'msg' be a valid message.
*
- * dns_message_renderbegin() was called.
+ *\li dns_message_renderbegin() was called.
*
* Returns:
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*/
void
dns_message_renderreset(dns_message_t *msg);
-/*
+/*%<
* Reset the message so that it may be rendered again.
*
* Notes:
*
- * If dns_message_renderbegin() has been called, dns_message_renderend()
+ *\li If dns_message_renderbegin() has been called, dns_message_renderend()
* must be called before calling this function.
*
* Requires:
*
- * 'msg' be a valid message with rendering intent.
+ *\li 'msg' be a valid message with rendering intent.
*/
isc_result_t
dns_message_firstname(dns_message_t *msg, dns_section_t section);
-/*
+/*%<
* Set internal per-section name pointer to the beginning of the section.
*
* The functions dns_message_firstname() and dns_message_nextname() may
@@ -602,39 +604,39 @@ dns_message_firstname(dns_message_t *msg, dns_section_t section);
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'section' be a valid section.
+ *\li 'section' be a valid section.
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMORE -- No names on given section.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMORE -- No names on given section.
*/
isc_result_t
dns_message_nextname(dns_message_t *msg, dns_section_t section);
-/*
+/*%<
* Sets the internal per-section name pointer to point to the next name
* in that section.
*
* Requires:
*
- * 'msg' be valid.
+ * \li 'msg' be valid.
*
- * 'section' be a valid section.
+ *\li 'section' be a valid section.
*
- * dns_message_firstname() must have been called on this section,
+ *\li dns_message_firstname() must have been called on this section,
* and the result was ISC_R_SUCCESS.
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMORE -- No more names in given section.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMORE -- No more names in given section.
*/
void
dns_message_currentname(dns_message_t *msg, dns_section_t section,
dns_name_t **name);
-/*
+/*%<
* Sets 'name' to point to the name where the per-section internal name
* pointer is currently set.
*
@@ -643,15 +645,15 @@ dns_message_currentname(dns_message_t *msg, dns_section_t section,
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'name' be non-NULL, and *name be NULL.
+ *\li 'name' be non-NULL, and *name be NULL.
*
- * 'section' be a valid section.
+ *\li 'section' be a valid section.
*
- * dns_message_firstname() must have been called on this section,
+ *\li dns_message_firstname() must have been called on this section,
* and the result of it and any dns_message_nextname() calls was
- * ISC_R_SUCCESS.
+ * #ISC_R_SUCCESS.
*/
isc_result_t
@@ -659,55 +661,55 @@ dns_message_findname(dns_message_t *msg, dns_section_t section,
dns_name_t *target, dns_rdatatype_t type,
dns_rdatatype_t covers, dns_name_t **foundname,
dns_rdataset_t **rdataset);
-/*
+/*%<
* Search for a name in the specified section. If it is found, *name is
* set to point to the name, and *rdataset is set to point to the found
* rdataset (if type is specified as other than dns_rdatatype_any).
*
* Requires:
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'section' be a valid section.
+ *\li 'section' be a valid section.
*
- * If a pointer to the name is desired, 'foundname' should be non-NULL.
+ *\li If a pointer to the name is desired, 'foundname' should be non-NULL.
* If it is non-NULL, '*foundname' MUST be NULL.
*
- * If a type other than dns_datatype_any is searched for, 'rdataset'
+ *\li If a type other than dns_datatype_any is searched for, 'rdataset'
* may be non-NULL, '*rdataset' be NULL, and will point at the found
* rdataset. If the type is dns_datatype_any, 'rdataset' must be NULL.
*
- * 'target' be a valid name.
+ *\li 'target' be a valid name.
*
- * 'type' be a valid type.
+ *\li 'type' be a valid type.
*
- * If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
+ *\li If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
* Otherwise it should be 0.
*
* Returns:
- * ISC_R_SUCCESS -- all is well.
- * DNS_R_NXDOMAIN -- name does not exist in that section.
- * DNS_R_NXRRSET -- The name does exist, but the desired
+ *\li #ISC_R_SUCCESS -- all is well.
+ *\li #DNS_R_NXDOMAIN -- name does not exist in that section.
+ *\li #DNS_R_NXRRSET -- The name does exist, but the desired
* type does not.
*/
isc_result_t
dns_message_findtype(dns_name_t *name, dns_rdatatype_t type,
dns_rdatatype_t covers, dns_rdataset_t **rdataset);
-/*
+/*%<
* Search the name for the specified type. If it is found, *rdataset is
* filled in with a pointer to that rdataset.
*
* Requires:
- * if '**rdataset' is non-NULL, *rdataset needs to be NULL.
+ *\li if '**rdataset' is non-NULL, *rdataset needs to be NULL.
*
- * 'type' be a valid type, and NOT dns_rdatatype_any.
+ *\li 'type' be a valid type, and NOT dns_rdatatype_any.
*
- * If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
+ *\li If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
* Otherwise it should be 0.
*
* Returns:
- * ISC_R_SUCCESS -- all is well.
- * ISC_R_NOTFOUND -- the desired type does not exist.
+ *\li #ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_NOTFOUND -- the desired type does not exist.
*/
isc_result_t
@@ -735,24 +737,24 @@ void
dns_message_movename(dns_message_t *msg, dns_name_t *name,
dns_section_t fromsection,
dns_section_t tosection);
-/*
+/*%<
* Move a name from one section to another.
*
* Requires:
*
- * 'msg' be valid.
+ *\li 'msg' be valid.
*
- * 'name' must be a name already in 'fromsection'.
+ *\li 'name' must be a name already in 'fromsection'.
*
- * 'fromsection' must be a valid section.
+ *\li 'fromsection' must be a valid section.
*
- * 'tosection' must be a valid section.
+ *\li 'tosection' must be a valid section.
*/
void
dns_message_addname(dns_message_t *msg, dns_name_t *name,
dns_section_t section);
-/*
+/*%<
* Adds the name to the given section.
*
* It is the caller's responsibility to enforce any unique name requirements
@@ -760,13 +762,32 @@ dns_message_addname(dns_message_t *msg, dns_name_t *name,
*
* Requires:
*
- * 'msg' be valid, and be a renderable message.
+ *\li 'msg' be valid, and be a renderable message.
+ *
+ *\li 'name' be a valid absolute name.
+ *
+ *\li 'section' be a named section.
+ */
+
+void
+dns_message_removename(dns_message_t *msg, dns_name_t *name,
+ dns_section_t section);
+/*%<
+ * Remove a existing name from a given section.
+ *
+ * It is the caller's responsibility to ensure the name is part of the
+ * given section.
+ *
+ * Requires:
+ *
+ *\li 'msg' be valid, and be a renderable message.
*
- * 'name' be a valid absolute name.
+ *\li 'name' be a valid absolute name.
*
- * 'section' be a named section.
+ *\li 'section' be a named section.
*/
+
/*
* LOANOUT FUNCTIONS
*
@@ -777,7 +798,7 @@ dns_message_addname(dns_message_t *msg, dns_name_t *name,
isc_result_t
dns_message_gettempname(dns_message_t *msg, dns_name_t **item);
-/*
+/*%<
* Return a name that can be used for any temporary purpose, including
* inserting into the message's linked lists. The name must be returned
* to the message code using dns_message_puttempname() or inserted into
@@ -786,180 +807,180 @@ dns_message_gettempname(dns_message_t *msg, dns_name_t **item);
* It is the caller's responsibility to initialize this name.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item == NULL
+ *\li item != NULL && *item == NULL
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMEMORY -- No item can be allocated.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMEMORY -- No item can be allocated.
*/
isc_result_t
dns_message_gettempoffsets(dns_message_t *msg, dns_offsets_t **item);
-/*
+/*%<
* Return an offsets array that can be used for any temporary purpose,
* such as attaching to a temporary name. The offsets will be freed
* when the message is destroyed or reset.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item == NULL
+ *\li item != NULL && *item == NULL
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMEMORY -- No item can be allocated.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMEMORY -- No item can be allocated.
*/
isc_result_t
dns_message_gettemprdata(dns_message_t *msg, dns_rdata_t **item);
-/*
+/*%<
* Return a rdata that can be used for any temporary purpose, including
* inserting into the message's linked lists. The rdata will be freed
* when the message is destroyed or reset.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item == NULL
+ *\li item != NULL && *item == NULL
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMEMORY -- No item can be allocated.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMEMORY -- No item can be allocated.
*/
isc_result_t
dns_message_gettemprdataset(dns_message_t *msg, dns_rdataset_t **item);
-/*
+/*%<
* Return a rdataset that can be used for any temporary purpose, including
* inserting into the message's linked lists. The name must be returned
* to the message code using dns_message_puttempname() or inserted into
* one of the message's sections before the message is destroyed.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item == NULL
+ *\li item != NULL && *item == NULL
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMEMORY -- No item can be allocated.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMEMORY -- No item can be allocated.
*/
isc_result_t
dns_message_gettemprdatalist(dns_message_t *msg, dns_rdatalist_t **item);
-/*
+/*%<
* Return a rdatalist that can be used for any temporary purpose, including
* inserting into the message's linked lists. The rdatalist will be
* destroyed when the message is destroyed or reset.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item == NULL
+ *\li item != NULL && *item == NULL
*
* Returns:
- * ISC_R_SUCCESS -- All is well.
- * ISC_R_NOMEMORY -- No item can be allocated.
+ *\li #ISC_R_SUCCESS -- All is well.
+ *\li #ISC_R_NOMEMORY -- No item can be allocated.
*/
void
dns_message_puttempname(dns_message_t *msg, dns_name_t **item);
-/*
+/*%<
* Return a borrowed name to the message's name free list.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item point to a name returned by
+ *\li item != NULL && *item point to a name returned by
* dns_message_gettempname()
*
* Ensures:
- * *item == NULL
+ *\li *item == NULL
*/
void
dns_message_puttemprdata(dns_message_t *msg, dns_rdata_t **item);
-/*
+/*%<
* Return a borrowed rdata to the message's rdata free list.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item point to a rdata returned by
+ *\li item != NULL && *item point to a rdata returned by
* dns_message_gettemprdata()
*
* Ensures:
- * *item == NULL
+ *\li *item == NULL
*/
void
dns_message_puttemprdataset(dns_message_t *msg, dns_rdataset_t **item);
-/*
+/*%<
* Return a borrowed rdataset to the message's rdataset free list.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item point to a rdataset returned by
+ *\li item != NULL && *item point to a rdataset returned by
* dns_message_gettemprdataset()
*
* Ensures:
- * *item == NULL
+ *\li *item == NULL
*/
void
dns_message_puttemprdatalist(dns_message_t *msg, dns_rdatalist_t **item);
-/*
+/*%<
* Return a borrowed rdatalist to the message's rdatalist free list.
*
* Requires:
- * msg be a valid message
+ *\li msg be a valid message
*
- * item != NULL && *item point to a rdatalist returned by
+ *\li item != NULL && *item point to a rdatalist returned by
* dns_message_gettemprdatalist()
*
* Ensures:
- * *item == NULL
+ *\li *item == NULL
*/
isc_result_t
dns_message_peekheader(isc_buffer_t *source, dns_messageid_t *idp,
unsigned int *flagsp);
-/*
+/*%<
* Assume the remaining region of "source" is a DNS message. Peek into
* it and fill in "*idp" with the message id, and "*flagsp" with the flags.
*
* Requires:
*
- * source != NULL
+ *\li source != NULL
*
* Ensures:
*
- * if (idp != NULL) *idp == message id.
+ *\li if (idp != NULL) *idp == message id.
*
- * if (flagsp != NULL) *flagsp == message flags.
+ *\li if (flagsp != NULL) *flagsp == message flags.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*
- * ISC_R_UNEXPECTEDEND -- buffer doesn't contain enough for a header.
+ *\li #ISC_R_UNEXPECTEDEND -- buffer doesn't contain enough for a header.
*/
isc_result_t
dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section);
-/*
+/*%<
* Start formatting a reply to the query in 'msg'.
*
* Requires:
*
- * 'msg' is a valid message with parsing intent, and contains a query.
+ *\li 'msg' is a valid message with parsing intent, and contains a query.
*
* Ensures:
*
- * The message will have a rendering intent. If 'want_question_section'
+ *\li The message will have a rendering intent. If 'want_question_section'
* is true, the message opcode is query or notify, and the question
* section is present and properly formatted, then the question section
* will be included in the reply. All other sections will be cleared.
@@ -968,9 +989,9 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section);
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*
- * DNS_R_FORMERR -- the header or question section of the
+ *\li #DNS_R_FORMERR -- the header or question section of the
* message is invalid, replying is impossible.
* If DNS_R_FORMERR is returned when
* want_question_section is ISC_FALSE, then
@@ -981,308 +1002,308 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section);
dns_rdataset_t *
dns_message_getopt(dns_message_t *msg);
-/*
+/*%<
* Get the OPT record for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message.
+ *\li 'msg' is a valid message.
*
* Returns:
*
- * The OPT rdataset of 'msg', or NULL if there isn't one.
+ *\li The OPT rdataset of 'msg', or NULL if there isn't one.
*/
isc_result_t
dns_message_setopt(dns_message_t *msg, dns_rdataset_t *opt);
-/*
+/*%<
* Set the OPT record for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message with rendering intent
+ *\li 'msg' is a valid message with rendering intent
* and no sections have been rendered.
*
- * 'opt' is a valid OPT record.
+ *\li 'opt' is a valid OPT record.
*
* Ensures:
*
- * The OPT record has either been freed or ownership of it has
+ *\li The OPT record has either been freed or ownership of it has
* been transferred to the message.
*
- * If ISC_R_SUCCESS was returned, the OPT record will be rendered
+ *\li If ISC_R_SUCCESS was returned, the OPT record will be rendered
* when dns_message_renderend() is called.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*
- * ISC_R_NOSPACE -- there is no space for the OPT record.
+ *\li #ISC_R_NOSPACE -- there is no space for the OPT record.
*/
dns_rdataset_t *
dns_message_gettsig(dns_message_t *msg, dns_name_t **owner);
-/*
+/*%<
* Get the TSIG record and owner for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message.
- * 'owner' is NULL or *owner is NULL.
+ *\li 'msg' is a valid message.
+ *\li 'owner' is NULL or *owner is NULL.
*
* Returns:
*
- * The TSIG rdataset of 'msg', or NULL if there isn't one.
+ *\li The TSIG rdataset of 'msg', or NULL if there isn't one.
*
* Ensures:
*
- * If 'owner' is not NULL, it will point to the owner name.
+ * \li If 'owner' is not NULL, it will point to the owner name.
*/
isc_result_t
dns_message_settsigkey(dns_message_t *msg, dns_tsigkey_t *key);
-/*
+/*%<
* Set the tsig key for 'msg'. This is only necessary for when rendering a
* query or parsing a response. The key (if non-NULL) is attached to, and
* will be detached when the message is destroyed.
*
* Requires:
*
- * 'msg' is a valid message with rendering intent,
+ *\li 'msg' is a valid message with rendering intent,
* dns_message_renderbegin() has been called, and no sections have been
* rendered.
- * 'key' is a valid tsig key or NULL.
+ *\li 'key' is a valid tsig key or NULL.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*
- * ISC_R_NOSPACE -- there is no space for the TSIG record.
+ *\li #ISC_R_NOSPACE -- there is no space for the TSIG record.
*/
dns_tsigkey_t *
dns_message_gettsigkey(dns_message_t *msg);
-/*
+/*%<
* Gets the tsig key for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message
+ *\li 'msg' is a valid message
*/
isc_result_t
dns_message_setquerytsig(dns_message_t *msg, isc_buffer_t *querytsig);
-/*
+/*%<
* Indicates that 'querytsig' is the TSIG from the signed query for which
* 'msg' is the response. This is also used for chained TSIGs in TCP
* responses.
*
* Requires:
*
- * 'querytsig' is a valid buffer as returned by dns_message_getquerytsig()
+ *\li 'querytsig' is a valid buffer as returned by dns_message_getquerytsig()
* or NULL
*
- * 'msg' is a valid message
+ *\li 'msg' is a valid message
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
isc_result_t
dns_message_getquerytsig(dns_message_t *msg, isc_mem_t *mctx,
isc_buffer_t **querytsig);
-/*
+/*%<
* Gets the tsig from the TSIG from the signed query 'msg'. This is also used
* for chained TSIGs in TCP responses. Unlike dns_message_gettsig, this makes
* a copy of the data, so can be used if the message is destroyed.
*
* Requires:
*
- * 'msg' is a valid signed message
- * 'mctx' is a valid memory context
- * querytsig != NULL && *querytsig == NULL
+ *\li 'msg' is a valid signed message
+ *\li 'mctx' is a valid memory context
+ *\li querytsig != NULL && *querytsig == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*
* Ensures:
- * 'tsig' points to NULL or an allocated buffer which must be freed
+ *\li 'tsig' points to NULL or an allocated buffer which must be freed
* by the caller.
*/
dns_rdataset_t *
dns_message_getsig0(dns_message_t *msg, dns_name_t **owner);
-/*
+/*%<
* Get the SIG(0) record and owner for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message.
- * 'owner' is NULL or *owner is NULL.
+ *\li 'msg' is a valid message.
+ *\li 'owner' is NULL or *owner is NULL.
*
* Returns:
*
- * The SIG(0) rdataset of 'msg', or NULL if there isn't one.
+ *\li The SIG(0) rdataset of 'msg', or NULL if there isn't one.
*
* Ensures:
*
- * If 'owner' is not NULL, it will point to the owner name.
+ * \li If 'owner' is not NULL, it will point to the owner name.
*/
isc_result_t
dns_message_setsig0key(dns_message_t *msg, dst_key_t *key);
-/*
+/*%<
* Set the SIG(0) key for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message with rendering intent,
+ *\li 'msg' is a valid message with rendering intent,
* dns_message_renderbegin() has been called, and no sections have been
* rendered.
- * 'key' is a valid sig key or NULL.
+ *\li 'key' is a valid sig key or NULL.
*
* Returns:
*
- * ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_SUCCESS -- all is well.
*
- * ISC_R_NOSPACE -- there is no space for the SIG(0) record.
+ *\li #ISC_R_NOSPACE -- there is no space for the SIG(0) record.
*/
dst_key_t *
dns_message_getsig0key(dns_message_t *msg);
-/*
+/*%<
* Gets the SIG(0) key for 'msg'.
*
* Requires:
*
- * 'msg' is a valid message
+ *\li 'msg' is a valid message
*/
void
dns_message_takebuffer(dns_message_t *msg, isc_buffer_t **buffer);
-/*
+/*%<
* Give the *buffer to the message code to clean up when it is no
* longer needed. This is usually when the message is reset or
* destroyed.
*
* Requires:
*
- * msg be a valid message.
+ *\li msg be a valid message.
*
- * buffer != NULL && *buffer is a valid isc_buffer_t, which was
+ *\li buffer != NULL && *buffer is a valid isc_buffer_t, which was
* dynamincally allocated via isc_buffer_allocate().
*/
isc_result_t
dns_message_signer(dns_message_t *msg, dns_name_t *signer);
-/*
+/*%<
* If this message was signed, return the identity of the signer.
* Unless ISC_R_NOTFOUND is returned, signer will reflect the name of the
* key that signed the message.
*
* Requires:
*
- * msg is a valid parsed message.
- * signer is a valid name
+ *\li msg is a valid parsed message.
+ *\li signer is a valid name
*
* Returns:
*
- * ISC_R_SUCCESS - the message was signed, and *signer
+ *\li #ISC_R_SUCCESS - the message was signed, and *signer
* contains the signing identity
*
- * ISC_R_NOTFOUND - no TSIG or SIG(0) record is present in the
+ *\li #ISC_R_NOTFOUND - no TSIG or SIG(0) record is present in the
* message
*
- * DNS_R_TSIGVERIFYFAILURE - the message was signed by a TSIG, but the
+ *\li #DNS_R_TSIGVERIFYFAILURE - the message was signed by a TSIG, but the
* signature failed to verify
*
- * DNS_R_TSIGERRORSET - the message was signed by a TSIG and
+ *\li #DNS_R_TSIGERRORSET - the message was signed by a TSIG and
* verified, but the query was rejected by
* the server
*
- * DNS_R_NOIDENTITY - the message was signed by a TSIG and
+ *\li #DNS_R_NOIDENTITY - the message was signed by a TSIG and
* verified, but the key has no identity since
* it was generated by an unsigned TKEY process
*
- * DNS_R_SIGINVALID - the message was signed by a SIG(0), but
+ *\li #DNS_R_SIGINVALID - the message was signed by a SIG(0), but
* the signature failed to verify
*
- * DNS_R_NOTVERIFIEDYET - the message was signed by a TSIG or SIG(0),
+ *\li #DNS_R_NOTVERIFIEDYET - the message was signed by a TSIG or SIG(0),
* but the signature has not been verified yet
*/
isc_result_t
dns_message_checksig(dns_message_t *msg, dns_view_t *view);
-/*
+/*%<
* If this message was signed, verify the signature.
*
* Requires:
*
- * msg is a valid parsed message.
- * view is a valid view or NULL
+ *\li msg is a valid parsed message.
+ *\li view is a valid view or NULL
*
* Returns:
*
- * ISC_R_SUCCESS - the message was unsigned, or the message
+ *\li #ISC_R_SUCCESS - the message was unsigned, or the message
* was signed correctly.
*
- * DNS_R_EXPECTEDTSIG - A TSIG was expected, but not seen
- * DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
- * DNS_R_TSIGVERIFYFAILURE - The TSIG failed to verify
+ *\li #DNS_R_EXPECTEDTSIG - A TSIG was expected, but not seen
+ *\li #DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
+ *\li #DNS_R_TSIGVERIFYFAILURE - The TSIG failed to verify
*/
isc_result_t
dns_message_rechecksig(dns_message_t *msg, dns_view_t *view);
-/*
+/*%<
* Reset the signature state and then if the message was signed,
* verify the message.
*
* Requires:
*
- * msg is a valid parsed message.
- * view is a valid view or NULL
+ *\li msg is a valid parsed message.
+ *\li view is a valid view or NULL
*
* Returns:
*
- * ISC_R_SUCCESS - the message was unsigned, or the message
+ *\li #ISC_R_SUCCESS - the message was unsigned, or the message
* was signed correctly.
*
- * DNS_R_EXPECTEDTSIG - A TSIG was expected, but not seen
- * DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
- * DNS_R_TSIGVERIFYFAILURE - The TSIG failed to verify
+ *\li #DNS_R_EXPECTEDTSIG - A TSIG was expected, but not seen
+ *\li #DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
+ *\li #DNS_R_TSIGVERIFYFAILURE - The TSIG failed to verify
*/
void
dns_message_resetsig(dns_message_t *msg);
-/*
+/*%<
* Reset the signature state.
*
* Requires:
- * 'msg' is a valid parsed message.
+ *\li 'msg' is a valid parsed message.
*/
isc_region_t *
dns_message_getrawmessage(dns_message_t *msg);
-/*
+/*%<
* Retrieve the raw message in compressed wire format. The message must
* have been successfully parsed for it to have been saved.
*
* Requires:
- * msg is a valid parsed message.
+ *\li msg is a valid parsed message.
*
* Returns:
- * NULL if there is no saved message.
+ *\li NULL if there is no saved message.
* a pointer to a region which refers the dns message.
*/
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
const void *order_arg);
-/*
+/*%<
* Define the order in which RR sets get rendered by
* dns_message_rendersection() to be the ascending order
* defined by the integer value returned by 'order' when
@@ -1290,27 +1311,27 @@ dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
* 'order_arg' are NULL, a default order is used.
*
* Requires:
- * msg be a valid message.
- * order_arg is NULL if and only if order is NULL.
+ *\li msg be a valid message.
+ *\li order_arg is NULL if and only if order is NULL.
*/
void
dns_message_settimeadjust(dns_message_t *msg, int timeadjust);
-/*
+/*%<
* Adjust the time used to sign/verify a message by timeadjust.
* Currently only TSIG.
*
* Requires:
- * msg be a valid message.
+ *\li msg be a valid message.
*/
int
dns_message_gettimeadjust(dns_message_t *msg);
-/*
+/*%<
* Return the current time adjustment.
*
* Requires:
- * msg be a valid message.
+ *\li msg be a valid message.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/name.h b/contrib/bind9/lib/dns/include/dns/name.h
index ce9e1f1..038ae05 100644
--- a/contrib/bind9/lib/dns/include/dns/name.h
+++ b/contrib/bind9/lib/dns/include/dns/name.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.h,v 1.95.2.3.2.14 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: name.h,v 1.107.18.15 2006/03/02 00:37:21 marka Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
@@ -24,9 +24,8 @@
***** Module Info
*****/
-/*
- * DNS Names and Labels
- *
+/*! \file
+ * \brief
* Provides facilities for manipulating DNS names and labels, including
* conversions to and from wire format and text format.
*
@@ -45,26 +44,26 @@
* handles.
*
* MP:
- * Clients of this module must impose any required synchronization.
+ *\li Clients of this module must impose any required synchronization.
*
* Reliability:
- * This module deals with low-level byte streams. Errors in any of
+ *\li This module deals with low-level byte streams. Errors in any of
* the functions are likely to crash the server or corrupt memory.
*
* Resources:
- * None.
+ *\li None.
*
* Security:
*
- * *** WARNING ***
+ *\li *** WARNING ***
*
- * dns_name_fromwire() deals with raw network data. An error in
+ *\li dns_name_fromwire() deals with raw network data. An error in
* this routine could result in the failure or hijacking of the server.
*
* Standards:
- * RFC 1035
- * Draft EDNS0 (0)
- * Draft Binary Labels (2)
+ *\li RFC1035
+ *\li Draft EDNS0 (0)
+ *\li Draft Binary Labels (2)
*
*/
@@ -109,7 +108,7 @@ ISC_LANG_BEGINDECLS
*** Types
***/
-/*
+/*%
* Clients are strongly discouraged from using this type directly, with
* the exception of the 'link' and 'list' fields which may be used directly
* for whatever purpose the client desires.
@@ -135,89 +134,100 @@ struct dns_name {
/*
* Attributes below 0x0100 reserved for name.c usage.
*/
-#define DNS_NAMEATTR_CACHE 0x0100 /* Used by resolver. */
-#define DNS_NAMEATTR_ANSWER 0x0200 /* Used by resolver. */
-#define DNS_NAMEATTR_NCACHE 0x0400 /* Used by resolver. */
-#define DNS_NAMEATTR_CHAINING 0x0800 /* Used by resolver. */
-#define DNS_NAMEATTR_CHASE 0x1000 /* Used by resolver. */
-#define DNS_NAMEATTR_WILDCARD 0x2000 /* Used by server. */
+#define DNS_NAMEATTR_CACHE 0x0100 /*%< Used by resolver. */
+#define DNS_NAMEATTR_ANSWER 0x0200 /*%< Used by resolver. */
+#define DNS_NAMEATTR_NCACHE 0x0400 /*%< Used by resolver. */
+#define DNS_NAMEATTR_CHAINING 0x0800 /*%< Used by resolver. */
+#define DNS_NAMEATTR_CHASE 0x1000 /*%< Used by resolver. */
+#define DNS_NAMEATTR_WILDCARD 0x2000 /*%< Used by server. */
#define DNS_NAME_DOWNCASE 0x0001
-#define DNS_NAME_CHECKNAMES 0x0002 /* Used by rdata. */
-#define DNS_NAME_CHECKNAMESFAIL 0x0004 /* Used by rdata. */
-#define DNS_NAME_CHECKREVERSE 0x0008 /* Used by rdata. */
+#define DNS_NAME_CHECKNAMES 0x0002 /*%< Used by rdata. */
+#define DNS_NAME_CHECKNAMESFAIL 0x0004 /*%< Used by rdata. */
+#define DNS_NAME_CHECKREVERSE 0x0008 /*%< Used by rdata. */
+#define DNS_NAME_CHECKMX 0x0010 /*%< Used by rdata. */
+#define DNS_NAME_CHECKMXFAIL 0x0020 /*%< Used by rdata. */
LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_rootname;
LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_wildcardname;
-/*
+/*%
* Standard size of a wire format name
*/
#define DNS_NAME_MAXWIRE 255
+/*
+ * Text output filter procedure.
+ * 'target' is the buffer to be converted. The region to be converted
+ * is from 'buffer'->base + 'used_org' to the end of the used region.
+ */
+typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target,
+ unsigned int used_org,
+ isc_boolean_t absolute);
+
/***
*** Initialization
***/
void
dns_name_init(dns_name_t *name, unsigned char *offsets);
-/*
+/*%<
* Initialize 'name'.
*
* Notes:
- * 'offsets' is never required to be non-NULL, but specifying a
+ * \li 'offsets' is never required to be non-NULL, but specifying a
* dns_offsets_t for 'offsets' will improve the performance of most
* name operations if the name is used more than once.
*
* Requires:
- * 'name' is not NULL and points to a struct dns_name.
+ * \li 'name' is not NULL and points to a struct dns_name.
*
- * offsets == NULL or offsets is a dns_offsets_t.
+ * \li offsets == NULL or offsets is a dns_offsets_t.
*
* Ensures:
- * 'name' is a valid name.
- * dns_name_countlabels(name) == 0
- * dns_name_isabsolute(name) == ISC_FALSE
+ * \li 'name' is a valid name.
+ * \li dns_name_countlabels(name) == 0
+ * \li dns_name_isabsolute(name) == ISC_FALSE
*/
void
dns_name_reset(dns_name_t *name);
-/*
+/*%<
* Reinitialize 'name'.
*
* Notes:
- * This function distinguishes itself from dns_name_init() in two
+ * \li This function distinguishes itself from dns_name_init() in two
* key ways:
*
- * + If any buffer is associated with 'name' (via dns_name_setbuffer()
+ * \li + If any buffer is associated with 'name' (via dns_name_setbuffer()
* or by being part of a dns_fixedname_t) the link to the buffer
* is retained but the buffer itself is cleared.
*
- * + Of the attributes associated with 'name', all are retained except
+ * \li + Of the attributes associated with 'name', all are retained except
* DNS_NAMEATTR_ABSOLUTE.
*
* Requires:
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
* Ensures:
- * 'name' is a valid name.
- * dns_name_countlabels(name) == 0
- * dns_name_isabsolute(name) == ISC_FALSE
+ * \li 'name' is a valid name.
+ * \li dns_name_countlabels(name) == 0
+ * \li dns_name_isabsolute(name) == ISC_FALSE
*/
void
dns_name_invalidate(dns_name_t *name);
-/*
+/*%<
* Make 'name' invalid.
*
* Requires:
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
* Ensures:
- * If assertion checking is enabled, future attempts to use 'name'
+ * \li If assertion checking is enabled, future attempts to use 'name'
* without initializing it will cause an assertion failure.
*
- * If the name had a dedicated buffer, that association is ended.
+ * \li If the name had a dedicated buffer, that association is ended.
*/
@@ -227,93 +237,92 @@ dns_name_invalidate(dns_name_t *name);
void
dns_name_setbuffer(dns_name_t *name, isc_buffer_t *buffer);
-/*
+/*%<
* Dedicate a buffer for use with 'name'.
*
* Notes:
- * Specification of a target buffer in dns_name_fromwire(),
+ * \li Specification of a target buffer in dns_name_fromwire(),
* dns_name_fromtext(), and dns_name_concatentate() is optional if
* 'name' has a dedicated buffer.
*
- * The caller must not write to buffer until the name has been
+ * \li The caller must not write to buffer until the name has been
* invalidated or is otherwise known not to be in use.
*
- * If buffer is NULL and the name previously had a dedicated buffer,
+ * \li If buffer is NULL and the name previously had a dedicated buffer,
* than that buffer is no longer dedicated to use with this name.
* The caller is responsible for ensuring that the storage used by
* the name remains valid.
*
* Requires:
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
- * 'buffer' is a valid binary buffer and 'name' doesn't have a
+ * \li 'buffer' is a valid binary buffer and 'name' doesn't have a
* dedicated buffer already, or 'buffer' is NULL.
*/
isc_boolean_t
dns_name_hasbuffer(const dns_name_t *name);
-/*
+/*%<
* Does 'name' have a dedicated buffer?
*
* Requires:
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
* Returns:
- * ISC_TRUE 'name' has a dedicated buffer.
- * ISC_FALSE 'name' does not have a dedicated buffer.
+ * \li ISC_TRUE 'name' has a dedicated buffer.
+ * \li ISC_FALSE 'name' does not have a dedicated buffer.
*/
-
/***
*** Properties
***/
isc_boolean_t
dns_name_isabsolute(const dns_name_t *name);
-/*
+/*%<
* Does 'name' end in the root label?
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
* Returns:
- * TRUE The last label in 'name' is the root label.
- * FALSE The last label in 'name' is not the root label.
+ * \li TRUE The last label in 'name' is the root label.
+ * \li FALSE The last label in 'name' is not the root label.
*/
isc_boolean_t
dns_name_iswildcard(const dns_name_t *name);
-/*
+/*%<
* Is 'name' a wildcard name?
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
- * dns_name_countlabels(name) > 0
+ * \li dns_name_countlabels(name) > 0
*
* Returns:
- * TRUE The least significant label of 'name' is '*'.
- * FALSE The least significant label of 'name' is not '*'.
+ * \li TRUE The least significant label of 'name' is '*'.
+ * \li FALSE The least significant label of 'name' is not '*'.
*/
unsigned int
dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive);
-/*
+/*%<
* Provide a hash value for 'name'.
*
* Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
* case will have the same hash value.
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
* Returns:
- * A hash value
+ * \li A hash value
*/
unsigned int
dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive);
-/*
+/*%<
* Provide a hash value for 'name'. Unlike dns_name_hash(), this function
* always takes into account of the entire name to calculate the hash value.
*
@@ -321,15 +330,15 @@ dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive);
* case will have the same hash value.
*
* Requires:
- * 'name' is a valid name
+ *\li 'name' is a valid name
*
* Returns:
- * A hash value
+ *\li A hash value
*/
unsigned int
dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive);
-/*
+/*%<
* Provide a hash value for 'name', where the hash value is the sum
* of the hash values of each label.
*
@@ -337,20 +346,20 @@ dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive);
* case will have the same hash value.
*
* Requires:
- * 'name' is a valid name
+ *\li 'name' is a valid name
*
* Returns:
- * A hash value
+ *\li A hash value
*/
-/***
+/*
*** Comparisons
***/
dns_namereln_t
dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
int *orderp, unsigned int *nlabelsp);
-/*
+/*%<
* Determine the relative ordering under the DNSSEC order relation of
* 'name1' and 'name2', and also determine the hierarchical
* relationship of the names.
@@ -361,39 +370,39 @@ dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
* same domain.
*
* Requires:
- * 'name1' is a valid name
+ *\li 'name1' is a valid name
*
- * dns_name_countlabels(name1) > 0
+ *\li dns_name_countlabels(name1) > 0
*
- * 'name2' is a valid name
+ *\li 'name2' is a valid name
*
- * dns_name_countlabels(name2) > 0
+ *\li dns_name_countlabels(name2) > 0
*
- * orderp and nlabelsp are valid pointers.
+ *\li orderp and nlabelsp are valid pointers.
*
- * Either name1 is absolute and name2 is absolute, or neither is.
+ *\li Either name1 is absolute and name2 is absolute, or neither is.
*
* Ensures:
*
- * *orderp is < 0 if name1 < name2, 0 if name1 = name2, > 0 if
+ *\li *orderp is < 0 if name1 < name2, 0 if name1 = name2, > 0 if
* name1 > name2.
*
- * *nlabelsp is the number of common significant labels.
+ *\li *nlabelsp is the number of common significant labels.
*
* Returns:
- * dns_namereln_none There's no hierarchical relationship
+ *\li dns_namereln_none There's no hierarchical relationship
* between name1 and name2.
- * dns_namereln_contains name1 properly contains name2; i.e.
+ *\li dns_namereln_contains name1 properly contains name2; i.e.
* name2 is a proper subdomain of name1.
- * dns_namereln_subdomain name1 is a proper subdomain of name2.
- * dns_namereln_equal name1 and name2 are equal.
- * dns_namereln_commonancestor name1 and name2 share a common
+ *\li dns_namereln_subdomain name1 is a proper subdomain of name2.
+ *\li dns_namereln_equal name1 and name2 are equal.
+ *\li dns_namereln_commonancestor name1 and name2 share a common
* ancestor.
*/
int
dns_name_compare(const dns_name_t *name1, const dns_name_t *name2);
-/*
+/*%<
* Determine the relative ordering under the DNSSEC order relation of
* 'name1' and 'name2'.
*
@@ -403,124 +412,130 @@ dns_name_compare(const dns_name_t *name1, const dns_name_t *name2);
* same domain.
*
* Requires:
- * 'name1' is a valid name
+ * \li 'name1' is a valid name
*
- * 'name2' is a valid name
+ * \li 'name2' is a valid name
*
- * Either name1 is absolute and name2 is absolute, or neither is.
+ * \li Either name1 is absolute and name2 is absolute, or neither is.
*
* Returns:
- * < 0 'name1' is less than 'name2'
- * 0 'name1' is equal to 'name2'
- * > 0 'name1' is greater than 'name2'
+ * \li < 0 'name1' is less than 'name2'
+ * \li 0 'name1' is equal to 'name2'
+ * \li > 0 'name1' is greater than 'name2'
*/
isc_boolean_t
dns_name_equal(const dns_name_t *name1, const dns_name_t *name2);
-/*
+/*%<
* Are 'name1' and 'name2' equal?
*
* Notes:
- * Because it only needs to test for equality, dns_name_equal() can be
+ * \li Because it only needs to test for equality, dns_name_equal() can be
* significantly faster than dns_name_fullcompare() or dns_name_compare().
*
- * Offsets tables are not used in the comparision.
+ * \li Offsets tables are not used in the comparision.
*
- * It makes no sense for one of the names to be relative and the
+ * \li It makes no sense for one of the names to be relative and the
* other absolute. If both names are relative, then to be meaningfully
* compared the caller must ensure that they are both relative to the
* same domain.
*
* Requires:
- * 'name1' is a valid name
+ * \li 'name1' is a valid name
*
- * 'name2' is a valid name
+ * \li 'name2' is a valid name
*
- * Either name1 is absolute and name2 is absolute, or neither is.
+ * \li Either name1 is absolute and name2 is absolute, or neither is.
*
* Returns:
- * ISC_TRUE 'name1' and 'name2' are equal
- * ISC_FALSE 'name1' and 'name2' are not equal
+ * \li ISC_TRUE 'name1' and 'name2' are equal
+ * \li ISC_FALSE 'name1' and 'name2' are not equal
+ */
+
+isc_boolean_t
+dns_name_caseequal(const dns_name_t *name1, const dns_name_t *name2);
+/*%<
+ * Case sensitive version of dns_name_equal().
*/
int
dns_name_rdatacompare(const dns_name_t *name1, const dns_name_t *name2);
-/*
+/*%<
* Compare two names as if they are part of rdata in DNSSEC canonical
* form.
*
* Requires:
- * 'name1' is a valid absolute name
+ * \li 'name1' is a valid absolute name
*
- * dns_name_countlabels(name1) > 0
+ * \li dns_name_countlabels(name1) > 0
*
- * 'name2' is a valid absolute name
+ * \li 'name2' is a valid absolute name
*
- * dns_name_countlabels(name2) > 0
+ * \li dns_name_countlabels(name2) > 0
*
* Returns:
- * < 0 'name1' is less than 'name2'
- * 0 'name1' is equal to 'name2'
- * > 0 'name1' is greater than 'name2'
+ * \li < 0 'name1' is less than 'name2'
+ * \li 0 'name1' is equal to 'name2'
+ * \li > 0 'name1' is greater than 'name2'
*/
isc_boolean_t
dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2);
-/*
+/*%<
* Is 'name1' a subdomain of 'name2'?
*
* Notes:
- * name1 is a subdomain of name2 if name1 is contained in name2, or
+ * \li name1 is a subdomain of name2 if name1 is contained in name2, or
* name1 equals name2.
*
- * It makes no sense for one of the names to be relative and the
+ * \li It makes no sense for one of the names to be relative and the
* other absolute. If both names are relative, then to be meaningfully
* compared the caller must ensure that they are both relative to the
* same domain.
*
* Requires:
- * 'name1' is a valid name
+ * \li 'name1' is a valid name
*
- * 'name2' is a valid name
+ * \li 'name2' is a valid name
*
- * Either name1 is absolute and name2 is absolute, or neither is.
+ * \li Either name1 is absolute and name2 is absolute, or neither is.
*
* Returns:
- * TRUE 'name1' is a subdomain of 'name2'
- * FALSE 'name1' is not a subdomain of 'name2'
+ * \li TRUE 'name1' is a subdomain of 'name2'
+ * \li FALSE 'name1' is not a subdomain of 'name2'
*/
isc_boolean_t
dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname);
-/*
+/*%<
* Does 'name' match the wildcard specified in 'wname'?
*
* Notes:
- * name matches the wildcard specified in wname if all labels
+ * \li name matches the wildcard specified in wname if all labels
* following the wildcard in wname are identical to the same number
* of labels at the end of name.
*
- * It makes no sense for one of the names to be relative and the
+ * \li It makes no sense for one of the names to be relative and the
* other absolute. If both names are relative, then to be meaningfully
* compared the caller must ensure that they are both relative to the
* same domain.
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
- * dns_name_countlabels(name) > 0
+ * \li dns_name_countlabels(name) > 0
*
- * 'wname' is a valid name
+ * \li 'wname' is a valid name
*
- * dns_name_countlabels(wname) > 0
+ * \li dns_name_countlabels(wname) > 0
*
- * dns_name_iswildcard(wname) is true
+ * \li dns_name_iswildcard(wname) is true
*
- * Either name is absolute and wname is absolute, or neither is.
+ * \li Either name is absolute and wname is absolute, or neither is.
*
* Returns:
- * TRUE 'name' matches the wildcard specified in 'wname'
- * FALSE 'name' does not match the wildcard specified in 'wname'
+ * \li TRUE 'name' matches the wildcard specified in 'wname'
+ * \li FALSE 'name' does not match the wildcard specified in 'wname'
*/
/***
@@ -529,89 +544,91 @@ dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname);
unsigned int
dns_name_countlabels(const dns_name_t *name);
-/*
+/*%<
* How many labels does 'name' have?
*
* Notes:
- * In this case, as in other places, a 'label' is an ordinary label.
+ * \li In this case, as in other places, a 'label' is an ordinary label.
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
* Ensures:
- * The result is <= 128.
+ * \li The result is <= 128.
*
* Returns:
- * The number of labels in 'name'.
+ * \li The number of labels in 'name'.
*/
void
dns_name_getlabel(const dns_name_t *name, unsigned int n, dns_label_t *label);
-/*
+/*%<
* Make 'label' refer to the 'n'th least significant label of 'name'.
*
* Notes:
- * Numbering starts at 0.
+ * \li Numbering starts at 0.
*
- * Given "rc.vix.com.", the label 0 is "rc", and label 3 is the
+ * \li Given "rc.vix.com.", the label 0 is "rc", and label 3 is the
* root label.
*
- * 'label' refers to the same memory as 'name', so 'name' must not
+ * \li 'label' refers to the same memory as 'name', so 'name' must not
* be changed while 'label' is still in use.
*
* Requires:
- * n < dns_name_countlabels(name)
+ * \li n < dns_name_countlabels(name)
*/
void
dns_name_getlabelsequence(const dns_name_t *source, unsigned int first,
unsigned int n, dns_name_t *target);
-/*
+/*%<
* Make 'target' refer to the 'n' labels including and following 'first'
* in 'source'.
*
* Notes:
- * Numbering starts at 0.
+ * \li Numbering starts at 0.
*
- * Given "rc.vix.com.", the label 0 is "rc", and label 3 is the
+ * \li Given "rc.vix.com.", the label 0 is "rc", and label 3 is the
* root label.
*
- * 'target' refers to the same memory as 'source', so 'source'
+ * \li 'target' refers to the same memory as 'source', so 'source'
* must not be changed while 'target' is still in use.
*
* Requires:
- * 'source' and 'target' are valid names.
+ * \li 'source' and 'target' are valid names.
*
- * first < dns_name_countlabels(name)
+ * \li first < dns_name_countlabels(name)
*
- * first + n <= dns_name_countlabels(name)
+ * \li first + n <= dns_name_countlabels(name)
*/
void
dns_name_clone(const dns_name_t *source, dns_name_t *target);
-/*
+/*%<
* Make 'target' refer to the same name as 'source'.
*
* Notes:
*
- * 'target' refers to the same memory as 'source', so 'source'
+ * \li 'target' refers to the same memory as 'source', so 'source'
* must not be changed while 'target' is still in use.
*
- * This call is functionally equivalent to:
+ * \li This call is functionally equivalent to:
*
+ * \code
* dns_name_getlabelsequence(source, 0,
* dns_name_countlabels(source),
* target);
+ * \endcode
*
* but is more efficient. Also, dns_name_clone() works even if 'source'
* is empty.
*
* Requires:
*
- * 'source' is a valid name.
+ * \li 'source' is a valid name.
*
- * 'target' is a valid name that is not read-only.
+ * \li 'target' is a valid name that is not read-only.
*/
/***
@@ -620,206 +637,205 @@ dns_name_clone(const dns_name_t *source, dns_name_t *target);
void
dns_name_fromregion(dns_name_t *name, const isc_region_t *r);
-/*
+/*%<
* Make 'name' refer to region 'r'.
*
* Note:
- * If the conversion encounters a root label before the end of the
+ * \li If the conversion encounters a root label before the end of the
* region the conversion stops and the length is set to the length
* so far converted. A maximum of 255 bytes is converted.
*
* Requires:
- * The data in 'r' is a sequence of one or more type 00 or type 01000001
+ * \li The data in 'r' is a sequence of one or more type 00 or type 01000001
* labels.
*/
void
dns_name_toregion(dns_name_t *name, isc_region_t *r);
-/*
+/*%<
* Make 'r' refer to 'name'.
*
* Requires:
*
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
- * 'r' is a valid region.
+ * \li 'r' is a valid region.
*/
isc_result_t
dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
dns_decompress_t *dctx, unsigned int options,
isc_buffer_t *target);
-/*
+/*%<
* Copy the possibly-compressed name at source (active region) into target,
* decompressing it.
*
* Notes:
- * Decompression policy is controlled by 'dctx'.
+ * \li Decompression policy is controlled by 'dctx'.
*
- * If DNS_NAME_DOWNCASE is set, any uppercase letters in 'source' will be
+ * \li If DNS_NAME_DOWNCASE is set, any uppercase letters in 'source' will be
* downcased when they are copied into 'target'.
*
* Security:
*
- * *** WARNING ***
+ * \li *** WARNING ***
*
- * This routine will often be used when 'source' contains raw network
+ * \li This routine will often be used when 'source' contains raw network
* data. A programming error in this routine could result in a denial
* of service, or in the hijacking of the server.
*
* Requires:
*
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
- * 'source' is a valid buffer and the first byte of the active
+ * \li 'source' is a valid buffer and the first byte of the active
* region should be the first byte of a DNS wire format domain name.
*
- * 'target' is a valid buffer or 'target' is NULL and 'name' has
+ * \li 'target' is a valid buffer or 'target' is NULL and 'name' has
* a dedicated buffer.
*
- * 'dctx' is a valid decompression context.
+ * \li 'dctx' is a valid decompression context.
*
* Ensures:
*
* If result is success:
- * If 'target' is not NULL, 'name' is attached to it.
+ * \li If 'target' is not NULL, 'name' is attached to it.
*
- * Uppercase letters are downcased in the copy iff
+ * \li Uppercase letters are downcased in the copy iff
* DNS_NAME_DOWNCASE is set in options.
*
- * The current location in source is advanced, and the used space
+ * \li The current location in source is advanced, and the used space
* in target is updated.
*
* Result:
- * Success
- * Bad Form: Label Length
- * Bad Form: Unknown Label Type
- * Bad Form: Name Length
- * Bad Form: Compression type not allowed
- * Bad Form: Bad compression pointer
- * Bad Form: Input too short
- * Resource Limit: Too many compression pointers
- * Resource Limit: Not enough space in buffer
+ * \li Success
+ * \li Bad Form: Label Length
+ * \li Bad Form: Unknown Label Type
+ * \li Bad Form: Name Length
+ * \li Bad Form: Compression type not allowed
+ * \li Bad Form: Bad compression pointer
+ * \li Bad Form: Input too short
+ * \li Resource Limit: Too many compression pointers
+ * \li Resource Limit: Not enough space in buffer
*/
isc_result_t
dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
- isc_buffer_t *target);
-/*
+ isc_buffer_t *target);
+/*%<
* Convert 'name' into wire format, compressing it as specified by the
* compression context 'cctx', and storing the result in 'target'.
*
* Notes:
- * If the compression context allows global compression, then the
+ * \li If the compression context allows global compression, then the
* global compression table may be updated.
*
* Requires:
- * 'name' is a valid name
+ * \li 'name' is a valid name
*
- * dns_name_countlabels(name) > 0
+ * \li dns_name_countlabels(name) > 0
*
- * dns_name_isabsolute(name) == TRUE
+ * \li dns_name_isabsolute(name) == TRUE
*
- * target is a valid buffer.
+ * \li target is a valid buffer.
*
- * Any offsets specified in a global compression table are valid
+ * \li Any offsets specified in a global compression table are valid
* for buffer.
*
* Ensures:
*
* If the result is success:
*
- * The used space in target is updated.
+ * \li The used space in target is updated.
*
* Returns:
- * Success
- * Resource Limit: Not enough space in buffer
+ * \li Success
+ * \li Resource Limit: Not enough space in buffer
*/
isc_result_t
dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
dns_name_t *origin, unsigned int options,
isc_buffer_t *target);
-/*
+/*%<
* Convert the textual representation of a DNS name at source
* into uncompressed wire form stored in target.
*
* Notes:
- * Relative domain names will have 'origin' appended to them
+ * \li Relative domain names will have 'origin' appended to them
* unless 'origin' is NULL, in which case relative domain names
* will remain relative.
*
- * If DNS_NAME_DOWNCASE is set in 'options', any uppercase letters
+ * \li If DNS_NAME_DOWNCASE is set in 'options', any uppercase letters
* in 'source' will be downcased when they are copied into 'target'.
*
* Requires:
*
- * 'name' is a valid name.
+ * \li 'name' is a valid name.
*
- * 'source' is a valid buffer.
+ * \li 'source' is a valid buffer.
*
- * 'target' is a valid buffer or 'target' is NULL and 'name' has
+ * \li 'target' is a valid buffer or 'target' is NULL and 'name' has
* a dedicated buffer.
*
* Ensures:
*
* If result is success:
- * If 'target' is not NULL, 'name' is attached to it.
+ * \li If 'target' is not NULL, 'name' is attached to it.
*
- * Uppercase letters are downcased in the copy iff
+ * \li Uppercase letters are downcased in the copy iff
* DNS_NAME_DOWNCASE is set in 'options'.
*
- * The current location in source is advanced, and the used space
+ * \li The current location in source is advanced, and the used space
* in target is updated.
*
* Result:
- * ISC_R_SUCCESS
- * DNS_R_EMPTYLABEL
- * DNS_R_LABELTOOLONG
- * DNS_R_BADESCAPE
- * (DNS_R_BADBITSTRING: should not be returned)
- * (DNS_R_BITSTRINGTOOLONG: should not be returned)
- * DNS_R_BADDOTTEDQUAD
- * ISC_R_NOSPACE
- * ISC_R_UNEXPECTEDEND
+ *\li #ISC_R_SUCCESS
+ *\li #DNS_R_EMPTYLABEL
+ *\li #DNS_R_LABELTOOLONG
+ *\li #DNS_R_BADESCAPE
+ *\li (#DNS_R_BADBITSTRING: should not be returned)
+ *\li (#DNS_R_BITSTRINGTOOLONG: should not be returned)
+ *\li #DNS_R_BADDOTTEDQUAD
+ *\li #ISC_R_NOSPACE
+ *\li #ISC_R_UNEXPECTEDEND
*/
isc_result_t
dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
isc_buffer_t *target);
-/*
+/*%<
* Convert 'name' into text format, storing the result in 'target'.
*
* Notes:
- * If 'omit_final_dot' is true, then the final '.' in absolute
+ *\li If 'omit_final_dot' is true, then the final '.' in absolute
* names other than the root name will be omitted.
*
- * If dns_name_countlabels == 0, the name will be "@", representing the
- * current origin as described by RFC 1035.
+ *\li If dns_name_countlabels == 0, the name will be "@", representing the
+ * current origin as described by RFC1035.
*
- * The name is not NUL terminated.
+ *\li The name is not NUL terminated.
*
* Requires:
*
- * 'name' is a valid name
+ *\li 'name' is a valid name
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
- * if dns_name_isabsolute == FALSE, then omit_final_dot == FALSE
+ *\li if dns_name_isabsolute == FALSE, then omit_final_dot == FALSE
*
* Ensures:
*
- * If the result is success:
- *
- * The used space in target is updated.
+ *\li If the result is success:
+ * the used space in target is updated.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*/
#define DNS_NAME_MAXTEXT 1023
-/*
+/*%<
* The maximum length of the text representation of a domain
* name as generated by dns_name_totext(). This does not
* include space for a terminating NULL.
@@ -844,56 +860,53 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
isc_result_t
dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot,
isc_buffer_t *target);
-/*
+/*%<
* Convert 'name' into an alternate text format appropriate for filenames,
* storing the result in 'target'. The name data is downcased, guaranteeing
* that the filename does not depend on the case of the converted name.
*
* Notes:
- * If 'omit_final_dot' is true, then the final '.' in absolute
+ *\li If 'omit_final_dot' is true, then the final '.' in absolute
* names other than the root name will be omitted.
*
- * The name is not NUL terminated.
+ *\li The name is not NUL terminated.
*
* Requires:
*
- * 'name' is a valid absolute name
+ *\li 'name' is a valid absolute name
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
* Ensures:
*
- * If the result is success:
- *
- * The used space in target is updated.
+ *\li If the result is success:
+ * the used space in target is updated.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*/
isc_result_t
dns_name_downcase(dns_name_t *source, dns_name_t *name,
isc_buffer_t *target);
-/*
+/*%<
* Downcase 'source'.
*
* Requires:
*
- * 'source' and 'name' are valid names.
- *
- * If source == name, then
+ *\li 'source' and 'name' are valid names.
*
+ *\li If source == name, then
* 'source' must not be read-only
*
- * Otherwise,
- *
+ *\li Otherwise,
* 'target' is a valid buffer or 'target' is NULL and
* 'name' has a dedicated buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*
* Note: if source == name, then the result will always be ISC_R_SUCCESS.
*/
@@ -901,199 +914,198 @@ dns_name_downcase(dns_name_t *source, dns_name_t *name,
isc_result_t
dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix,
dns_name_t *name, isc_buffer_t *target);
-/*
+/*%<
* Concatenate 'prefix' and 'suffix'.
*
* Requires:
*
- * 'prefix' is a valid name or NULL.
+ *\li 'prefix' is a valid name or NULL.
*
- * 'suffix' is a valid name or NULL.
+ *\li 'suffix' is a valid name or NULL.
*
- * 'name' is a valid name or NULL.
+ *\li 'name' is a valid name or NULL.
*
- * 'target' is a valid buffer or 'target' is NULL and 'name' has
+ *\li 'target' is a valid buffer or 'target' is NULL and 'name' has
* a dedicated buffer.
*
- * If 'prefix' is absolute, 'suffix' must be NULL or the empty name.
+ *\li If 'prefix' is absolute, 'suffix' must be NULL or the empty name.
*
* Ensures:
*
- * On success,
+ *\li On success,
* If 'target' is not NULL and 'name' is not NULL, then 'name'
* is attached to it.
- *
* The used space in target is updated.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
- * DNS_R_NAMETOOLONG
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
+ *\li #DNS_R_NAMETOOLONG
*/
void
dns_name_split(dns_name_t *name, unsigned int suffixlabels,
dns_name_t *prefix, dns_name_t *suffix);
-/*
+/*%<
*
* Split 'name' into two pieces on a label boundary.
*
* Notes:
- * 'name' is split such that 'suffix' holds the most significant
+ * \li 'name' is split such that 'suffix' holds the most significant
* 'suffixlabels' labels. All other labels are stored in 'prefix'.
*
- * Copying name data is avoided as much as possible, so 'prefix'
+ *\li Copying name data is avoided as much as possible, so 'prefix'
* and 'suffix' will end up pointing at the data for 'name'.
*
- * It is legitimate to pass a 'prefix' or 'suffix' that has
+ *\li It is legitimate to pass a 'prefix' or 'suffix' that has
* its name data stored someplace other than the dedicated buffer.
* This is useful to avoid name copying in the calling function.
*
- * It is also legitimate to pass a 'prefix' or 'suffix' that is
+ *\li It is also legitimate to pass a 'prefix' or 'suffix' that is
* the same dns_name_t as 'name'.
*
* Requires:
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'suffixlabels' cannot exceed the number of labels in 'name'.
+ *\li 'suffixlabels' cannot exceed the number of labels in 'name'.
*
- * 'prefix' is a valid name or NULL, and cannot be read-only.
+ * \li 'prefix' is a valid name or NULL, and cannot be read-only.
*
- * 'suffix' is a valid name or NULL, and cannot be read-only.
+ *\li 'suffix' is a valid name or NULL, and cannot be read-only.
*
- * If non-NULL, 'prefix' and 'suffix' must have dedicated buffers.
+ *\li If non-NULL, 'prefix' and 'suffix' must have dedicated buffers.
*
- * 'prefix' and 'suffix' cannot point to the same buffer.
+ *\li 'prefix' and 'suffix' cannot point to the same buffer.
*
* Ensures:
*
- * On success:
+ *\li On success:
* If 'prefix' is not NULL it will contain the least significant
* labels.
- *
* If 'suffix' is not NULL it will contain the most significant
* labels. dns_name_countlabels(suffix) will be equal to
* suffixlabels.
*
- * On failure:
+ *\li On failure:
* Either 'prefix' or 'suffix' is invalidated (depending
* on which one the problem was encountered with).
*
* Returns:
- * ISC_R_SUCCESS No worries. (This function should always success).
+ *\li #ISC_R_SUCCESS No worries. (This function should always success).
*/
isc_result_t
-dns_name_dup(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target);
-/*
+dns_name_dup(const dns_name_t *source, isc_mem_t *mctx,
+ dns_name_t *target);
+/*%<
* Make 'target' a dynamically allocated copy of 'source'.
*
* Requires:
*
- * 'source' is a valid non-empty name.
+ *\li 'source' is a valid non-empty name.
*
- * 'target' is a valid name that is not read-only.
+ *\li 'target' is a valid name that is not read-only.
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*/
isc_result_t
dns_name_dupwithoffsets(dns_name_t *source, isc_mem_t *mctx,
dns_name_t *target);
-/*
+/*%<
* Make 'target' a read-only dynamically allocated copy of 'source'.
* 'target' will also have a dynamically allocated offsets table.
*
* Requires:
*
- * 'source' is a valid non-empty name.
+ *\li 'source' is a valid non-empty name.
*
- * 'target' is a valid name that is not read-only.
+ *\li 'target' is a valid name that is not read-only.
*
- * 'target' has no offsets table.
+ *\li 'target' has no offsets table.
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*/
void
dns_name_free(dns_name_t *name, isc_mem_t *mctx);
-/*
+/*%<
* Free 'name'.
*
* Requires:
*
- * 'name' is a valid name created previously in 'mctx' by dns_name_dup().
+ *\li 'name' is a valid name created previously in 'mctx' by dns_name_dup().
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*
* Ensures:
*
- * All dynamic resources used by 'name' are freed and the name is
+ *\li All dynamic resources used by 'name' are freed and the name is
* invalidated.
*/
isc_result_t
dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg);
-/*
+/*%<
* Send 'name' in DNSSEC canonical form to 'digest'.
*
* Requires:
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'digest' is a valid dns_digestfunc_t.
+ *\li 'digest' is a valid dns_digestfunc_t.
*
* Ensures:
*
- * If successful, the DNSSEC canonical form of 'name' will have been
+ *\li If successful, the DNSSEC canonical form of 'name' will have been
* sent to 'digest'.
*
- * If digest() returns something other than ISC_R_SUCCESS, that result
+ *\li If digest() returns something other than ISC_R_SUCCESS, that result
* will be returned as the result of dns_name_digest().
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*
- * Many other results are possible if not successful.
+ *\li Many other results are possible if not successful.
*
*/
isc_boolean_t
dns_name_dynamic(dns_name_t *name);
-/*
+/*%<
* Returns whether there is dynamic memory associated with this name.
*
* Requires:
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
* Returns:
*
- * 'ISC_TRUE' if the name is dynamic othewise 'ISC_FALSE'.
+ *\li 'ISC_TRUE' if the name is dynamic othewise 'ISC_FALSE'.
*/
isc_result_t
dns_name_print(dns_name_t *name, FILE *stream);
-/*
+/*%<
* Print 'name' on 'stream'.
*
* Requires:
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'stream' is a valid stream.
+ *\li 'stream' is a valid stream.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*
- * Any error that dns_name_totext() can return.
+ *\li Any error that dns_name_totext() can return.
*/
void
dns_name_format(dns_name_t *name, char *cp, unsigned int size);
-/*
+/*%<
* Format 'name' as text appropriate for use in log messages.
*
* Store the formatted name at 'cp', writing no more than
@@ -1108,47 +1120,63 @@ dns_name_format(dns_name_t *name, char *cp, unsigned int size);
*
* Requires:
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'cp' points a valid character array of size 'size'.
+ *\li 'cp' points a valid character array of size 'size'.
*
- * 'size' > 0.
+ *\li 'size' > 0.
*
*/
+isc_result_t
+dns_name_settotextfilter(dns_name_totextfilter_t proc);
+/*%<
+ * Set / clear a thread specific function 'proc' to be called at the
+ * end of dns_name_totext().
+ *
+ * Note: Under Windows you need to call "dns_name_settotextfilter(NULL);"
+ * prior to exiting the thread otherwise memory will be leaked.
+ * For other platforms, which are pthreads based, this is still a good
+ * idea but not required.
+ *
+ * Returns
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_UNEXPECTED
+ */
+
#define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1)
-/*
+/*%<
* Suggested size of buffer passed to dns_name_format().
* Includes space for the terminating NULL.
*/
isc_result_t
dns_name_copy(dns_name_t *source, dns_name_t *dest, isc_buffer_t *target);
-/*
+/*%<
* Makes 'dest' refer to a copy of the name in 'source'. The data are
* either copied to 'target' or the dedicated buffer in 'dest'.
*
* Requires:
- * 'source' is a valid name.
+ * \li 'source' is a valid name.
*
- * 'dest' is an initialized name with a dedicated buffer.
+ * \li 'dest' is an initialized name with a dedicated buffer.
*
- * 'target' is NULL or an initialized buffer.
+ * \li 'target' is NULL or an initialized buffer.
*
- * Either dest has a dedicated buffer or target != NULL.
+ * \li Either dest has a dedicated buffer or target != NULL.
*
* Ensures:
*
- * On success, the used space in target is updated.
+ *\li On success, the used space in target is updated.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*/
isc_boolean_t
dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard);
-/*
+/*%<
* Return if 'name' is a valid hostname. RFC 952 / RFC 1123.
* If 'wildcard' is ISC_TRUE then allow the first label of name to
* be a wildcard.
@@ -1161,16 +1189,37 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard);
isc_boolean_t
dns_name_ismailbox(const dns_name_t *name);
-/*
+/*%<
* Return if 'name' is a valid mailbox. RFC 821.
*
* Requires:
- * 'name' to be valid.
+ * \li 'name' to be valid.
+ */
+
+isc_boolean_t
+dns_name_internalwildcard(const dns_name_t *name);
+/*%<
+ * Return if 'name' contains a internal wildcard name.
+ *
+ * Requires:
+ * \li 'name' to be valid.
+ */
+
+void
+dns_name_destroy(void);
+/*%<
+ * Cleanup dns_name_settotextfilter() / dns_name_totext() state.
+ *
+ * This should be called as part of the final cleanup process.
+ *
+ * Note: dns_name_settotextfilter(NULL); should be called for all
+ * threads which have called dns_name_settotextfilter() with a
+ * non-NULL argument prior to calling dns_name_destroy();
*/
ISC_LANG_ENDDECLS
-/***
+/*
*** High Peformance Macros
***/
diff --git a/contrib/bind9/lib/dns/include/dns/ncache.h b/contrib/bind9/lib/dns/include/dns/ncache.h
index 6bf6003..459effb 100644
--- a/contrib/bind9/lib/dns/include/dns/ncache.h
+++ b/contrib/bind9/lib/dns/include/dns/ncache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ncache.h,v 1.12.12.5 2004/03/08 09:04:37 marka Exp $ */
+/* $Id: ncache.h,v 1.17.18.2 2005/04/29 00:16:16 marka Exp $ */
#ifndef DNS_NCACHE_H
#define DNS_NCACHE_H 1
@@ -24,25 +24,26 @@
***** Module Info
*****/
-/*
+/*! \file
+ *\brief
* DNS Ncache
*
- * XXX <TBS> XXX
+ * XXX TBS XXX
*
* MP:
- * The caller must ensure any required synchronization.
+ *\li The caller must ensure any required synchronization.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * RFC 2308
+ *\li RFC2308
*/
#include <isc/lang.h>
@@ -52,7 +53,7 @@
ISC_LANG_BEGINDECLS
-/*
+/*%
* _OMITDNSSEC:
* Omit DNSSEC records when rendering.
*/
@@ -62,7 +63,7 @@ isc_result_t
dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
dns_rdatatype_t covers, isc_stdtime_t now, dns_ttl_t maxttl,
dns_rdataset_t *addedrdataset);
-/*
+/*%<
* Convert the authority data from 'message' into a negative cache
* rdataset, and store it in 'cache' at 'node' with a TTL limited to
* 'maxttl'.
@@ -71,21 +72,21 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
* or dns_rdatatype_any when caching a NXDOMAIN response.
*
* Note:
- * If 'addedrdataset' is not NULL, then it will be attached to the added
+ *\li If 'addedrdataset' is not NULL, then it will be attached to the added
* rdataset. See dns_db_addrdataset() for more details.
*
* Requires:
- * 'message' is a valid message with a properly formatting negative cache
+ *\li 'message' is a valid message with a properly formatting negative cache
* authority section.
*
- * The requirements of dns_db_addrdataset() apply to 'cache', 'node',
+ *\li The requirements of dns_db_addrdataset() apply to 'cache', 'node',
* 'now', and 'addedrdataset'.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOSPACE
*
- * Any result code of dns_db_addrdataset() is a possible result code
+ *\li Any result code of dns_db_addrdataset() is a possible result code
* of dns_ncache_add().
*/
@@ -93,63 +94,63 @@ isc_result_t
dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
isc_buffer_t *target, unsigned int options,
unsigned int *countp);
-/*
+/*%<
* Convert the negative caching rdataset 'rdataset' to wire format,
* compressing names as specified in 'cctx', and storing the result in
* 'target'. If 'omit_dnssec' is set, DNSSEC records will not
* be added to 'target'.
*
* Notes:
- * The number of RRs added to target will be added to *countp.
+ *\li The number of RRs added to target will be added to *countp.
*
* Requires:
- * 'rdataset' is a valid negative caching rdataset.
+ *\li 'rdataset' is a valid negative caching rdataset.
*
- * 'rdataset' is not empty.
+ *\li 'rdataset' is not empty.
*
- * 'countp' is a valid pointer.
+ *\li 'countp' is a valid pointer.
*
* Ensures:
- * On a return of ISC_R_SUCCESS, 'target' contains a wire format
+ *\li On a return of ISC_R_SUCCESS, 'target' contains a wire format
* for the data contained in 'rdataset'. Any error return leaves
* the buffer unchanged.
*
- * *countp has been incremented by the number of RRs added to
+ *\li *countp has been incremented by the number of RRs added to
* target.
*
* Returns:
- * ISC_R_SUCCESS - all ok
- * ISC_R_NOSPACE - 'target' doesn't have enough room
+ *\li #ISC_R_SUCCESS - all ok
+ *\li #ISC_R_NOSPACE - 'target' doesn't have enough room
*
- * Any error returned by dns_rdata_towire(), dns_rdataset_next(),
+ *\li Any error returned by dns_rdata_towire(), dns_rdataset_next(),
* dns_name_towire().
*/
isc_result_t
dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
dns_rdatatype_t type, dns_rdataset_t *rdataset);
-/*
+/*%<
* Search the negative caching rdataset for an rdataset with the
* specified name and type.
*
* Requires:
- * 'ncacherdataset' is a valid negative caching rdataset.
+ *\li 'ncacherdataset' is a valid negative caching rdataset.
*
- * 'ncacherdataset' is not empty.
+ *\li 'ncacherdataset' is not empty.
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'type' is not SIG, or a meta-RR type.
+ *\li 'type' is not SIG, or a meta-RR type.
*
- * 'rdataset' is a valid disassociated rdataset.
+ *\li 'rdataset' is a valid disassociated rdataset.
*
* Ensures:
- * On a return of ISC_R_SUCCESS, 'rdataset' is bound to the found
+ *\li On a return of ISC_R_SUCCESS, 'rdataset' is bound to the found
* rdataset.
*
* Returns:
- * ISC_R_SUCCESS - the rdataset was found.
- * ISC_R_NOTFOUND - the rdataset was not found.
+ *\li #ISC_R_SUCCESS - the rdataset was found.
+ *\li #ISC_R_NOTFOUND - the rdataset was not found.
*
*/
diff --git a/contrib/bind9/lib/dns/include/dns/nsec.h b/contrib/bind9/lib/dns/include/dns/nsec.h
index 68a5833..46b75fa 100644
--- a/contrib/bind9/lib/dns/include/dns/nsec.h
+++ b/contrib/bind9/lib/dns/include/dns/nsec.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec.h,v 1.4.2.1 2004/03/08 02:08:00 marka Exp $ */
+/* $Id: nsec.h,v 1.4.20.2 2005/04/29 00:16:16 marka Exp $ */
#ifndef DNS_NSEC_H
#define DNS_NSEC_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -33,33 +35,33 @@ isc_result_t
dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version,
dns_dbnode_t *node, dns_name_t *target,
unsigned char *buffer, dns_rdata_t *rdata);
-/*
+/*%<
* Build the rdata of a NSEC record.
*
* Requires:
- * buffer Points to a temporary buffer of at least
+ *\li buffer Points to a temporary buffer of at least
* DNS_NSEC_BUFFERSIZE bytes.
- * rdata Points to an initialized dns_rdata_t.
+ *\li rdata Points to an initialized dns_rdata_t.
*
* Ensures:
- * *rdata Contains a valid NSEC rdata. The 'data' member refers
+ * \li *rdata Contains a valid NSEC rdata. The 'data' member refers
* to 'buffer'.
*/
isc_result_t
dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
dns_name_t *target, dns_ttl_t ttl);
-/*
+/*%<
* Build a NSEC record and add it to a database.
*/
isc_boolean_t
dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type);
-/*
+/*%<
* Determine if a type is marked as present in an NSEC record.
*
* Requires:
- * 'nsec' points to a valid rdataset of type NSEC
+ *\li 'nsec' points to a valid rdataset of type NSEC
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/opcode.h b/contrib/bind9/lib/dns/include/dns/opcode.h
index 4d656b8..4796dba 100644
--- a/contrib/bind9/lib/dns/include/dns/opcode.h
+++ b/contrib/bind9/lib/dns/include/dns/opcode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: opcode.h,v 1.1.200.3 2004/03/08 09:04:37 marka Exp $ */
+/* $Id: opcode.h,v 1.2.18.2 2005/04/29 00:16:16 marka Exp $ */
#ifndef DNS_OPCODE_H
#define DNS_OPCODE_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -27,21 +29,21 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_opcode_totext(dns_opcode_t opcode, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of error 'opcode' into 'target'.
*
* Requires:
- * 'opcode' is a valid opcode.
+ *\li 'opcode' is a valid opcode.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
* Ensures:
- * If the result is success:
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/order.h b/contrib/bind9/lib/dns/include/dns/order.h
index e28e3ca..6458db0 100644
--- a/contrib/bind9/lib/dns/include/dns/order.h
+++ b/contrib/bind9/lib/dns/include/dns/order.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: order.h,v 1.2.202.3 2004/03/08 09:04:37 marka Exp $ */
+/* $Id: order.h,v 1.3.18.2 2005/04/29 00:16:17 marka Exp $ */
#ifndef DNS_ORDER_H
#define DNS_ORDER_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/types.h>
@@ -29,67 +31,67 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
-/*
+/*%<
* Create a order object.
*
* Requires:
- * 'orderp' to be non NULL and '*orderp == NULL'.
- * 'mctx' to be valid.
+ * \li 'orderp' to be non NULL and '*orderp == NULL'.
+ *\li 'mctx' to be valid.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMEMORY
*/
isc_result_t
dns_order_add(dns_order_t *order, dns_name_t *name,
dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
unsigned int mode);
-/*
+/*%<
* Add a entry to the end of the order list.
*
* Requires:
- * 'order' to be valid.
- * 'name' to be valid.
- * 'mode' to be one of DNS_RDATASERATTR_RANDOMIZE,
- * DNS_RDATASERATTR_RANDOMIZE or zero (DNS_RDATASERATTR_CYCLIC).
+ * \li 'order' to be valid.
+ *\li 'name' to be valid.
+ *\li 'mode' to be one of #DNS_RDATASERATTR_RANDOMIZE,
+ * #DNS_RDATASERATTR_RANDOMIZE or zero (#DNS_RDATASERATTR_CYCLIC).
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
unsigned int
dns_order_find(dns_order_t *order, dns_name_t *name,
dns_rdatatype_t rdtype, dns_rdataclass_t rdclass);
-/*
+/*%<
* Find the first matching entry on the list.
*
* Requires:
- * 'order' to be valid.
- * 'name' to be valid.
+ *\li 'order' to be valid.
+ *\li 'name' to be valid.
*
* Returns the mode set by dns_order_add() or zero.
*/
void
dns_order_attach(dns_order_t *source, dns_order_t **target);
-/*
+/*%<
* Attach to the 'source' object.
*
* Requires:
- * 'source' to be valid.
- * 'target' to be non NULL and '*target == NULL'.
+ * \li 'source' to be valid.
+ *\li 'target' to be non NULL and '*target == NULL'.
*/
void
dns_order_detach(dns_order_t **orderp);
-/*
+/*%<
* Detach from the object. Clean up if last this was the last
* reference.
*
* Requires:
- * '*orderp' to be valid.
+ *\li '*orderp' to be valid.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/peer.h b/contrib/bind9/lib/dns/include/dns/peer.h
index 9032964..be5a8c3 100644
--- a/contrib/bind9/lib/dns/include/dns/peer.h
+++ b/contrib/bind9/lib/dns/include/dns/peer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: peer.h,v 1.16.2.1.10.5 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: peer.h,v 1.20.18.8 2006/02/28 03:10:48 marka Exp $ */
#ifndef DNS_PEER_H
#define DNS_PEER_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Data structures for peers (e.g. a 'server' config file statement)
*/
@@ -64,6 +65,7 @@ struct dns_peer {
isc_mem_t *mem;
isc_netaddr_t address;
+ unsigned int prefixlen;
isc_boolean_t bogus;
dns_transfer_format_t transfer_format;
isc_uint32_t transfers;
@@ -73,6 +75,10 @@ struct dns_peer {
isc_boolean_t support_edns;
dns_name_t *key;
isc_sockaddr_t *transfer_source;
+ isc_sockaddr_t *notify_source;
+ isc_sockaddr_t *query_source;
+ isc_uint16_t udpsize; /* recieve size */
+ isc_uint16_t maxudp; /* transmit size */
isc_uint32_t bitflags;
@@ -115,6 +121,10 @@ dns_peerlist_currpeer(dns_peerlist_t *peers, dns_peer_t **retval);
isc_result_t
dns_peer_new(isc_mem_t *mem, isc_netaddr_t *ipaddr, dns_peer_t **peer);
+isc_result_t
+dns_peer_newprefix(isc_mem_t *mem, isc_netaddr_t *ipaddr,
+ unsigned int prefixlen, dns_peer_t **peer);
+
void
dns_peer_attach(dns_peer_t *source, dns_peer_t **target);
@@ -173,6 +183,30 @@ dns_peer_settransfersource(dns_peer_t *peer,
isc_result_t
dns_peer_gettransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source);
+isc_result_t
+dns_peer_setudpsize(dns_peer_t *peer, isc_uint16_t udpsize);
+
+isc_result_t
+dns_peer_getudpsize(dns_peer_t *peer, isc_uint16_t *udpsize);
+
+isc_result_t
+dns_peer_setmaxudp(dns_peer_t *peer, isc_uint16_t maxudp);
+
+isc_result_t
+dns_peer_getmaxudp(dns_peer_t *peer, isc_uint16_t *maxudp);
+
+isc_result_t
+dns_peer_setnotifysource(dns_peer_t *peer, const isc_sockaddr_t *notify_source);
+
+isc_result_t
+dns_peer_getnotifysource(dns_peer_t *peer, isc_sockaddr_t *notify_source);
+
+isc_result_t
+dns_peer_setquerysource(dns_peer_t *peer, const isc_sockaddr_t *query_source);
+
+isc_result_t
+dns_peer_getquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source);
+
ISC_LANG_ENDDECLS
#endif /* DNS_PEER_H */
diff --git a/contrib/bind9/lib/dns/include/dns/portlist.h b/contrib/bind9/lib/dns/include/dns/portlist.h
index ea672a9..2d400d4 100644
--- a/contrib/bind9/lib/dns/include/dns/portlist.h
+++ b/contrib/bind9/lib/dns/include/dns/portlist.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: portlist.h,v 1.2.84.2 2004/03/06 08:13:58 marka Exp $ */
+/* $Id: portlist.h,v 1.3.18.2 2005/04/29 00:16:17 marka Exp $ */
+
+/*! \file */
#include <isc/lang.h>
#include <isc/net.h>
@@ -27,73 +29,73 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_portlist_create(isc_mem_t *mctx, dns_portlist_t **portlistp);
-/*
+/*%<
* Create a port list.
*
* Requires:
- * 'mctx' to be valid.
- * 'portlistp' to be non NULL and '*portlistp' to be NULL;
+ *\li 'mctx' to be valid.
+ *\li 'portlistp' to be non NULL and '*portlistp' to be NULL;
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_UNEXPECTED
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_UNEXPECTED
*/
isc_result_t
dns_portlist_add(dns_portlist_t *portlist, int af, in_port_t port);
-/*
+/*%<
* Add the given <port,af> tuple to the portlist.
*
* Requires:
- * 'portlist' to be valid.
- * 'af' to be AF_INET or AF_INET6
+ *\li 'portlist' to be valid.
+ *\li 'af' to be AF_INET or AF_INET6
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
void
dns_portlist_remove(dns_portlist_t *portlist, int af, in_port_t port);
-/*
+/*%<
* Remove the given <port,af> tuple to the portlist.
*
* Requires:
- * 'portlist' to be valid.
- * 'af' to be AF_INET or AF_INET6
+ *\li 'portlist' to be valid.
+ *\li 'af' to be AF_INET or AF_INET6
*/
isc_boolean_t
dns_portlist_match(dns_portlist_t *portlist, int af, in_port_t port);
-/*
+/*%<
* Find the given <port,af> tuple to the portlist.
*
* Requires:
- * 'portlist' to be valid.
- * 'af' to be AF_INET or AF_INET6
+ *\li 'portlist' to be valid.
+ *\li 'af' to be AF_INET or AF_INET6
*
* Returns
- * ISC_TRUE if the tuple is found, ISC_FALSE otherwise.
+ * \li #ISC_TRUE if the tuple is found, ISC_FALSE otherwise.
*/
void
dns_portlist_attach(dns_portlist_t *portlist, dns_portlist_t **portlistp);
-/*
+/*%<
* Attach to a port list.
*
* Requires:
- * 'portlist' to be valid.
- * 'portlistp' to be non NULL and '*portlistp' to be NULL;
+ *\li 'portlist' to be valid.
+ *\li 'portlistp' to be non NULL and '*portlistp' to be NULL;
*/
void
dns_portlist_detach(dns_portlist_t **portlistp);
-/*
+/*%<
* Detach from a port list.
*
* Requires:
- * '*portlistp' to be valid.
+ *\li '*portlistp' to be valid.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rbt.h b/contrib/bind9/lib/dns/include/dns/rbt.h
index 6f99a7d..a1edf0c 100644
--- a/contrib/bind9/lib/dns/include/dns/rbt.h
+++ b/contrib/bind9/lib/dns/include/dns/rbt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,13 +15,16 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rbt.h,v 1.55.12.6 2004/10/11 05:55:51 marka Exp $ */
+/* $Id: rbt.h,v 1.59.18.5 2005/10/13 01:26:07 marka Exp $ */
#ifndef DNS_RBT_H
#define DNS_RBT_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/magic.h>
+#include <isc/refcount.h>
#include <dns/types.h>
@@ -29,7 +32,8 @@ ISC_LANG_BEGINDECLS
#define DNS_RBT_USEHASH 1
-/*
+/*@{*/
+/*%
* Option values for dns_rbt_findnode() and dns_rbt_findname().
* These are used to form a bitmask.
*/
@@ -37,6 +41,13 @@ ISC_LANG_BEGINDECLS
#define DNS_RBTFIND_EMPTYDATA 0x01
#define DNS_RBTFIND_NOEXACT 0x02
#define DNS_RBTFIND_NOPREDECESSOR 0x04
+/*@}*/
+
+#ifndef DNS_RBT_USEISCREFCOUNT
+#ifdef ISC_REFCOUNT_HAVEATOMIC
+#define DNS_RBT_USEISCREFCOUNT 1
+#endif
+#endif
/*
* These should add up to 30.
@@ -51,7 +62,7 @@ ISC_LANG_BEGINDECLS
#define DNS_RBTNODE_VALID(n) ISC_TRUE
#endif
-/*
+/*%
* This is the structure that is used for each node in the red/black
* tree of trees. NOTE WELL: the implementation manages this as a variable
* length structure, with the actual wire-format name and other data
@@ -69,7 +80,8 @@ typedef struct dns_rbtnode {
#ifdef DNS_RBT_USEHASH
struct dns_rbtnode *hashnext;
#endif
- /*
+ /*@{*/
+ /*!
* The following bitfields add up to a total bitwidth of 32.
* The range of values necessary for each item is indicated,
* but in the case of "attributes" the field is wider to accomodate
@@ -81,19 +93,21 @@ typedef struct dns_rbtnode {
* In each case below the "range" indicated is what's _necessary_ for
* the bitfield to hold, not what it actually _can_ hold.
*/
- unsigned int is_root : 1; /* range is 0..1 */
- unsigned int color : 1; /* range is 0..1 */
- unsigned int find_callback : 1; /* range is 0..1 */
- unsigned int attributes : 4; /* range is 0..2 */
- unsigned int namelen : 8; /* range is 1..255 */
- unsigned int offsetlen : 8; /* range is 1..128 */
- unsigned int padbytes : 9; /* range is 0..380 */
+ unsigned int is_root : 1; /*%< range is 0..1 */
+ unsigned int color : 1; /*%< range is 0..1 */
+ unsigned int find_callback : 1; /*%< range is 0..1 */
+ unsigned int attributes : 4; /*%< range is 0..2 */
+ unsigned int namelen : 8; /*%< range is 1..255 */
+ unsigned int offsetlen : 8; /*%< range is 1..128 */
+ unsigned int padbytes : 9; /*%< range is 0..380 */
+ /*@}*/
#ifdef DNS_RBT_USEHASH
unsigned int hashval;
#endif
- /*
+ /*@{*/
+ /*!
* These values are used in the RBT DB implementation. The appropriate
* node lock must be held before accessing them.
*/
@@ -101,7 +115,12 @@ typedef struct dns_rbtnode {
unsigned int dirty:1;
unsigned int wild:1;
unsigned int locknum:DNS_RBT_LOCKLENGTH;
+#ifndef DNS_RBT_USEISCREFCOUNT
unsigned int references:DNS_RBT_REFLENGTH;
+#else
+ isc_refcount_t references; /* note that this is not in the bitfield */
+#endif
+ /*@}*/
} dns_rbtnode_t;
typedef isc_result_t (*dns_rbtfindcallback_t)(dns_rbtnode_t *node,
@@ -112,7 +131,7 @@ typedef isc_result_t (*dns_rbtfindcallback_t)(dns_rbtnode_t *node,
***** Chain Info
*****/
-/*
+/*!
* A chain is used to keep track of the sequence of nodes to reach any given
* node from the root of the tree. Originally nodes did not have parent
* pointers in them (for memory usage reasons) so there was no way to find
@@ -151,7 +170,7 @@ typedef isc_result_t (*dns_rbtfindcallback_t)(dns_rbtnode_t *node,
* functions but additionally can provide the node to which the chain points.
*/
-/*
+/*%
* The number of level blocks to allocate at a time. Currently the maximum
* number of levels is allocated directly in the structure, but future
* revisions of this code might have a static initial block with dynamic
@@ -165,14 +184,14 @@ typedef isc_result_t (*dns_rbtfindcallback_t)(dns_rbtnode_t *node,
typedef struct dns_rbtnodechain {
unsigned int magic;
isc_mem_t * mctx;
- /*
+ /*%
* The terminal node of the chain. It is not in levels[].
* This is ostensibly private ... but in a pinch it could be
* used tell that the chain points nowhere without needing to
* call dns_rbtnodechain_current().
*/
dns_rbtnode_t * end;
- /*
+ /*%
* The maximum number of labels in a name is 128; bitstrings mean
* a conceptually very large number (which I have not bothered to
* compute) of logical levels because splitting can potentially occur
@@ -181,7 +200,7 @@ typedef struct dns_rbtnodechain {
* in the worst case.
*/
dns_rbtnode_t * levels[DNS_RBT_LEVELBLOCK];
- /*
+ /*%
* level_count indicates how deep the chain points into the
* tree of trees, and is the index into the levels[] array.
* Thus, levels[level_count - 1] is the last level node stored.
@@ -190,7 +209,7 @@ typedef struct dns_rbtnodechain {
* so on.
*/
unsigned int level_count;
- /*
+ /*%
* level_matches tells how many levels matched above the node
* returned by dns_rbt_findnode(). A match (partial or exact) found
* in the first level thus results in level_matches being set to 1.
@@ -203,44 +222,43 @@ typedef struct dns_rbtnodechain {
/*****
***** Public interfaces.
*****/
-
isc_result_t
dns_rbt_create(isc_mem_t *mctx, void (*deleter)(void *, void *),
void *deleter_arg, dns_rbt_t **rbtp);
-/*
+/*%<
* Initialize a red-black tree of trees.
*
* Notes:
- * The deleter argument, if non-null, points to a function that is
+ *\li The deleter argument, if non-null, points to a function that is
* responsible for cleaning up any memory associated with the data
* pointer of a node when the node is deleted. It is passed the
* deleted node's data pointer as its first argument and deleter_arg
* as its second argument.
*
* Requires:
- * mctx is a pointer to a valid memory context.
- * rbtp != NULL && *rbtp == NULL
- * arg == NULL iff deleter == NULL
+ * \li mctx is a pointer to a valid memory context.
+ *\li rbtp != NULL && *rbtp == NULL
+ *\li arg == NULL iff deleter == NULL
*
* Ensures:
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
* *rbtp points to a valid red-black tree manager
*
- * If result is failure:
+ *\li If result is failure:
* *rbtp does not point to a valid red-black tree manager.
*
* Returns:
- * ISC_R_SUCCESS Success
- * ISC_R_NOMEMORY Resource limit: Out of Memory
+ *\li #ISC_R_SUCCESS Success
+ *\li #ISC_R_NOMEMORY Resource limit: Out of Memory
*/
isc_result_t
dns_rbt_addname(dns_rbt_t *rbt, dns_name_t *name, void *data);
-/*
+/*%<
* Add 'name' to the tree of trees, associated with 'data'.
*
* Notes:
- * 'data' is never required to be non-NULL, but specifying it
+ *\li 'data' is never required to be non-NULL, but specifying it
* when the name is added is faster than searching for 'name'
* again and then setting the data pointer. The lack of a data pointer
* for a node also has other ramifications regarding whether
@@ -248,106 +266,103 @@ dns_rbt_addname(dns_rbt_t *rbt, dns_name_t *name, void *data);
* joins nodes.
*
* Requires:
- * rbt is a valid rbt manager.
- * dns_name_isabsolute(name) == TRUE
+ *\li rbt is a valid rbt manager.
+ *\li dns_name_isabsolute(name) == TRUE
*
* Ensures:
- * 'name' is not altered in any way.
+ *\li 'name' is not altered in any way.
*
- * Any external references to nodes in the tree are unaffected by
+ *\li Any external references to nodes in the tree are unaffected by
* node splits that are necessary to insert the new name.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is #ISC_R_SUCCESS:
* 'name' is findable in the red/black tree of trees in O(log N).
- *
* The data pointer of the node for 'name' is set to 'data'.
*
- * If result is ISC_R_EXISTS or ISC_R_NOSPACE:
+ *\li If result is #ISC_R_EXISTS or #ISC_R_NOSPACE:
* The tree of trees is unaltered.
*
- * If result is ISC_R_NOMEMORY:
+ *\li If result is #ISC_R_NOMEMORY:
* No guarantees.
*
* Returns:
- * ISC_R_SUCCESS Success
- * ISC_R_EXISTS The name already exists with associated data.
- * ISC_R_NOSPACE The name had more logical labels than are allowed.
- * ISC_R_NOMEMORY Resource Limit: Out of Memory
+ *\li #ISC_R_SUCCESS Success
+ *\li #ISC_R_EXISTS The name already exists with associated data.
+ *\li #ISC_R_NOSPACE The name had more logical labels than are allowed.
+ *\li #ISC_R_NOMEMORY Resource Limit: Out of Memory
*/
isc_result_t
dns_rbt_addnode(dns_rbt_t *rbt, dns_name_t *name, dns_rbtnode_t **nodep);
-/*
+/*%<
* Just like dns_rbt_addname, but returns the address of the node.
*
* Requires:
- * rbt is a valid rbt structure.
- * dns_name_isabsolute(name) == TRUE
- * nodep != NULL && *nodep == NULL
+ *\li rbt is a valid rbt structure.
+ *\li dns_name_isabsolute(name) == TRUE
+ *\li nodep != NULL && *nodep == NULL
*
* Ensures:
- * 'name' is not altered in any way.
+ *\li 'name' is not altered in any way.
*
- * Any external references to nodes in the tree are unaffected by
+ *\li Any external references to nodes in the tree are unaffected by
* node splits that are necessary to insert the new name.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
* 'name' is findable in the red/black tree of trees in O(log N).
- *
* *nodep is the node that was added for 'name'.
*
- * If result is ISC_R_EXISTS:
+ *\li If result is ISC_R_EXISTS:
* The tree of trees is unaltered.
- *
* *nodep is the existing node for 'name'.
*
- * If result is ISC_R_NOMEMORY:
+ *\li If result is ISC_R_NOMEMORY:
* No guarantees.
*
* Returns:
- * ISC_R_SUCCESS Success
- * ISC_R_EXISTS The name already exists, possibly without data.
- * ISC_R_NOMEMORY Resource Limit: Out of Memory
+ *\li #ISC_R_SUCCESS Success
+ *\li #ISC_R_EXISTS The name already exists, possibly without data.
+ *\li #ISC_R_NOMEMORY Resource Limit: Out of Memory
*/
isc_result_t
dns_rbt_findname(dns_rbt_t *rbt, dns_name_t *name, unsigned int options,
dns_name_t *foundname, void **data);
-/*
+/*%<
* Get the data pointer associated with 'name'.
*
* Notes:
- * When DNS_RBTFIND_NOEXACT is set, the closest matching superdomain is
- * returned (also subject to DNS_RBTFIND_EMPTYDATA), even when there is
+ *\li When #DNS_RBTFIND_NOEXACT is set, the closest matching superdomain is
+ * returned (also subject to #DNS_RBTFIND_EMPTYDATA), even when there is
* an exact match in the tree.
*
- * A node that has no data is considered not to exist for this function,
- * unless the DNS_RBTFIND_EMPTYDATA option is set.
+ *\li A node that has no data is considered not to exist for this function,
+ * unless the #DNS_RBTFIND_EMPTYDATA option is set.
*
* Requires:
- * rbt is a valid rbt manager.
- * dns_name_isabsolute(name) == TRUE
- * data != NULL && *data == NULL
+ *\li rbt is a valid rbt manager.
+ *\li dns_name_isabsolute(name) == TRUE
+ *\li data != NULL && *data == NULL
*
* Ensures:
- * 'name' and the tree are not altered in any way.
+ *\li 'name' and the tree are not altered in any way.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
* *data is the data associated with 'name'.
*
- * If result is DNS_R_PARTIALMATCH:
+ *\li If result is DNS_R_PARTIALMATCH:
* *data is the data associated with the deepest superdomain
* of 'name' which has data.
*
- * If result is ISC_R_NOTFOUND:
+ *\li If result is ISC_R_NOTFOUND:
* Neither the name nor a superdomain was found with data.
*
* Returns:
- * ISC_R_SUCCESS Success
- * DNS_R_PARTIALMATCH Superdomain found with data
- * ISC_R_NOTFOUND No match
- * ISC_R_NOSPACE Concatenating nodes to form foundname failed
+ *\li #ISC_R_SUCCESS Success
+ *\li #DNS_R_PARTIALMATCH Superdomain found with data
+ *\li #ISC_R_NOTFOUND No match
+ *\li #ISC_R_NOSPACE Concatenating nodes to form foundname failed
*/
isc_result_t
@@ -355,20 +370,20 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
dns_rbtnode_t **node, dns_rbtnodechain_t *chain,
unsigned int options, dns_rbtfindcallback_t callback,
void *callback_arg);
-/*
+/*%<
* Find the node for 'name'.
*
* Notes:
- * A node that has no data is considered not to exist for this function,
+ *\li A node that has no data is considered not to exist for this function,
* unless the DNS_RBTFIND_EMPTYDATA option is set. This applies to both
* exact matches and partial matches.
*
- * If the chain parameter is non-NULL, then the path through the tree
+ *\li If the chain parameter is non-NULL, then the path through the tree
* to the DNSSEC predecessor of the searched for name is maintained,
* unless the DNS_RBTFIND_NOPREDECESSOR or DNS_RBTFIND_NOEXACT option
* is used. (For more details on those options, see below.)
*
- * If there is no predecessor, then the chain will point to nowhere, as
+ *\li If there is no predecessor, then the chain will point to nowhere, as
* indicated by chain->end being NULL or dns_rbtnodechain_current
* returning ISC_R_NOTFOUND. Note that in a normal Internet DNS RBT
* there will always be a predecessor for all names except the root
@@ -376,23 +391,23 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
* everything. But you can certainly construct a trivial tree and a
* search for it that has no predecessor.
*
- * Within the chain structure, the 'levels' member of the structure holds
+ *\li Within the chain structure, the 'levels' member of the structure holds
* the root node of each level except the first.
*
- * The 'level_count' of the chain indicates how deep the chain to the
+ *\li The 'level_count' of the chain indicates how deep the chain to the
* predecessor name is, as an index into the 'levels[]' array. It does
* not count name elements, per se, but only levels of the tree of trees,
* the distinction arrising because multiple labels from a name can be
* stored on only one level. It is also does not include the level
* that has the node, since that level is not stored in levels[].
*
- * The chain's 'level_matches' is not directly related to the predecessor.
+ *\li The chain's 'level_matches' is not directly related to the predecessor.
* It is the number of levels above the level of the found 'node',
* regardless of whether it was a partial match or exact match. When
* the node is found in the top level tree, or no node is found at all,
* level_matches is 0.
*
- * When DNS_RBTFIND_NOEXACT is set, the closest matching superdomain is
+ *\li When DNS_RBTFIND_NOEXACT is set, the closest matching superdomain is
* returned (also subject to DNS_RBTFIND_EMPTYDATA), even when
* there is an exact match in the tree. In this case, the chain
* will not point to the DNSSEC predecessor, but will instead point
@@ -407,26 +422,29 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
* where you want the chain pointed, so this can be made more firm.
*
* Requires:
- * rbt is a valid rbt manager.
- * dns_name_isabsolute(name) == TRUE.
- * node != NULL && *node == NULL.
- * DNS_RBTFIND_NOEXACT and DNS_RBTFIND_NOPREDECESSOR are mutally
+ *\li rbt is a valid rbt manager.
+ *\li dns_name_isabsolute(name) == TRUE.
+ *\li node != NULL && *node == NULL.
+ *\li #DNS_RBTFIND_NOEXACT and DNS_RBTFIND_NOPREDECESSOR are mutally
* exclusive.
*
* Ensures:
- * 'name' and the tree are not altered in any way.
+ *\li 'name' and the tree are not altered in any way.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
+ *\verbatim
* *node is the terminal node for 'name'.
- *
+
* 'foundname' and 'name' represent the same name (though not
* the same memory).
- *
+
* 'chain' points to the DNSSEC predecessor, if any, of 'name'.
*
* chain->level_matches and chain->level_count are equal.
+ *\endverbatim
*
* If result is DNS_R_PARTIALMATCH:
+ *\verbatim
* *node is the data associated with the deepest superdomain
* of 'name' which has data.
*
@@ -434,59 +452,62 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
* data, unless the DNS_RBTFIND_EMPTYDATA option is set).
*
* 'chain' points to the DNSSEC predecessor, if any, of 'name'.
+ *\endverbatim
*
- * If result is ISC_R_NOTFOUND:
+ *\li If result is ISC_R_NOTFOUND:
+ *\verbatim
* Neither the name nor a superdomain was found. *node is NULL.
*
* 'chain' points to the DNSSEC predecessor, if any, of 'name'.
*
* chain->level_matches is 0.
+ *\endverbatim
*
* Returns:
- * ISC_R_SUCCESS Success
- * DNS_R_PARTIALMATCH Superdomain found with data
- * ISC_R_NOTFOUND No match, or superdomain with no data
- * ISC_R_NOSPACE Concatenating nodes to form foundname failed
+ *\li #ISC_R_SUCCESS Success
+ *\li #DNS_R_PARTIALMATCH Superdomain found with data
+ *\li #ISC_R_NOTFOUND No match, or superdomain with no data
+ *\li #ISC_R_NOSPACE Concatenating nodes to form foundname failed
*/
isc_result_t
dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse);
-/*
+/*%<
* Delete 'name' from the tree of trees.
*
* Notes:
- * When 'name' is removed, if recurse is ISC_TRUE then all of its
+ *\li When 'name' is removed, if recurse is ISC_TRUE then all of its
* subnames are removed too.
*
* Requires:
- * rbt is a valid rbt manager.
- * dns_name_isabsolute(name) == TRUE
+ *\li rbt is a valid rbt manager.
+ *\li dns_name_isabsolute(name) == TRUE
*
* Ensures:
- * 'name' is not altered in any way.
+ *\li 'name' is not altered in any way.
*
- * Does NOT ensure that any external references to nodes in the tree
+ *\li Does NOT ensure that any external references to nodes in the tree
* are unaffected by node joins.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
* 'name' does not appear in the tree with data; however,
* the node for the name might still exist which can be
* found with dns_rbt_findnode (but not dns_rbt_findname).
*
- * If result is ISC_R_NOTFOUND:
+ *\li If result is ISC_R_NOTFOUND:
* 'name' does not appear in the tree with data, because
* it did not appear in the tree before the function was called.
*
- * If result is something else:
+ *\li If result is something else:
* See result codes for dns_rbt_findnode (if it fails, the
* node is not deleted) or dns_rbt_deletenode (if it fails,
* the node is deleted, but the tree is not optimized when
* it could have been).
*
* Returns:
- * ISC_R_SUCCESS Success
- * ISC_R_NOTFOUND No match
- * something_else Any return code from dns_rbt_findnode except
+ *\li #ISC_R_SUCCESS Success
+ *\li #ISC_R_NOTFOUND No match
+ *\li something_else Any return code from dns_rbt_findnode except
* DNS_R_PARTIALMATCH (which causes ISC_R_NOTFOUND
* to be returned instead), and any code from
* dns_rbt_deletenode.
@@ -494,115 +515,115 @@ dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse);
isc_result_t
dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, isc_boolean_t recurse);
-/*
+/*%<
* Delete 'node' from the tree of trees.
*
* Notes:
- * When 'node' is removed, if recurse is ISC_TRUE then all nodes
+ *\li When 'node' is removed, if recurse is ISC_TRUE then all nodes
* in levels down from it are removed too.
*
* Requires:
- * rbt is a valid rbt manager.
- * node != NULL.
+ *\li rbt is a valid rbt manager.
+ *\li node != NULL.
*
* Ensures:
- * Does NOT ensure that any external references to nodes in the tree
+ *\li Does NOT ensure that any external references to nodes in the tree
* are unaffected by node joins.
*
- * If result is ISC_R_SUCCESS:
+ *\li If result is ISC_R_SUCCESS:
* 'node' does not appear in the tree with data; however,
* the node might still exist if it serves as a pointer to
* a lower tree level as long as 'recurse' was false, hence
* the node could can be found with dns_rbt_findnode whem
* that function's empty_data_ok parameter is true.
*
- * If result is ISC_R_NOMEMORY or ISC_R_NOSPACE:
+ *\li If result is ISC_R_NOMEMORY or ISC_R_NOSPACE:
* The node was deleted, but the tree structure was not
* optimized.
*
* Returns:
- * ISC_R_SUCCESS Success
- * ISC_R_NOMEMORY Resource Limit: Out of Memory when joining nodes.
- * ISC_R_NOSPACE dns_name_concatenate failed when joining nodes.
+ *\li #ISC_R_SUCCESS Success
+ *\li #ISC_R_NOMEMORY Resource Limit: Out of Memory when joining nodes.
+ *\li #ISC_R_NOSPACE dns_name_concatenate failed when joining nodes.
*/
void
dns_rbt_namefromnode(dns_rbtnode_t *node, dns_name_t *name);
-/*
+/*%<
* Convert the sequence of labels stored at 'node' into a 'name'.
*
* Notes:
- * This function does not return the full name, from the root, but
+ *\li This function does not return the full name, from the root, but
* just the labels at the indicated node.
*
- * The name data pointed to by 'name' is the information stored
+ *\li The name data pointed to by 'name' is the information stored
* in the node, not a copy. Altering the data at this pointer
* will likely cause grief.
*
* Requires:
- * name->offsets == NULL
+ * \li name->offsets == NULL
*
* Ensures:
- * 'name' is DNS_NAMEATTR_READONLY.
+ * \li 'name' is DNS_NAMEATTR_READONLY.
*
- * 'name' will point directly to the labels stored after the
+ * \li 'name' will point directly to the labels stored after the
* dns_rbtnode_t struct.
*
- * 'name' will have offsets that also point to the information stored
+ * \li 'name' will have offsets that also point to the information stored
* as part of the node.
*/
isc_result_t
dns_rbt_fullnamefromnode(dns_rbtnode_t *node, dns_name_t *name);
-/*
+/*%<
* Like dns_rbt_namefromnode, but returns the full name from the root.
*
* Notes:
- * Unlike dns_rbt_namefromnode, the name will not point directly
+ * \li Unlike dns_rbt_namefromnode, the name will not point directly
* to node data. Rather, dns_name_concatenate will be used to copy
* the name data from each node into the 'name' argument.
*
* Requires:
- * name != NULL
- * name has a dedicated buffer.
+ * \li name != NULL
+ * \li name has a dedicated buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE (possible via dns_name_concatenate)
- * DNS_R_NAMETOOLONG (possible via dns_name_concatenate)
+ * \li ISC_R_SUCCESS
+ * \li ISC_R_NOSPACE (possible via dns_name_concatenate)
+ * \li DNS_R_NAMETOOLONG (possible via dns_name_concatenate)
*/
char *
dns_rbt_formatnodename(dns_rbtnode_t *node, char *printname,
unsigned int size);
-/*
+/*%<
* Format the full name of a node for printing, using dns_name_format().
*
* Notes:
- * 'size' is the length of the printname buffer. This should be
+ * \li 'size' is the length of the printname buffer. This should be
* DNS_NAME_FORMATSIZE or larger.
*
* Requires:
- * node and printname are not NULL.
+ * \li node and printname are not NULL.
*
* Returns:
- * The 'printname' pointer.
+ * \li The 'printname' pointer.
*/
unsigned int
dns_rbt_nodecount(dns_rbt_t *rbt);
-/*
+/*%<
* Obtain the number of nodes in the tree of trees.
*
* Requires:
- * rbt is a valid rbt manager.
+ * \li rbt is a valid rbt manager.
*/
void
dns_rbt_destroy(dns_rbt_t **rbtp);
isc_result_t
dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
-/*
+/*%<
* Stop working with a red-black tree of trees.
* If 'quantum' is zero then the entire tree will be destroyed.
* If 'quantum' is non zero then up to 'quantum' nodes will be destroyed
@@ -612,26 +633,26 @@ dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
* performed on the tree of trees.
*
* Requires:
- * *rbt is a valid rbt manager.
+ * \li *rbt is a valid rbt manager.
*
* Ensures on ISC_R_SUCCESS:
- * All space allocated by the RBT library has been returned.
+ * \li All space allocated by the RBT library has been returned.
*
- * *rbt is invalidated as an rbt manager.
+ * \li *rbt is invalidated as an rbt manager.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_QUOTA if 'quantum' nodes have been destroyed.
+ * \li ISC_R_SUCCESS
+ * \li ISC_R_QUOTA if 'quantum' nodes have been destroyed.
*/
void
dns_rbt_printall(dns_rbt_t *rbt);
-/*
+/*%<
* Print an ASCII representation of the internal structure of the red-black
* tree of trees.
*
* Notes:
- * The name stored at each node, along with the node's color, is printed.
+ * \li The name stored at each node, along with the node's color, is printed.
* Then the down pointer, left and right pointers are displayed
* recursively in turn. NULL down pointers are silently omitted;
* NULL left and right pointers are printed.
@@ -643,70 +664,70 @@ dns_rbt_printall(dns_rbt_t *rbt);
void
dns_rbtnodechain_init(dns_rbtnodechain_t *chain, isc_mem_t *mctx);
-/*
+/*%<
* Initialize 'chain'.
*
* Requires:
- * 'chain' is a valid pointer.
+ *\li 'chain' is a valid pointer.
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*
* Ensures:
- * 'chain' is suitable for use.
+ *\li 'chain' is suitable for use.
*/
void
dns_rbtnodechain_reset(dns_rbtnodechain_t *chain);
-/*
+/*%<
* Free any dynamic storage associated with 'chain', and then reinitialize
* 'chain'.
*
* Requires:
- * 'chain' is a valid pointer.
+ *\li 'chain' is a valid pointer.
*
* Ensures:
- * 'chain' is suitable for use, and uses no dynamic storage.
+ *\li 'chain' is suitable for use, and uses no dynamic storage.
*/
void
dns_rbtnodechain_invalidate(dns_rbtnodechain_t *chain);
-/*
+/*%<
* Free any dynamic storage associated with 'chain', and then invalidates it.
*
* Notes:
- * Future calls to any dns_rbtnodechain_ function will need to call
+ *\li Future calls to any dns_rbtnodechain_ function will need to call
* dns_rbtnodechain_init on the chain first (except, of course,
* dns_rbtnodechain_init itself).
*
* Requires:
- * 'chain' is a valid chain.
+ *\li 'chain' is a valid chain.
*
* Ensures:
- * 'chain' is no longer suitable for use, and uses no dynamic storage.
+ *\li 'chain' is no longer suitable for use, and uses no dynamic storage.
*/
isc_result_t
dns_rbtnodechain_current(dns_rbtnodechain_t *chain, dns_name_t *name,
dns_name_t *origin, dns_rbtnode_t **node);
-/*
+/*%<
* Provide the name, origin and node to which the chain is currently pointed.
*
* Notes:
- * The tree need not have be locked against additions for the chain
+ *\li The tree need not have be locked against additions for the chain
* to remain valid, however there are no guarantees if any deletion
* has been made since the chain was established.
*
* Requires:
- * 'chain' is a valid chain.
+ *\li 'chain' is a valid chain.
*
* Ensures:
- * 'node', if non-NULL, is the node to which the chain was pointed
+ *\li 'node', if non-NULL, is the node to which the chain was pointed
* by dns_rbt_findnode, dns_rbtnodechain_first or dns_rbtnodechain_last.
* If none were called for the chain since it was initialized or reset,
* or if the was no predecessor to the name searched for with
* dns_rbt_findnode, then '*node' is NULL and ISC_R_NOTFOUND is returned.
*
- * 'name', if non-NULL, is the name stored at the terminal level of
+ *\li 'name', if non-NULL, is the name stored at the terminal level of
* the chain. This is typically a single label, like the "www" of
* "www.isc.org", but need not be so. At the root of the tree of trees,
* if the node is "." then 'name' is ".", otherwise it is relative to ".".
@@ -714,124 +735,181 @@ dns_rbtnodechain_current(dns_rbtnodechain_t *chain, dns_name_t *name,
* "isc.org." then the root node's stored name is "isc.org." but 'name'
* will be "isc.org".)
*
- * 'origin', if non-NULL, is the sequence of labels in the levels
+ *\li 'origin', if non-NULL, is the sequence of labels in the levels
* above the terminal level, such as "isc.org." in the above example.
* 'origin' is always "." for the root node.
*
*
* Returns:
- * ISC_R_SUCCESS name, origin & node were successfully set.
- * ISC_R_NOTFOUND The chain does not point to any node.
- * <something_else> Any error return from dns_name_concatenate.
+ *\li #ISC_R_SUCCESS name, origin & node were successfully set.
+ *\li #ISC_R_NOTFOUND The chain does not point to any node.
+ *\li &lt;something_else> Any error return from dns_name_concatenate.
*/
isc_result_t
dns_rbtnodechain_first(dns_rbtnodechain_t *chain, dns_rbt_t *rbt,
dns_name_t *name, dns_name_t *origin);
-/*
+/*%<
* Set the chain to the lexically first node in the tree of trees.
*
* Notes:
- * By the definition of ordering for DNS names, the root of the tree of
+ *\li By the definition of ordering for DNS names, the root of the tree of
* trees is the very first node, since everything else in the megatree
* uses it as a common suffix.
*
* Requires:
- * 'chain' is a valid chain.
- * 'rbt' is a valid rbt manager.
+ *\li 'chain' is a valid chain.
+ *\li 'rbt' is a valid rbt manager.
*
* Ensures:
- * The chain points to the very first node of the tree.
+ *\li The chain points to the very first node of the tree.
*
- * 'name' and 'origin', if non-NULL, are set as described for
+ *\li 'name' and 'origin', if non-NULL, are set as described for
* dns_rbtnodechain_current. Thus 'origin' will always be ".".
*
* Returns:
- * DNS_R_NEWORIGIN The name & origin were successfully set.
- * <something_else> Any error result from dns_rbtnodechain_current.
+ *\li #DNS_R_NEWORIGIN The name & origin were successfully set.
+ *\li &lt;something_else> Any error result from dns_rbtnodechain_current.
*/
isc_result_t
dns_rbtnodechain_last(dns_rbtnodechain_t *chain, dns_rbt_t *rbt,
dns_name_t *name, dns_name_t *origin);
-/*
+/*%<
* Set the chain to the lexically last node in the tree of trees.
*
* Requires:
- * 'chain' is a valid chain.
- * 'rbt' is a valid rbt manager.
+ *\li 'chain' is a valid chain.
+ *\li 'rbt' is a valid rbt manager.
*
* Ensures:
- * The chain points to the very last node of the tree.
+ *\li The chain points to the very last node of the tree.
*
- * 'name' and 'origin', if non-NULL, are set as described for
+ *\li 'name' and 'origin', if non-NULL, are set as described for
* dns_rbtnodechain_current.
*
* Returns:
- * DNS_R_NEWORIGIN The name & origin were successfully set.
- * ISC_R_NOMEMORY Resource Limit: Out of Memory building chain.
- * <something_else> Any error result from dns_name_concatenate.
+ *\li #DNS_R_NEWORIGIN The name & origin were successfully set.
+ *\li #ISC_R_NOMEMORY Resource Limit: Out of Memory building chain.
+ *\li &lt;something_else> Any error result from dns_name_concatenate.
*/
isc_result_t
dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
dns_name_t *origin);
-/*
+/*%<
* Adjusts chain to point the DNSSEC predecessor of the name to which it
* is currently pointed.
*
* Requires:
- * 'chain' is a valid chain.
- * 'chain' has been pointed somewhere in the tree with dns_rbt_findnode,
+ *\li 'chain' is a valid chain.
+ *\li 'chain' has been pointed somewhere in the tree with dns_rbt_findnode,
* dns_rbtnodechain_first or dns_rbtnodechain_last -- and remember that
* dns_rbt_findnode is not guaranteed to point the chain somewhere,
* since there may have been no predecessor to the searched for name.
*
* Ensures:
- * The chain is pointed to the predecessor of its current target.
+ *\li The chain is pointed to the predecessor of its current target.
*
- * 'name' and 'origin', if non-NULL, are set as described for
+ *\li 'name' and 'origin', if non-NULL, are set as described for
* dns_rbtnodechain_current.
*
- * 'origin' is only if a new origin was found.
+ *\li 'origin' is only if a new origin was found.
*
* Returns:
- * ISC_R_SUCCESS The predecessor was found and 'name' was set.
- * DNS_R_NEWORIGIN The predecessor was found with a different
+ *\li #ISC_R_SUCCESS The predecessor was found and 'name' was set.
+ *\li #DNS_R_NEWORIGIN The predecessor was found with a different
* origin and 'name' and 'origin' were set.
- * ISC_R_NOMORE There was no predecessor.
- * <something_else> Any error result from dns_rbtnodechain_current.
+ *\li #ISC_R_NOMORE There was no predecessor.
+ *\li &lt;something_else> Any error result from dns_rbtnodechain_current.
*/
isc_result_t
dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
dns_name_t *origin);
-/*
+/*%<
* Adjusts chain to point the DNSSEC successor of the name to which it
* is currently pointed.
*
* Requires:
- * 'chain' is a valid chain.
- * 'chain' has been pointed somewhere in the tree with dns_rbt_findnode,
+ *\li 'chain' is a valid chain.
+ *\li 'chain' has been pointed somewhere in the tree with dns_rbt_findnode,
* dns_rbtnodechain_first or dns_rbtnodechain_last -- and remember that
* dns_rbt_findnode is not guaranteed to point the chain somewhere,
* since there may have been no predecessor to the searched for name.
*
* Ensures:
- * The chain is pointed to the successor of its current target.
+ *\li The chain is pointed to the successor of its current target.
*
- * 'name' and 'origin', if non-NULL, are set as described for
+ *\li 'name' and 'origin', if non-NULL, are set as described for
* dns_rbtnodechain_current.
*
- * 'origin' is only if a new origin was found.
+ *\li 'origin' is only if a new origin was found.
*
* Returns:
- * ISC_R_SUCCESS The successor was found and 'name' was set.
- * DNS_R_NEWORIGIN The successor was found with a different
+ *\li #ISC_R_SUCCESS The successor was found and 'name' was set.
+ *\li #DNS_R_NEWORIGIN The successor was found with a different
* origin and 'name' and 'origin' were set.
- * ISC_R_NOMORE There was no successor.
- * <something_else> Any error result from dns_name_concatenate.
+ *\li #ISC_R_NOMORE There was no successor.
+ *\li &lt;something_else> Any error result from dns_name_concatenate.
+ */
+
+/*
+ * Wrapper macros for manipulating the rbtnode reference counter:
+ * Since we selectively use isc_refcount_t for the reference counter of
+ * a rbtnode, operations on the counter depend on the actual type of it.
+ * The following macros provide a common interface to these operations,
+ * hiding the back-end. The usage is the same as that of isc_refcount_xxx().
*/
+#ifdef DNS_RBT_USEISCREFCOUNT
+#define dns_rbtnode_refinit(node, n) \
+ do { \
+ isc_refcount_init(&(node)->references, (n)); \
+ } while (0)
+#define dns_rbtnode_refdestroy(node) \
+ do { \
+ isc_refcount_destroy(&(node)->references); \
+ } while (0)
+#define dns_rbtnode_refcurrent(node) \
+ isc_refcount_current(&(node)->references)
+#define dns_rbtnode_refincrement0(node, refs) \
+ do { \
+ isc_refcount_increment0(&(node)->references, (refs)); \
+ } while (0)
+#define dns_rbtnode_refincrement(node, refs) \
+ do { \
+ isc_refcount_increment(&(node)->references, (refs)); \
+ } while (0)
+#define dns_rbtnode_refdecrement(node, refs) \
+ do { \
+ isc_refcount_decrement(&(node)->references, (refs)); \
+ } while (0)
+#else /* DNS_RBT_USEISCREFCOUNT */
+#define dns_rbtnode_refinit(node, n) ((node)->references = (n))
+#define dns_rbtnode_refdestroy(node) (REQUIRE((node)->references == 0))
+#define dns_rbtnode_refcurrent(node) ((node)->references)
+#define dns_rbtnode_refincrement0(node, refs) \
+ do { \
+ unsigned int *_tmp = (unsigned int *)(refs); \
+ (node)->references++; \
+ if ((_tmp) != NULL) \
+ (*_tmp) = (node)->references; \
+ } while (0)
+#define dns_rbtnode_refincrement(node, refs) \
+ do { \
+ REQUIRE((node)->references > 0); \
+ (node)->references++; \
+ if ((refs) != NULL) \
+ (*refs) = (node)->references; \
+ } while (0)
+#define dns_rbtnode_refdecrement(node, refs) \
+ do { \
+ REQUIRE((node)->references > 0); \
+ (node)->references--; \
+ if ((refs) != NULL) \
+ (*refs) = (node)->references; \
+ } while (0)
+#endif /* DNS_RBT_USEISCREFCOUNT */
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rcode.h b/contrib/bind9/lib/dns/include/dns/rcode.h
index b2494f7..03c145b 100644
--- a/contrib/bind9/lib/dns/include/dns/rcode.h
+++ b/contrib/bind9/lib/dns/include/dns/rcode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rcode.h,v 1.12.206.1 2004/03/06 08:13:59 marka Exp $ */
+/* $Id: rcode.h,v 1.13.18.2 2005/04/29 00:16:18 marka Exp $ */
#ifndef DNS_RCODE_H
#define DNS_RCODE_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -27,68 +29,68 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_rcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNS error value.
*
* Requires:
- * 'rcodep' is a valid pointer.
+ *\li 'rcodep' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * DNS_R_UNKNOWN type is unknown
+ *\li #ISC_R_SUCCESS on success
+ *\li #DNS_R_UNKNOWN type is unknown
*/
isc_result_t dns_rcode_totext(dns_rcode_t rcode, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of error 'rcode' into 'target'.
*
* Requires:
- * 'rcode' is a valid rcode.
+ *\li 'rcode' is a valid rcode.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
* Ensures:
- * If the result is success:
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
isc_result_t dns_tsigrcode_fromtext(dns_rcode_t *rcodep,
isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a TSIG/TKEY error value.
*
* Requires:
- * 'rcodep' is a valid pointer.
+ *\li 'rcodep' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * DNS_R_UNKNOWN type is unknown
+ *\li #ISC_R_SUCCESS on success
+ *\li #DNS_R_UNKNOWN type is unknown
*/
isc_result_t dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of TSIG/TKEY error 'rcode' into 'target'.
*
* Requires:
- * 'rcode' is a valid TSIG/TKEY error code.
+ *\li 'rcode' is a valid TSIG/TKEY error code.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
* Ensures:
- * If the result is success:
+ *\li If the result is success:
* The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdata.h b/contrib/bind9/lib/dns/include/dns/rdata.h
index b006b17..a14bde7 100644
--- a/contrib/bind9/lib/dns/include/dns/rdata.h
+++ b/contrib/bind9/lib/dns/include/dns/rdata.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.h,v 1.51.2.3.2.4 2004/03/08 02:08:01 marka Exp $ */
+/* $Id: rdata.h,v 1.60.18.3 2005/05/19 04:59:56 marka Exp $ */
#ifndef DNS_RDATA_H
#define DNS_RDATA_H 1
@@ -24,9 +24,8 @@
***** Module Info
*****/
-/*
- * DNS Rdata
- *
+/*! \file
+ * \brief
* Provides facilities for manipulating DNS rdata, including conversions to
* and from wire format and text format.
*
@@ -46,7 +45,7 @@
*
* Implementation Notes:
*
- * The routines in this module are expected to be synthesized by the
+ *\li The routines in this module are expected to be synthesized by the
* build process from a set of source files, one per rdata type. For
* portability, it's probably best that the building be done by a C
* program. Adding a new rdata type will be a simple matter of adding
@@ -54,38 +53,37 @@
* the format of a particular rdata type is in this file.
*
* MP:
- * Clients of this module must impose any required synchronization.
+ *\li Clients of this module must impose any required synchronization.
*
* Reliability:
- * This module deals with low-level byte streams. Errors in any of
+ *\li This module deals with low-level byte streams. Errors in any of
* the functions are likely to crash the server or corrupt memory.
*
- * Rdata is typed, and the caller must know what type of rdata it has.
+ *\li Rdata is typed, and the caller must know what type of rdata it has.
* A caller that gets this wrong could crash the server.
*
- * The fromstruct() and tostruct() routines use a void * pointer to
+ *\li The fromstruct() and tostruct() routines use a void * pointer to
* represent the structure. The caller must ensure that it passes a
* pointer to the appropriate type, or the server could crash or memory
* could be corrupted.
*
* Resources:
- * None.
+ *\li None.
*
* Security:
*
- * *** WARNING ***
- *
+ *\li *** WARNING ***
* dns_rdata_fromwire() deals with raw network data. An error in
* this routine could result in the failure or hijacking of the server.
*
* Standards:
- * RFC 1035
- * Draft EDNS0 (0)
- * Draft EDNS1 (0)
- * Draft Binary Labels (2)
- * Draft Local Compression (1)
- * <Various RFCs for particular types; these will be documented in the
- * sources files of the types.>
+ *\li RFC1035
+ *\li Draft EDNS0 (0)
+ *\li Draft EDNS1 (0)
+ *\li Draft Binary Labels (2)
+ *\li Draft Local Compression (1)
+ *\li Various RFCs for particular types; these will be documented in the
+ * sources files of the types.
*
*/
@@ -100,19 +98,17 @@
ISC_LANG_BEGINDECLS
-/*****
- ***** RData
- *****
- ***** An 'rdata' is a handle to a binary region. The handle has an RR
- ***** class and type, and the data in the binary region is in the format
- ***** of the given class and type.
- *****/
/***
*** Types
***/
-/*
+/*%
+ ***** An 'rdata' is a handle to a binary region. The handle has an RR
+ ***** class and type, and the data in the binary region is in the format
+ ***** of the given class and type.
+ *****/
+/*%
* Clients are strongly discouraged from using this type directly, with
* the exception of the 'link' field which may be used directly for whatever
* purpose the client desires.
@@ -128,7 +124,7 @@ struct dns_rdata {
#define DNS_RDATA_INIT { NULL, 0, 0, 0, 0, {(void*)(-1), (void *)(-1)}}
-#define DNS_RDATA_UPDATE 0x0001 /* update pseudo record */
+#define DNS_RDATA_UPDATE 0x0001 /*%< update pseudo record */
/*
* Flags affecting rdata formatting style. Flags 0xFFFF0000
@@ -136,17 +132,19 @@ struct dns_rdata {
* See additional comments at dns_rdata_tofmttext().
*/
-/* Split the rdata into multiple lines to try to keep it
+/*% Split the rdata into multiple lines to try to keep it
within the "width". */
#define DNS_STYLEFLAG_MULTILINE 0x00000001U
-/* Output explanatory comments. */
+/*% Output explanatory comments. */
#define DNS_STYLEFLAG_COMMENT 0x00000002U
#define DNS_RDATA_DOWNCASE DNS_NAME_DOWNCASE
#define DNS_RDATA_CHECKNAMES DNS_NAME_CHECKNAMES
#define DNS_RDATA_CHECKNAMESFAIL DNS_NAME_CHECKNAMESFAIL
#define DNS_RDATA_CHECKREVERSE DNS_NAME_CHECKREVERSE
+#define DNS_RDATA_CHECKMX DNS_NAME_CHECKMX
+#define DNS_RDATA_CHECKMXFAIL DNS_NAME_CHECKMXFAIL
/***
*** Initialization
@@ -154,7 +152,7 @@ struct dns_rdata {
void
dns_rdata_init(dns_rdata_t *rdata);
-/*
+/*%<
* Make 'rdata' empty.
*
* Requires:
@@ -163,21 +161,21 @@ dns_rdata_init(dns_rdata_t *rdata);
void
dns_rdata_reset(dns_rdata_t *rdata);
-/*
+/*%<
* Make 'rdata' empty.
*
* Requires:
- * 'rdata' is a previously initialized rdata and is not linked.
+ *\li 'rdata' is a previously initialized rdata and is not linked.
*/
void
dns_rdata_clone(const dns_rdata_t *src, dns_rdata_t *target);
-/*
+/*%<
* Clone 'target' from 'src'.
*
* Requires:
- * 'src' to be initialized.
- * 'target' to be initialized.
+ *\li 'src' to be initialized.
+ *\li 'target' to be initialized.
*/
/***
@@ -186,20 +184,20 @@ dns_rdata_clone(const dns_rdata_t *src, dns_rdata_t *target);
int
dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2);
-/*
+/*%<
* Determine the relative ordering under the DNSSEC order relation of
* 'rdata1' and 'rdata2'.
*
* Requires:
*
- * 'rdata1' is a valid, non-empty rdata
+ *\li 'rdata1' is a valid, non-empty rdata
*
- * 'rdata2' is a valid, non-empty rdata
+ *\li 'rdata2' is a valid, non-empty rdata
*
* Returns:
- * < 0 'rdata1' is less than 'rdata2'
- * 0 'rdata1' is equal to 'rdata2'
- * > 0 'rdata1' is greater than 'rdata2'
+ *\li < 0 'rdata1' is less than 'rdata2'
+ *\li 0 'rdata1' is equal to 'rdata2'
+ *\li > 0 'rdata1' is greater than 'rdata2'
*/
/***
@@ -209,17 +207,17 @@ dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2);
void
dns_rdata_fromregion(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_region_t *r);
-/*
+/*%<
* Make 'rdata' refer to region 'r'.
*
* Requires:
*
- * The data in 'r' is properly formatted for whatever type it is.
+ *\li The data in 'r' is properly formatted for whatever type it is.
*/
void
dns_rdata_toregion(const dns_rdata_t *rdata, isc_region_t *r);
-/*
+/*%<
* Make 'r' refer to 'rdata'.
*/
@@ -228,73 +226,70 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_buffer_t *source,
dns_decompress_t *dctx, unsigned int options,
isc_buffer_t *target);
-/*
+/*%<
* Copy the possibly-compressed rdata at source into the target region.
*
* Notes:
- * Name decompression policy is controlled by 'dctx'.
+ *\li Name decompression policy is controlled by 'dctx'.
*
* 'options'
- * DNS_RDATA_DOWNCASE downcase domain names when they are copied
+ *\li DNS_RDATA_DOWNCASE downcase domain names when they are copied
* into target.
*
* Requires:
*
- * 'rdclass' and 'type' are valid.
+ *\li 'rdclass' and 'type' are valid.
*
- * 'source' is a valid buffer, and the active region of 'source'
+ *\li 'source' is a valid buffer, and the active region of 'source'
* references the rdata to be processed.
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
- * 'dctx' is a valid decompression context.
+ *\li 'dctx' is a valid decompression context.
*
- * Ensures:
- *
- * If result is success:
- * If 'rdata' is not NULL, it is attached to the target.
- *
- * The conditions dns_name_fromwire() ensures for names hold
+ * Ensures,
+ * if result is success:
+ * \li If 'rdata' is not NULL, it is attached to the target.
+ * \li The conditions dns_name_fromwire() ensures for names hold
* for all names in the rdata.
- *
- * The current location in source is advanced, and the used space
+ * \li The current location in source is advanced, and the used space
* in target is updated.
*
* Result:
- * Success
- * <Any non-success status from dns_name_fromwire()>
- * <Various 'Bad Form' class failures depending on class and type>
- * Bad Form: Input too short
- * Resource Limit: Not enough space
+ *\li Success
+ *\li Any non-success status from dns_name_fromwire()
+ *\li Various 'Bad Form' class failures depending on class and type
+ *\li Bad Form: Input too short
+ *\li Resource Limit: Not enough space
*/
isc_result_t
dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx,
isc_buffer_t *target);
-/*
+/*%<
* Convert 'rdata' into wire format, compressing it as specified by the
* compression context 'cctx', and storing the result in 'target'.
*
* Notes:
- * If the compression context allows global compression, then the
+ *\li If the compression context allows global compression, then the
* global compression table may be updated.
*
* Requires:
- * 'rdata' is a valid, non-empty rdata
+ *\li 'rdata' is a valid, non-empty rdata
*
- * target is a valid buffer
+ *\li target is a valid buffer
*
- * Any offsets specified in a global compression table are valid
+ *\li Any offsets specified in a global compression table are valid
* for target.
*
- * Ensures:
- * If the result is success:
- * The used space in target is updated.
+ * Ensures,
+ * if the result is success:
+ * \li The used space in target is updated.
*
* Returns:
- * Success
- * <Any non-success status from dns_name_towire()>
- * Resource Limit: Not enough space
+ *\li Success
+ *\li Any non-success status from dns_name_towire()
+ *\li Resource Limit: Not enough space
*/
isc_result_t
@@ -302,100 +297,100 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_lex_t *lexer, dns_name_t *origin,
unsigned int options, isc_mem_t *mctx,
isc_buffer_t *target, dns_rdatacallbacks_t *callbacks);
-/*
+/*%<
* Convert the textual representation of a DNS rdata into uncompressed wire
* form stored in the target region. Tokens constituting the text of the rdata
* are taken from 'lexer'.
*
* Notes:
- * Relative domain names in the rdata will have 'origin' appended to them.
+ *\li Relative domain names in the rdata will have 'origin' appended to them.
* A NULL origin implies "origin == dns_rootname".
*
*
* 'options'
- * DNS_RDATA_DOWNCASE downcase domain names when they are copied
+ *\li DNS_RDATA_DOWNCASE downcase domain names when they are copied
* into target.
- * DNS_RDATA_CHECKNAMES perform checknames checks.
- * DNS_RDATA_CHECKNAMESFAIL fail if the checknames check fail. If
+ *\li DNS_RDATA_CHECKNAMES perform checknames checks.
+ *\li DNS_RDATA_CHECKNAMESFAIL fail if the checknames check fail. If
* not set a warning will be issued.
- * DNS_RDATA_CHECKREVERSE this should set if the owner name ends
+ *\li DNS_RDATA_CHECKREVERSE this should set if the owner name ends
* in IP6.ARPA, IP6.INT or IN-ADDR.ARPA.
*
* Requires:
*
- * 'rdclass' and 'type' are valid.
+ *\li 'rdclass' and 'type' are valid.
*
- * 'lexer' is a valid isc_lex_t.
+ *\li 'lexer' is a valid isc_lex_t.
*
- * 'mctx' is a valid isc_mem_t.
+ *\li 'mctx' is a valid isc_mem_t.
*
- * 'target' is a valid region.
+ *\li 'target' is a valid region.
*
- * 'origin' if non NULL it must be absolute.
+ *\li 'origin' if non NULL it must be absolute.
*
- * 'callbacks' to be NULL or callbacks->warn and callbacks->error be
+ *\li 'callbacks' to be NULL or callbacks->warn and callbacks->error be
* initialized.
*
- * Ensures:
- * If result is success:
- * If 'rdata' is not NULL, it is attached to the target.
- *
- * The conditions dns_name_fromtext() ensures for names hold
+ * Ensures,
+ * if result is success:
+ *\li If 'rdata' is not NULL, it is attached to the target.
+
+ *\li The conditions dns_name_fromtext() ensures for names hold
* for all names in the rdata.
- *
- * The used space in target is updated.
+
+ *\li The used space in target is updated.
*
* Result:
- * Success
- * <Translated result codes from isc_lex_gettoken>
- * <Various 'Bad Form' class failures depending on class and type>
- * Bad Form: Input too short
- * Resource Limit: Not enough space
- * Resource Limit: Not enough memory
+ *\li Success
+ *\li Translated result codes from isc_lex_gettoken
+ *\li Various 'Bad Form' class failures depending on class and type
+ *\li Bad Form: Input too short
+ *\li Resource Limit: Not enough space
+ *\li Resource Limit: Not enough memory
*/
isc_result_t
dns_rdata_totext(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target);
-/*
+/*%<
* Convert 'rdata' into text format, storing the result in 'target'.
* The text will consist of a single line, with fields separated by
* single spaces.
*
* Notes:
- * If 'origin' is not NULL, then any names in the rdata that are
+ *\li If 'origin' is not NULL, then any names in the rdata that are
* subdomains of 'origin' will be made relative it.
*
- * XXX Do we *really* want to support 'origin'? I'm inclined towards "no"
+ *\li XXX Do we *really* want to support 'origin'? I'm inclined towards "no"
* at the moment.
*
* Requires:
*
- * 'rdata' is a valid, non-empty rdata
+ *\li 'rdata' is a valid, non-empty rdata
*
- * 'origin' is NULL, or is a valid name
+ *\li 'origin' is NULL, or is a valid name
*
- * 'target' is a valid text buffer
+ *\li 'target' is a valid text buffer
*
- * Ensures:
- * If the result is success:
+ * Ensures,
+ * if the result is success:
*
- * The used space in target is updated.
+ * \li The used space in target is updated.
*
* Returns:
- * Success
- * <Any non-success status from dns_name_totext()>
- * Resource Limit: Not enough space
+ *\li Success
+ *\li Any non-success status from dns_name_totext()
+ *\li Resource Limit: Not enough space
*/
isc_result_t
dns_rdata_tofmttext(dns_rdata_t *rdata, dns_name_t *origin, unsigned int flags,
unsigned int width, char *linebreak, isc_buffer_t *target);
-/*
+/*%<
* Like dns_rdata_totext, but do formatted output suitable for
* database dumps. This is intended for use by dns_db_dump();
* library users are discouraged from calling it directly.
*
- * If (flags & DNS_STYLEFLAG_MULTILINE) != 0, attempt to stay
+ * If (flags & #DNS_STYLEFLAG_MULTILINE) != 0, attempt to stay
* within 'width' by breaking the text into multiple lines.
* The string 'linebreak' is inserted between lines, and parentheses
* are added when necessary. Because RRs contain unbreakable elements
@@ -403,11 +398,11 @@ dns_rdata_tofmttext(dns_rdata_t *rdata, dns_name_t *origin, unsigned int flags,
* potentially large, there is no guarantee that the lines will
* not exceed 'width' anyway.
*
- * If (flags & DNS_STYLEFLAG_MULTILINE) == 0, the rdata is always
+ * If (flags & #DNS_STYLEFLAG_MULTILINE) == 0, the rdata is always
* printed as a single line, and no parentheses are used.
* The 'width' and 'linebreak' arguments are ignored.
*
- * If (flags & DNS_STYLEFLAG_COMMENT) != 0, output explanatory
+ * If (flags & #DNS_STYLEFLAG_COMMENT) != 0, output explanatory
* comments next to things like the SOA timer fields. Some
* comments (e.g., the SOA ones) are only printed when multiline
* output is selected.
@@ -416,7 +411,7 @@ dns_rdata_tofmttext(dns_rdata_t *rdata, dns_name_t *origin, unsigned int flags,
isc_result_t
dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, void *source, isc_buffer_t *target);
-/*
+/*%<
* Convert the C structure representation of an rdata into uncompressed wire
* format in 'target'.
*
@@ -424,30 +419,30 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
*
* Requires:
*
- * 'rdclass' and 'type' are valid.
+ *\li 'rdclass' and 'type' are valid.
*
- * 'source' points to a valid C struct for the class and type.
+ *\li 'source' points to a valid C struct for the class and type.
*
- * 'target' is a valid buffer.
+ *\li 'target' is a valid buffer.
*
- * All structure pointers to memory blocks should be NULL if their
+ *\li All structure pointers to memory blocks should be NULL if their
* corresponding length values are zero.
*
- * Ensures:
- * If result is success:
- * If 'rdata' is not NULL, it is attached to the target.
+ * Ensures,
+ * if result is success:
+ * \li If 'rdata' is not NULL, it is attached to the target.
*
- * The used space in 'target' is updated.
+ * \li The used space in 'target' is updated.
*
* Result:
- * Success
- * <Various 'Bad Form' class failures depending on class and type>
- * Resource Limit: Not enough space
+ *\li Success
+ *\li Various 'Bad Form' class failures depending on class and type
+ *\li Resource Limit: Not enough space
*/
isc_result_t
dns_rdata_tostruct(dns_rdata_t *rdata, void *target, isc_mem_t *mctx);
-/*
+/*%<
* Convert an rdata into its C structure representation.
*
* If 'mctx' is NULL then 'rdata' must persist while 'target' is being used.
@@ -456,80 +451,80 @@ dns_rdata_tostruct(dns_rdata_t *rdata, void *target, isc_mem_t *mctx);
*
* Requires:
*
- * 'rdata' is a valid, non-empty rdata.
+ *\li 'rdata' is a valid, non-empty rdata.
*
- * 'target' to point to a valid pointer for the type and class.
+ *\li 'target' to point to a valid pointer for the type and class.
*
* Result:
- * Success
- * Resource Limit: Not enough memory
+ *\li Success
+ *\li Resource Limit: Not enough memory
*/
void
dns_rdata_freestruct(void *source);
-/*
+/*%<
* Free dynamic memory attached to 'source' (if any).
*
* Requires:
*
- * 'source' to point to the structure previously filled in by
+ *\li 'source' to point to the structure previously filled in by
* dns_rdata_tostruct().
*/
isc_boolean_t
dns_rdatatype_ismeta(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff the rdata type 'type' is a meta-type
* like ANY or AXFR.
*/
isc_boolean_t
dns_rdatatype_issingleton(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff the rdata type 'type' is a singleton type,
* like CNAME or SOA.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
isc_boolean_t
dns_rdataclass_ismeta(dns_rdataclass_t rdclass);
-/*
+/*%<
* Return true iff the rdata class 'rdclass' is a meta-class
* like ANY or NONE.
*/
isc_boolean_t
dns_rdatatype_isdnssec(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff 'type' is one of the DNSSEC
* rdata types that may exist alongside a CNAME record.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*/
isc_boolean_t
dns_rdatatype_iszonecutauth(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff rdata of type 'type' is considered authoritative
* data (not glue) in the NSEC chain when it occurs in the parent zone
* at a zone cut.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
isc_boolean_t
dns_rdatatype_isknown(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff the rdata type 'type' is known.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
@@ -537,140 +532,140 @@ dns_rdatatype_isknown(dns_rdatatype_t type);
isc_result_t
dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg);
-/*
+/*%<
* Call 'add' for each name and type from 'rdata' which is subject to
* additional section processing.
*
* Requires:
*
- * 'rdata' is a valid, non-empty rdata.
+ *\li 'rdata' is a valid, non-empty rdata.
*
- * 'add' is a valid dns_additionalfunc_t.
+ *\li 'add' is a valid dns_additionalfunc_t.
*
* Ensures:
*
- * If successful, then add() will have been called for each name
+ *\li If successful, then add() will have been called for each name
* and type subject to additional section processing.
*
- * If add() returns something other than ISC_R_SUCCESS, that result
+ *\li If add() returns something other than #ISC_R_SUCCESS, that result
* will be returned as the result of dns_rdata_additionaldata().
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Many other results are possible if not successful.
+ *\li Many other results are possible if not successful.
*/
isc_result_t
dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg);
-/*
+/*%<
* Send 'rdata' in DNSSEC canonical form to 'digest'.
*
* Note:
- * 'digest' may be called more than once by dns_rdata_digest(). The
+ *\li 'digest' may be called more than once by dns_rdata_digest(). The
* concatenation of all the regions, in the order they were given
* to 'digest', will be the DNSSEC canonical form of 'rdata'.
*
* Requires:
*
- * 'rdata' is a valid, non-empty rdata.
+ *\li 'rdata' is a valid, non-empty rdata.
*
- * 'digest' is a valid dns_digestfunc_t.
+ *\li 'digest' is a valid dns_digestfunc_t.
*
* Ensures:
*
- * If successful, then all of the rdata's data has been sent, in
+ *\li If successful, then all of the rdata's data has been sent, in
* DNSSEC canonical form, to 'digest'.
*
- * If digest() returns something other than ISC_R_SUCCESS, that result
+ *\li If digest() returns something other than ISC_R_SUCCESS, that result
* will be returned as the result of dns_rdata_digest().
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Many other results are possible if not successful.
+ *\li Many other results are possible if not successful.
*/
isc_boolean_t
dns_rdatatype_questiononly(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff rdata of type 'type' can only appear in the question
* section of a properly formatted message.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
isc_boolean_t
dns_rdatatype_notquestion(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff rdata of type 'type' can not appear in the question
* section of a properly formatted message.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
isc_boolean_t
dns_rdatatype_atparent(dns_rdatatype_t type);
-/*
+/*%<
* Return true iff rdata of type 'type' should appear at the parent of
* a zone cut.
*
* Requires:
- * 'type' is a valid rdata type.
+ * \li 'type' is a valid rdata type.
*
*/
unsigned int
dns_rdatatype_attributes(dns_rdatatype_t rdtype);
-/*
+/*%<
* Return attributes for the given type.
*
* Requires:
- * 'rdtype' are known.
+ *\li 'rdtype' are known.
*
* Returns:
- * a bitmask consisting of the following flags.
+ *\li a bitmask consisting of the following flags.
*/
-/* only one may exist for a name */
+/*% only one may exist for a name */
#define DNS_RDATATYPEATTR_SINGLETON 0x00000001U
-/* requires no other data be present */
+/*% requires no other data be present */
#define DNS_RDATATYPEATTR_EXCLUSIVE 0x00000002U
-/* Is a meta type */
+/*% Is a meta type */
#define DNS_RDATATYPEATTR_META 0x00000004U
-/* Is a DNSSEC type, like RRSIG or NSEC */
+/*% Is a DNSSEC type, like RRSIG or NSEC */
#define DNS_RDATATYPEATTR_DNSSEC 0x00000008U
-/* Is a zone cut authority type */
+/*% Is a zone cut authority type */
#define DNS_RDATATYPEATTR_ZONECUTAUTH 0x00000010U
-/* Is reserved (unusable) */
+/*% Is reserved (unusable) */
#define DNS_RDATATYPEATTR_RESERVED 0x00000020U
-/* Is an unknown type */
+/*% Is an unknown type */
#define DNS_RDATATYPEATTR_UNKNOWN 0x00000040U
-/* Is META, and can only be in a question section */
+/*% Is META, and can only be in a question section */
#define DNS_RDATATYPEATTR_QUESTIONONLY 0x00000080U
-/* is META, and can NOT be in a question section */
+/*% is META, and can NOT be in a question section */
#define DNS_RDATATYPEATTR_NOTQUESTION 0x00000100U
-/* Is present at zone cuts in the parent, not the child */
+/*% Is present at zone cuts in the parent, not the child */
#define DNS_RDATATYPEATTR_ATPARENT 0x00000200U
dns_rdatatype_t
dns_rdata_covers(dns_rdata_t *rdata);
-/*
+/*%<
* Return the rdatatype that this type covers.
*
* Requires:
- * 'rdata' is a valid, non-empty rdata.
+ *\li 'rdata' is a valid, non-empty rdata.
*
- * 'rdata' is a type that covers other rdata types.
+ *\li 'rdata' is a type that covers other rdata types.
*
* Returns:
- * The type covered.
+ *\li The type covered.
*/
isc_boolean_t
diff --git a/contrib/bind9/lib/dns/include/dns/rdataclass.h b/contrib/bind9/lib/dns/include/dns/rdataclass.h
index 359a2be..fc622bf 100644
--- a/contrib/bind9/lib/dns/include/dns/rdataclass.h
+++ b/contrib/bind9/lib/dns/include/dns/rdataclass.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataclass.h,v 1.17.206.1 2004/03/06 08:13:59 marka Exp $ */
+/* $Id: rdataclass.h,v 1.18.18.2 2005/04/29 00:16:18 marka Exp $ */
#ifndef DNS_RDATACLASS_H
#define DNS_RDATACLASS_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,49 +30,49 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNS class.
*
* Requires:
- * 'classp' is a valid pointer.
+ *\li 'classp' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * DNS_R_UNKNOWN class is unknown
+ *\li #ISC_R_SUCCESS on success
+ *\li #DNS_R_UNKNOWN class is unknown
*/
isc_result_t
dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of class 'rdclass' into 'target'.
*
* Requires:
- * 'rdclass' is a valid class.
+ *\li 'rdclass' is a valid class.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
- * Ensures:
- * If the result is success:
- * The used space in 'target' is updated.
+ * Ensures,
+ * if the result is success:
+ *\li The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
void
dns_rdataclass_format(dns_rdataclass_t rdclass,
char *array, unsigned int size);
-/*
+/*%<
* Format a human-readable representation of the class 'rdclass'
* into the character array 'array', which is of size 'size'.
* The resulting string is guaranteed to be null-terminated.
*/
#define DNS_RDATACLASS_FORMATSIZE sizeof("CLASS65535")
-/*
+/*%<
* Minimum size of array to pass to dns_rdataclass_format().
*/
diff --git a/contrib/bind9/lib/dns/include/dns/rdatalist.h b/contrib/bind9/lib/dns/include/dns/rdatalist.h
index a846c89..697386f 100644
--- a/contrib/bind9/lib/dns/include/dns/rdatalist.h
+++ b/contrib/bind9/lib/dns/include/dns/rdatalist.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdatalist.h,v 1.13.206.1 2004/03/06 08:13:59 marka Exp $ */
+/* $Id: rdatalist.h,v 1.14.18.2 2005/04/29 00:16:19 marka Exp $ */
#ifndef DNS_RDATALIST_H
#define DNS_RDATALIST_H 1
@@ -24,32 +24,31 @@
***** Module Info
*****/
-/*
- * DNS Rdatalist
- *
+/*! \file
+ * \brief
* A DNS rdatalist is a list of rdata of a common type and class.
*
* MP:
- * Clients of this module must impose any required synchronization.
+ *\li Clients of this module must impose any required synchronization.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
#include <isc/lang.h>
#include <dns/types.h>
-/*
+/*%
* Clients may use this type directly.
*/
struct dns_rdatalist {
@@ -65,38 +64,38 @@ ISC_LANG_BEGINDECLS
void
dns_rdatalist_init(dns_rdatalist_t *rdatalist);
-/*
+/*%<
* Initialize rdatalist.
*
* Ensures:
- * All fields of rdatalist have been initialized to their default
+ *\li All fields of rdatalist have been initialized to their default
* values.
*/
isc_result_t
dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
dns_rdataset_t *rdataset);
-/*
+/*%<
* Make 'rdataset' refer to the rdata in 'rdatalist'.
*
* Note:
- * The caller must ensure that 'rdatalist' remains valid and unchanged
+ *\li The caller must ensure that 'rdatalist' remains valid and unchanged
* while 'rdataset' is associated with it.
*
* Requires:
*
- * 'rdatalist' is a valid rdatalist.
+ *\li 'rdatalist' is a valid rdatalist.
*
- * 'rdataset' is a valid rdataset that is not currently associated with
+ *\li 'rdataset' is a valid rdataset that is not currently associated with
* any rdata.
*
- * Ensures:
- * On success,
+ * Ensures,
+ * on success,
*
- * 'rdataset' is associated with the rdata in rdatalist.
+ *\li 'rdataset' is associated with the rdata in rdatalist.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdataset.h b/contrib/bind9/lib/dns/include/dns/rdataset.h
index 12cfbde..5597591 100644
--- a/contrib/bind9/lib/dns/include/dns/rdataset.h
+++ b/contrib/bind9/lib/dns/include/dns/rdataset.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.h,v 1.41.2.5.2.10 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: rdataset.h,v 1.51.18.7 2006/03/03 00:56:53 marka Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
@@ -24,9 +24,8 @@
***** Module Info
*****/
-/*
- * DNS Rdataset
- *
+/*! \file
+ * \brief
* A DNS rdataset is a handle that can be associated with a collection of
* rdata all having a common owner name, class, and type.
*
@@ -34,31 +33,38 @@
* rdatasets, an implementation of the method suite (e.g. "slabbed rdata") is
* required.
*
- * XXX <more> XXX
+ * XXX &lt;more&gt; XXX
*
* MP:
- * Clients of this module must impose any required synchronization.
+ *\li Clients of this module must impose any required synchronization.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
#include <isc/lang.h>
#include <isc/magic.h>
+#include <isc/stdtime.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
+typedef enum {
+ dns_rdatasetadditional_fromauth,
+ dns_rdatasetadditional_fromcache,
+ dns_rdatasetadditional_fromglue
+} dns_rdatasetadditional_t;
+
typedef struct dns_rdatasetmethods {
void (*disassociate)(dns_rdataset_t *rdataset);
isc_result_t (*first)(dns_rdataset_t *rdataset);
@@ -74,12 +80,36 @@ typedef struct dns_rdatasetmethods {
dns_name_t *name,
dns_rdataset_t *nsec,
dns_rdataset_t *nsecsig);
+ isc_result_t (*getadditional)(dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype,
+ dns_acache_t *acache,
+ dns_zone_t **zonep,
+ dns_db_t **dbp,
+ dns_dbversion_t **versionp,
+ dns_dbnode_t **nodep,
+ dns_name_t *fname,
+ dns_message_t *msg,
+ isc_stdtime_t now);
+ isc_result_t (*setadditional)(dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype,
+ dns_acache_t *acache,
+ dns_zone_t *zone,
+ dns_db_t *db,
+ dns_dbversion_t *version,
+ dns_dbnode_t *node,
+ dns_name_t *fname);
+ isc_result_t (*putadditional)(dns_acache_t *acache,
+ dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype);
} dns_rdatasetmethods_t;
#define DNS_RDATASET_MAGIC ISC_MAGIC('D','N','S','R')
#define DNS_RDATASET_VALID(set) ISC_MAGIC_VALID(set, DNS_RDATASET_MAGIC)
-/*
+/*%
* Direct use of this structure by clients is strongly discouraged, except
* for the 'link' field which may be used however the client wishes. The
* 'private', 'current', and 'index' fields MUST NOT be changed by clients.
@@ -103,14 +133,15 @@ struct dns_rdataset {
* attributes
*/
unsigned int attributes;
- /*
+ /*%
* the counter provides the starting point in the "cyclic" order.
* The value ISC_UINT32_MAX has a special meaning of "picking up a
* random value." in order to take care of databases that do not
* increment the counter.
*/
isc_uint32_t count;
- /*
+ /*@{*/
+ /*%
* These are for use by the rdataset implementation, and MUST NOT
* be changed by clients.
*/
@@ -120,35 +151,41 @@ struct dns_rdataset {
unsigned int privateuint4;
void * private5;
void * private6;
+ /*@}*/
};
-/*
- * _RENDERED:
+/*!
+ * \def DNS_RDATASETATTR_RENDERED
* Used by message.c to indicate that the rdataset was rendered.
*
- * _TTLADJUSTED:
+ * \def DNS_RDATASETATTR_TTLADJUSTED
* Used by message.c to indicate that the rdataset's rdata had differing
* TTL values, and the rdataset->ttl holds the smallest.
+ *
+ * \def DNS_RDATASETATTR_LOADORDER
+ * Output the RRset in load order.
*/
+
#define DNS_RDATASETATTR_QUESTION 0x00000001
-#define DNS_RDATASETATTR_RENDERED 0x00000002 /* Used by message.c */
-#define DNS_RDATASETATTR_ANSWERED 0x00000004 /* Used by server. */
-#define DNS_RDATASETATTR_CACHE 0x00000008 /* Used by resolver. */
-#define DNS_RDATASETATTR_ANSWER 0x00000010 /* Used by resolver. */
-#define DNS_RDATASETATTR_ANSWERSIG 0x00000020 /* Used by resolver. */
-#define DNS_RDATASETATTR_EXTERNAL 0x00000040 /* Used by resolver. */
-#define DNS_RDATASETATTR_NCACHE 0x00000080 /* Used by resolver. */
-#define DNS_RDATASETATTR_CHAINING 0x00000100 /* Used by resolver. */
-#define DNS_RDATASETATTR_TTLADJUSTED 0x00000200 /* Used by message.c */
+#define DNS_RDATASETATTR_RENDERED 0x00000002 /*%< Used by message.c */
+#define DNS_RDATASETATTR_ANSWERED 0x00000004 /*%< Used by server. */
+#define DNS_RDATASETATTR_CACHE 0x00000008 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_ANSWER 0x00000010 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_ANSWERSIG 0x00000020 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_EXTERNAL 0x00000040 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_NCACHE 0x00000080 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_CHAINING 0x00000100 /*%< Used by resolver. */
+#define DNS_RDATASETATTR_TTLADJUSTED 0x00000200 /*%< Used by message.c */
#define DNS_RDATASETATTR_FIXEDORDER 0x00000400
#define DNS_RDATASETATTR_RANDOMIZE 0x00000800
-#define DNS_RDATASETATTR_CHASE 0x00001000 /* Used by resolver. */
+#define DNS_RDATASETATTR_CHASE 0x00001000 /*%< Used by resolver. */
#define DNS_RDATASETATTR_NXDOMAIN 0x00002000
#define DNS_RDATASETATTR_NOQNAME 0x00004000
-#define DNS_RDATASETATTR_CHECKNAMES 0x00008000 /* Used by resolver. */
+#define DNS_RDATASETATTR_CHECKNAMES 0x00008000 /*%< Used by resolver. */
#define DNS_RDATASETATTR_REQUIREDGLUE 0x00010000
+#define DNS_RDATASETATTR_LOADORDER 0x00020000
-/*
+/*%
* _OMITDNSSEC:
* Omit DNSSEC records when rendering ncache records.
*/
@@ -156,147 +193,147 @@ struct dns_rdataset {
void
dns_rdataset_init(dns_rdataset_t *rdataset);
-/*
+/*%<
* Make 'rdataset' a valid, disassociated rdataset.
*
* Requires:
- * 'rdataset' is not NULL.
+ *\li 'rdataset' is not NULL.
*
* Ensures:
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*/
void
dns_rdataset_invalidate(dns_rdataset_t *rdataset);
-/*
+/*%<
* Invalidate 'rdataset'.
*
* Requires:
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
* Ensures:
- * If assertion checking is enabled, future attempts to use 'rdataset'
+ *\li If assertion checking is enabled, future attempts to use 'rdataset'
* without initializing it will cause an assertion failure.
*/
void
dns_rdataset_disassociate(dns_rdataset_t *rdataset);
-/*
+/*%<
* Disassociate 'rdataset' from its rdata, allowing it to be reused.
*
* Notes:
- * The client must ensure it has no references to rdata in the rdataset
+ *\li The client must ensure it has no references to rdata in the rdataset
* before disassociating.
*
* Requires:
- * 'rdataset' is a valid, associated rdataset.
+ *\li 'rdataset' is a valid, associated rdataset.
*
* Ensures:
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*/
isc_boolean_t
dns_rdataset_isassociated(dns_rdataset_t *rdataset);
-/*
+/*%<
* Is 'rdataset' associated?
*
* Requires:
- * 'rdataset' is a valid rdataset.
+ *\li 'rdataset' is a valid rdataset.
*
* Returns:
- * ISC_TRUE 'rdataset' is associated.
- * ISC_FALSE 'rdataset' is not associated.
+ *\li #ISC_TRUE 'rdataset' is associated.
+ *\li #ISC_FALSE 'rdataset' is not associated.
*/
void
dns_rdataset_makequestion(dns_rdataset_t *rdataset, dns_rdataclass_t rdclass,
dns_rdatatype_t type);
-/*
+/*%<
* Make 'rdataset' a valid, associated, question rdataset, with a
* question class of 'rdclass' and type 'type'.
*
* Notes:
- * Question rdatasets have a class and type, but no rdata.
+ *\li Question rdatasets have a class and type, but no rdata.
*
* Requires:
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
* Ensures:
- * 'rdataset' is a valid, associated, question rdataset.
+ *\li 'rdataset' is a valid, associated, question rdataset.
*/
void
dns_rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target);
-/*
+/*%<
* Make 'target' refer to the same rdataset as 'source'.
*
* Requires:
- * 'source' is a valid, associated rdataset.
+ *\li 'source' is a valid, associated rdataset.
*
- * 'target' is a valid, dissociated rdataset.
+ *\li 'target' is a valid, dissociated rdataset.
*
* Ensures:
- * 'target' references the same rdataset as 'source'.
+ *\li 'target' references the same rdataset as 'source'.
*/
unsigned int
dns_rdataset_count(dns_rdataset_t *rdataset);
-/*
+/*%<
* Return the number of records in 'rdataset'.
*
* Requires:
- * 'rdataset' is a valid, associated rdataset.
+ *\li 'rdataset' is a valid, associated rdataset.
*
* Returns:
- * The number of records in 'rdataset'.
+ *\li The number of records in 'rdataset'.
*/
isc_result_t
dns_rdataset_first(dns_rdataset_t *rdataset);
-/*
+/*%<
* Move the rdata cursor to the first rdata in the rdataset (if any).
*
* Requires:
- * 'rdataset' is a valid, associated rdataset.
+ *\li 'rdataset' is a valid, associated rdataset.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no rdata in the set.
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no rdata in the set.
*/
isc_result_t
dns_rdataset_next(dns_rdataset_t *rdataset);
-/*
+/*%<
* Move the rdata cursor to the next rdata in the rdataset (if any).
*
* Requires:
- * 'rdataset' is a valid, associated rdataset.
+ *\li 'rdataset' is a valid, associated rdataset.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no more rdata in the set.
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE There are no more rdata in the set.
*/
void
dns_rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
-/*
+/*%<
* Make 'rdata' refer to the current rdata.
*
* Notes:
*
- * The data returned in 'rdata' is valid for the life of the
+ *\li The data returned in 'rdata' is valid for the life of the
* rdataset; in particular, subsequent changes in the cursor position
* do not invalidate 'rdata'.
*
* Requires:
- * 'rdataset' is a valid, associated rdataset.
+ *\li 'rdataset' is a valid, associated rdataset.
*
- * The rdata cursor of 'rdataset' is at a valid location (i.e. the
+ *\li The rdata cursor of 'rdataset' is at a valid location (i.e. the
* result of last call to a cursor movement command was ISC_R_SUCCESS).
*
* Ensures:
- * 'rdata' refers to the rdata at the rdata cursor location of
- * 'rdataset'.
+ *\li 'rdata' refers to the rdata at the rdata cursor location of
+ *\li 'rdataset'.
*/
isc_result_t
@@ -305,23 +342,23 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
isc_boolean_t omit_final_dot,
isc_boolean_t question,
isc_buffer_t *target);
-/*
+/*%<
* Convert 'rdataset' to text format, storing the result in 'target'.
*
* Notes:
- * The rdata cursor position will be changed.
+ *\li The rdata cursor position will be changed.
*
- * The 'question' flag should normally be ISC_FALSE. If it is
- * ISC_TRUE, the TTL and rdata fields are not printed. This is
+ *\li The 'question' flag should normally be #ISC_FALSE. If it is
+ * #ISC_TRUE, the TTL and rdata fields are not printed. This is
* for use when printing an rdata representing a question section.
*
- * This interface is deprecated; use dns_master_rdatasettottext()
+ *\li This interface is deprecated; use dns_master_rdatasettottext()
* and/or dns_master_questiontotext() instead.
*
* Requires:
- * 'rdataset' is a valid rdataset.
+ *\li 'rdataset' is a valid rdataset.
*
- * 'rdataset' is not empty.
+ *\li 'rdataset' is not empty.
*/
isc_result_t
@@ -331,35 +368,35 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
isc_buffer_t *target,
unsigned int options,
unsigned int *countp);
-/*
+/*%<
* Convert 'rdataset' to wire format, compressing names as specified
* in 'cctx', and storing the result in 'target'.
*
* Notes:
- * The rdata cursor position will be changed.
+ *\li The rdata cursor position will be changed.
*
- * The number of RRs added to target will be added to *countp.
+ *\li The number of RRs added to target will be added to *countp.
*
* Requires:
- * 'rdataset' is a valid rdataset.
+ *\li 'rdataset' is a valid rdataset.
*
- * 'rdataset' is not empty.
+ *\li 'rdataset' is not empty.
*
- * 'countp' is a valid pointer.
+ *\li 'countp' is a valid pointer.
*
* Ensures:
- * On a return of ISC_R_SUCCESS, 'target' contains a wire format
+ *\li On a return of ISC_R_SUCCESS, 'target' contains a wire format
* for the data contained in 'rdataset'. Any error return leaves
* the buffer unchanged.
*
- * *countp has been incremented by the number of RRs added to
+ *\li *countp has been incremented by the number of RRs added to
* target.
*
* Returns:
- * ISC_R_SUCCESS - all ok
- * ISC_R_NOSPACE - 'target' doesn't have enough room
+ *\li #ISC_R_SUCCESS - all ok
+ *\li #ISC_R_NOSPACE - 'target' doesn't have enough room
*
- * Any error returned by dns_rdata_towire(), dns_rdataset_next(),
+ *\li Any error returned by dns_rdata_towire(), dns_rdataset_next(),
* dns_name_towire().
*/
@@ -372,13 +409,13 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
const void *order_arg,
unsigned int options,
unsigned int *countp);
-/*
+/*%<
* Like dns_rdataset_towire(), but sorting the rdatasets according to
* the integer value returned by 'order' when called witih the rdataset
* and 'order_arg' as arguments.
*
* Requires:
- * All the requirements of dns_rdataset_towire(), and
+ *\li All the requirements of dns_rdataset_towire(), and
* that order_arg is NULL if and only if order is NULL.
*/
@@ -392,76 +429,167 @@ dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
unsigned int options,
unsigned int *countp,
void **state);
-/*
+/*%<
* Like dns_rdataset_towiresorted() except that a partial rdataset
* may be written.
*
* Requires:
- * All the requirements of dns_rdataset_towiresorted().
+ *\li All the requirements of dns_rdataset_towiresorted().
* If 'state' is non NULL then the current position in the
* rdataset will be remembered if the rdataset in not
* completely written and should be passed on on subsequent
* calls (NOT CURRENTLY IMPLEMENTED).
*
* Returns:
- * ISC_R_SUCCESS if all of the records were written.
- * ISC_R_NOSPACE if unable to fit in all of the records. *countp
+ *\li #ISC_R_SUCCESS if all of the records were written.
+ *\li #ISC_R_NOSPACE if unable to fit in all of the records. *countp
* will be updated to reflect the number of records
* written.
*/
-
isc_result_t
dns_rdataset_additionaldata(dns_rdataset_t *rdataset,
dns_additionaldatafunc_t add, void *arg);
-/*
+/*%<
* For each rdata in rdataset, call 'add' for each name and type in the
* rdata which is subject to additional section processing.
*
* Requires:
*
- * 'rdataset' is a valid, non-question rdataset.
+ *\li 'rdataset' is a valid, non-question rdataset.
*
- * 'add' is a valid dns_additionaldatafunc_t
+ *\li 'add' is a valid dns_additionaldatafunc_t
*
* Ensures:
*
- * If successful, dns_rdata_additionaldata() will have been called for
+ *\li If successful, dns_rdata_additionaldata() will have been called for
* each rdata in 'rdataset'.
*
- * If a call to dns_rdata_additionaldata() is not successful, the
+ *\li If a call to dns_rdata_additionaldata() is not successful, the
* result returned will be the result of dns_rdataset_additionaldata().
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*
- * Any error that dns_rdata_additionaldata() can return.
+ *\li Any error that dns_rdata_additionaldata() can return.
*/
isc_result_t
dns_rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
dns_rdataset_t *nsec, dns_rdataset_t *nsecsig);
-/*
+/*%<
* Return the noqname proof for this record.
*
* Requires:
- * 'rdataset' to be valid and DNS_RDATASETATTR_NOQNAME to be set.
- * 'name' to be valid.
- * 'nsec' and 'nsecsig' to be valid and not associated.
+ *\li 'rdataset' to be valid and #DNS_RDATASETATTR_NOQNAME to be set.
+ *\li 'name' to be valid.
+ *\li 'nsec' and 'nsecsig' to be valid and not associated.
*/
isc_result_t
dns_rdataset_addnoqname(dns_rdataset_t *rdataset, dns_name_t *name);
-/*
+/*%<
* Associate a noqname proof with this record.
- * Sets DNS_RDATASETATTR_NOQNAME if successful.
+ * Sets #DNS_RDATASETATTR_NOQNAME if successful.
* Adjusts the 'rdataset->ttl' to minimum of the 'rdataset->ttl' and
* the 'nsec' and 'rrsig(nsec)' ttl.
*
* Requires:
- * 'rdataset' to be valid and DNS_RDATASETATTR_NOQNAME to be set.
- * 'name' to be valid and have NSEC and RRSIG(NSEC) rdatasets.
+ *\li 'rdataset' to be valid and #DNS_RDATASETATTR_NOQNAME to be set.
+ *\li 'name' to be valid and have NSEC and RRSIG(NSEC) rdatasets.
+ */
+
+isc_result_t
+dns_rdataset_getadditional(dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype,
+ dns_acache_t *acache,
+ dns_zone_t **zonep,
+ dns_db_t **dbp,
+ dns_dbversion_t **versionp,
+ dns_dbnode_t **nodep,
+ dns_name_t *fname,
+ dns_message_t *msg,
+ isc_stdtime_t now);
+/*%<
+ * Get cached additional information from the DB node for a particular
+ * 'rdataset.' 'type' is one of dns_rdatasetadditional_fromauth,
+ * dns_rdatasetadditional_fromcache, and dns_rdatasetadditional_fromglue,
+ * which specifies the origin of the information. 'qtype' is intended to
+ * be used for specifying a particular rdata type in the cached information.
+ *
+ * Requires:
+ * \li 'rdataset' is a valid rdataset.
+ * \li 'acache' can be NULL, in which case this function will simply return
+ * ISC_R_FAILURE.
+ * \li For the other pointers, see dns_acache_getentry().
+ *
+ * Ensures:
+ * \li See dns_acache_getentry().
+ *
+ * Returns:
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_FAILURE - additional information caching is not supported.
+ * \li #ISC_R_NOTFOUND - the corresponding DB node has not cached additional
+ * information for 'rdataset.'
+ * \li Any error that dns_acache_getentry() can return.
+ */
+
+isc_result_t
+dns_rdataset_setadditional(dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype,
+ dns_acache_t *acache,
+ dns_zone_t *zone,
+ dns_db_t *db,
+ dns_dbversion_t *version,
+ dns_dbnode_t *node,
+ dns_name_t *fname);
+/*%<
+ * Set cached additional information to the DB node for a particular
+ * 'rdataset.' See dns_rdataset_getadditional for the semantics of 'type'
+ * and 'qtype'.
+ *
+ * Requires:
+ * \li 'rdataset' is a valid rdataset.
+ * \li 'acache' can be NULL, in which case this function will simply return
+ * ISC_R_FAILURE.
+ * \li For the other pointers, see dns_acache_setentry().
+ *
+ * Ensures:
+ * \li See dns_acache_setentry().
+ *
+ * Returns:
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_FAILURE - additional information caching is not supported.
+ * \li #ISC_R_NOMEMORY
+ * \li Any error that dns_acache_setentry() can return.
+ */
+
+isc_result_t
+dns_rdataset_putadditional(dns_acache_t *acache,
+ dns_rdataset_t *rdataset,
+ dns_rdatasetadditional_t type,
+ dns_rdatatype_t qtype);
+/*%<
+ * Discard cached additional information stored in the DB node for a particular
+ * 'rdataset.' See dns_rdataset_getadditional for the semantics of 'type'
+ * and 'qtype'.
+ *
+ * Requires:
+ * \li 'rdataset' is a valid rdataset.
+ * \li 'acache' can be NULL, in which case this function will simply return
+ * ISC_R_FAILURE.
+ *
+ * Ensures:
+ * \li See dns_acache_cancelentry().
+ *
+ * Returns:
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_FAILURE - additional information caching is not supported.
+ * \li #ISC_R_NOTFOUND - the corresponding DB node has not cached additional
+ * information for 'rdataset.'
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdatasetiter.h b/contrib/bind9/lib/dns/include/dns/rdatasetiter.h
index 198aebb..b2e13f8 100644
--- a/contrib/bind9/lib/dns/include/dns/rdatasetiter.h
+++ b/contrib/bind9/lib/dns/include/dns/rdatasetiter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdatasetiter.h,v 1.14.206.1 2004/03/06 08:13:59 marka Exp $ */
+/* $Id: rdatasetiter.h,v 1.15.18.2 2005/04/29 00:16:19 marka Exp $ */
#ifndef DNS_RDATASETITER_H
#define DNS_RDATASETITER_H 1
@@ -24,9 +24,8 @@
***** Module Info
*****/
-/*
- * DNS Rdataset Iterator
- *
+/*! \file
+ * \brief
* The DNS Rdataset Iterator interface allows iteration of all of the
* rdatasets at a node.
*
@@ -37,25 +36,25 @@
* It is the client's responsibility to call dns_rdataset_disassociate()
* on all rdatasets returned.
*
- * XXX <more> XXX
+ * XXX more XXX
*
* MP:
- * The iterator itself is not locked. The caller must ensure
+ *\li The iterator itself is not locked. The caller must ensure
* synchronization.
*
- * The iterator methods ensure appropriate database locking.
+ *\li The iterator methods ensure appropriate database locking.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
/*****
@@ -85,12 +84,12 @@ typedef struct dns_rdatasetitermethods {
#define DNS_RDATASETITER_MAGIC ISC_MAGIC('D','N','S','i')
#define DNS_RDATASETITER_VALID(i) ISC_MAGIC_VALID(i, DNS_RDATASETITER_MAGIC)
-/*
+/*%
* This structure is actually just the common prefix of a DNS db
* implementation's version of a dns_rdatasetiter_t.
- *
+ * \brief
* Direct use of this structure by clients is forbidden. DB implementations
- * may change the structure. 'magic' must be DNS_RDATASETITER_MAGIC for
+ * may change the structure. 'magic' must be #DNS_RDATASETITER_MAGIC for
* any of the dns_rdatasetiter routines to work. DB implementations must
* maintain all DB rdataset iterator invariants.
*/
@@ -106,64 +105,64 @@ struct dns_rdatasetiter {
void
dns_rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp);
-/*
+/*%<
* Destroy '*iteratorp'.
*
* Requires:
*
- * '*iteratorp' is a valid iterator.
+ *\li '*iteratorp' is a valid iterator.
*
* Ensures:
*
- * All resources used by the iterator are freed.
+ *\li All resources used by the iterator are freed.
*
- * *iteratorp == NULL.
+ *\li *iteratorp == NULL.
*/
isc_result_t
dns_rdatasetiter_first(dns_rdatasetiter_t *iterator);
-/*
+/*%<
* Move the rdataset cursor to the first rdataset at the node (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no rdatasets at the node.
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMORE There are no rdatasets at the node.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
isc_result_t
dns_rdatasetiter_next(dns_rdatasetiter_t *iterator);
-/*
+/*%<
* Move the rdataset cursor to the next rdataset at the node (if any).
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE There are no more rdatasets at the
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMORE There are no more rdatasets at the
* node.
*
- * Other results are possible, depending on the DB implementation.
+ *\li Other results are possible, depending on the DB implementation.
*/
void
dns_rdatasetiter_current(dns_rdatasetiter_t *iterator,
dns_rdataset_t *rdataset);
-/*
+/*%<
* Return the current rdataset.
*
* Requires:
- * 'iterator' is a valid iterator.
+ *\li 'iterator' is a valid iterator.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
- * The rdataset cursor of 'iterator' is at a valid location (i.e. the
- * result of last call to a cursor movement command was ISC_R_SUCCESS).
+ *\li The rdataset cursor of 'iterator' is at a valid location (i.e. the
+ * result of last call to a cursor movement command was #ISC_R_SUCCESS).
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdataslab.h b/contrib/bind9/lib/dns/include/dns/rdataslab.h
index a0912db..b693a71 100644
--- a/contrib/bind9/lib/dns/include/dns/rdataslab.h
+++ b/contrib/bind9/lib/dns/include/dns/rdataslab.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,34 +15,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataslab.h,v 1.20.2.2.2.4 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: rdataslab.h,v 1.25.18.2 2005/04/29 00:16:19 marka Exp $ */
#ifndef DNS_RDATASLAB_H
#define DNS_RDATASLAB_H 1
-/*
- * DNS Rdata Slab
- *
+/*! \file
+ * \brief
* Implements storage of rdatasets into slabs of memory.
*
* MP:
- * Clients of this module must impose any required synchronization.
+ *\li Clients of this module must impose any required synchronization.
*
* Reliability:
- * This module deals with low-level byte streams. Errors in any of
+ *\li This module deals with low-level byte streams. Errors in any of
* the functions are likely to crash the server or corrupt memory.
*
- * If the caller passes invalid memory references, these functions are
+ *\li If the caller passes invalid memory references, these functions are
* likely to crash the server or corrupt memory.
*
* Resources:
- * None.
+ *\li None.
*
* Security:
- * None.
+ *\li None.
*
* Standards:
- * None.
+ *\li None.
*/
/***
@@ -65,22 +64,22 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
isc_region_t *region, unsigned int reservelen);
-/*
+/*%<
* Slabify a rdataset. The slab area will be allocated and returned
* in 'region'.
*
* Requires:
- * 'rdataset' is valid.
+ *\li 'rdataset' is valid.
*
* Ensures:
- * 'region' will have base pointing to the start of allocated memory,
+ *\li 'region' will have base pointing to the start of allocated memory,
* with the slabified region beginning at region->base + reservelen.
* region->length contains the total length allocated.
*
* Returns:
- * ISC_R_SUCCESS - successful completion
- * ISC_R_NOMEMORY - no memory.
- * <XXX others>
+ *\li ISC_R_SUCCESS - successful completion
+ *\li ISC_R_NOMEMORY - no memory.
+ *\li XXX others
*/
void
@@ -88,27 +87,26 @@ dns_rdataslab_tordataset(unsigned char *slab, unsigned int reservelen,
dns_rdataclass_t rdclass, dns_rdatatype_t rdtype,
dns_rdatatype_t covers, dns_ttl_t ttl,
dns_rdataset_t *rdataset);
-/*
+/*%<
* Construct an rdataset from a slab.
*
* Requires:
- * 'slab' points to a slab.
- * 'rdataset' is disassociated.
+ *\li 'slab' points to a slab.
+ *\li 'rdataset' is disassociated.
*
* Ensures:
- * 'rdataset' is associated and points to a valid rdataest.
+ *\li 'rdataset' is associated and points to a valid rdataest.
*/
-
unsigned int
dns_rdataslab_size(unsigned char *slab, unsigned int reservelen);
-/*
+/*%<
* Return the total size of an rdataslab.
*
* Requires:
- * 'slab' points to a slab.
+ *\li 'slab' points to a slab.
*
* Returns:
- * The number of bytes in the slab, including the reservelen.
+ *\li The number of bytes in the slab, including the reservelen.
*/
isc_result_t
@@ -116,7 +114,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
unsigned int reservelen, isc_mem_t *mctx,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
unsigned int flags, unsigned char **tslabp);
-/*
+/*%<
* Merge 'oslab' and 'nslab'.
*/
@@ -125,7 +123,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
unsigned int reservelen, isc_mem_t *mctx,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
unsigned int flags, unsigned char **tslabp);
-/*
+/*%<
* Subtract 'sslab' from 'mslab'. If 'exact' is true then all elements
* of 'sslab' must exist in 'mslab'.
*
@@ -136,30 +134,28 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
isc_boolean_t
dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
unsigned int reservelen);
-
-/*
+/*%<
* Compare two rdataslabs for equality. This does _not_ do a full
* DNSSEC comparison.
*
* Requires:
- * 'slab1' and 'slab2' point to slabs.
+ *\li 'slab1' and 'slab2' point to slabs.
*
* Returns:
- * ISC_TRUE if the slabs are equal, ISC_FALSE otherwise.
+ *\li ISC_TRUE if the slabs are equal, ISC_FALSE otherwise.
*/
-
isc_boolean_t
dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
unsigned int reservelen, dns_rdataclass_t rdclass,
dns_rdatatype_t type);
-/*
+/*%<
* Compare two rdataslabs for DNSSEC equality.
*
* Requires:
- * 'slab1' and 'slab2' point to slabs.
+ *\li 'slab1' and 'slab2' point to slabs.
*
* Returns:
- * ISC_TRUE if the slabs are equal, ISC_FALSE otherwise.
+ *\li ISC_TRUE if the slabs are equal, #ISC_FALSE otherwise.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdatatype.h b/contrib/bind9/lib/dns/include/dns/rdatatype.h
index 0fa865d..40a884d 100644
--- a/contrib/bind9/lib/dns/include/dns/rdatatype.h
+++ b/contrib/bind9/lib/dns/include/dns/rdatatype.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdatatype.h,v 1.17.206.1 2004/03/06 08:13:59 marka Exp $ */
+/* $Id: rdatatype.h,v 1.18.18.2 2005/04/29 00:16:20 marka Exp $ */
#ifndef DNS_RDATATYPE_H
#define DNS_RDATATYPE_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,49 +30,49 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_rdatatype_fromtext(dns_rdatatype_t *typep, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNS rdata type.
*
* Requires:
- * 'typep' is a valid pointer.
+ *\li 'typep' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * DNS_R_UNKNOWN type is unknown
+ *\li ISC_R_SUCCESS on success
+ *\li DNS_R_UNKNOWN type is unknown
*/
isc_result_t
dns_rdatatype_totext(dns_rdatatype_t type, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of type 'type' into 'target'.
*
* Requires:
- * 'type' is a valid type.
+ *\li 'type' is a valid type.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
- * Ensures:
- * If the result is success:
- * The used space in 'target' is updated.
+ * Ensures,
+ * if the result is success:
+ *\li The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li #ISC_R_SUCCESS on success
+ *\li #ISC_R_NOSPACE target buffer is too small
*/
void
dns_rdatatype_format(dns_rdatatype_t rdtype,
char *array, unsigned int size);
-/*
+/*%<
* Format a human-readable representation of the type 'rdtype'
* into the character array 'array', which is of size 'size'.
* The resulting string is guaranteed to be null-terminated.
*/
#define DNS_RDATATYPE_FORMATSIZE sizeof("TYPE65535")
-/*
+/*%<
* Minimum size of array to pass to dns_rdatatype_format().
* May need to be adjusted if a new RR type with a very long
* name is defined.
diff --git a/contrib/bind9/lib/dns/include/dns/request.h b/contrib/bind9/lib/dns/include/dns/request.h
index b3e7bcd..b858a9e 100644
--- a/contrib/bind9/lib/dns/include/dns/request.h
+++ b/contrib/bind9/lib/dns/include/dns/request.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: request.h,v 1.17.12.5 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: request.h,v 1.21.18.2 2005/04/29 00:16:20 marka Exp $ */
#ifndef DNS_REQUEST_H
#define DNS_REQUEST_H 1
@@ -24,21 +24,21 @@
***** Module Info
*****/
-/*
- * DNS Request
+/*! \file
*
+ * \brief
* The request module provides simple request/response services useful for
* sending SOA queries, DNS Notify messages, and dynamic update requests.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*/
#include <isc/lang.h>
@@ -62,102 +62,101 @@ dns_requestmgr_create(isc_mem_t *mctx, isc_timermgr_t *timermgr,
dns_dispatchmgr_t *dispatchmgr,
dns_dispatch_t *dispatchv4, dns_dispatch_t *dispatchv6,
dns_requestmgr_t **requestmgrp);
-/*
+/*%<
* Create a request manager.
*
* Requires:
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*
- * 'timermgr' is a valid timer manager.
+ *\li 'timermgr' is a valid timer manager.
*
- * 'socketmgr' is a valid socket manager.
+ *\li 'socketmgr' is a valid socket manager.
*
- * 'taskmgr' is a valid task manager.
+ *\li 'taskmgr' is a valid task manager.
*
- * 'dispatchv4' is a valid dispatcher with an IPv4 UDP socket, or is NULL.
+ *\li 'dispatchv4' is a valid dispatcher with an IPv4 UDP socket, or is NULL.
*
- * 'dispatchv6' is a valid dispatcher with an IPv6 UDP socket, or is NULL.
+ *\li 'dispatchv6' is a valid dispatcher with an IPv6 UDP socket, or is NULL.
*
- * requestmgrp != NULL && *requestmgrp == NULL
+ *\li requestmgrp != NULL && *requestmgrp == NULL
*
* Ensures:
*
- * On success, *requestmgrp is a valid request manager.
+ *\li On success, *requestmgrp is a valid request manager.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Any other result indicates failure.
+ *\li Any other result indicates failure.
*/
void
dns_requestmgr_whenshutdown(dns_requestmgr_t *requestmgr, isc_task_t *task,
isc_event_t **eventp);
-/*
+/*%<
* Send '*eventp' to 'task' when 'requestmgr' has completed shutdown.
*
* Notes:
*
- * It is not safe to detach the last reference to 'requestmgr' until
+ *\li It is not safe to detach the last reference to 'requestmgr' until
* shutdown is complete.
*
* Requires:
*
- * 'requestmgr' is a valid request manager.
+ *\li 'requestmgr' is a valid request manager.
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * *eventp is a valid event.
+ *\li *eventp is a valid event.
*
* Ensures:
*
- * *eventp == NULL.
+ *\li *eventp == NULL.
*/
void
dns_requestmgr_shutdown(dns_requestmgr_t *requestmgr);
-/*
+/*%<
* Start the shutdown process for 'requestmgr'.
*
* Notes:
*
- * This call has no effect if the request manager is already shutting
+ *\li This call has no effect if the request manager is already shutting
* down.
*
* Requires:
*
- * 'requestmgr' is a valid requestmgr.
+ *\li 'requestmgr' is a valid requestmgr.
*/
void
dns_requestmgr_attach(dns_requestmgr_t *source, dns_requestmgr_t **targetp);
-/*
+/*%<
* Attach to the request manager. dns_requestmgr_shutdown() must not
* have been called on 'source' prior to calling dns_requestmgr_attach().
*
* Requires:
*
- * 'source' is a valid requestmgr.
+ *\li 'source' is a valid requestmgr.
*
- * 'targetp' to be non NULL and '*targetp' to be NULL.
+ *\li 'targetp' to be non NULL and '*targetp' to be NULL.
*/
void
dns_requestmgr_detach(dns_requestmgr_t **requestmgrp);
-/*
- *
+/*%<
* Detach from the given requestmgr. If this is the final detach
* requestmgr will be destroyed. dns_requestmgr_shutdown() must
* be called before the final detach.
*
* Requires:
*
- * '*requestmgrp' is a valid requestmgr.
+ *\li '*requestmgrp' is a valid requestmgr.
*
* Ensures:
- * '*requestmgrp' is NULL.
+ *\li '*requestmgrp' is NULL.
*/
isc_result_t
@@ -167,31 +166,32 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
unsigned int timeout, isc_task_t *task,
isc_taskaction_t action, void *arg,
dns_request_t **requestp);
-/*
+/*%<
* Create and send a request.
*
* Notes:
*
- * 'message' will be rendered and sent to 'address'. If the
- * DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
+ *\li 'message' will be rendered and sent to 'address'. If the
+ * #DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
* will timeout after 'timeout' seconds.
*
- * When the request completes, successfully, due to a timeout, or
+ *\li When the request completes, successfully, due to a timeout, or
* because it was canceled, a completion event will be sent to 'task'.
*
* Requires:
*
- * 'message' is a valid DNS message.
+ *\li 'message' is a valid DNS message.
*
- * 'address' is a valid sockaddr.
+ *\li 'address' is a valid sockaddr.
*
- * 'timeout' > 0
+ *\li 'timeout' > 0
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * requestp != NULL && *requestp == NULL
+ *\li requestp != NULL && *requestp == NULL
*/
+/*% See dns_request_createvia3() */
isc_result_t
dns_request_createvia(dns_requestmgr_t *requestmgr, dns_message_t *message,
isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
@@ -200,6 +200,7 @@ dns_request_createvia(dns_requestmgr_t *requestmgr, dns_message_t *message,
isc_taskaction_t action, void *arg,
dns_request_t **requestp);
+/*% See dns_request_createvia3() */
isc_result_t
dns_request_createvia2(dns_requestmgr_t *requestmgr, dns_message_t *message,
isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
@@ -216,36 +217,37 @@ dns_request_createvia3(dns_requestmgr_t *requestmgr, dns_message_t *message,
unsigned int udpretries, isc_task_t *task,
isc_taskaction_t action, void *arg,
dns_request_t **requestp);
-/*
+/*%<
* Create and send a request.
*
* Notes:
*
- * 'message' will be rendered and sent to 'address'. If the
- * DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
+ *\li 'message' will be rendered and sent to 'address'. If the
+ * #DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
* will timeout after 'timeout' seconds. UDP requests will be resent
* at 'udptimeout' intervals if non-zero or 'udpretries' is non-zero.
*
- * When the request completes, successfully, due to a timeout, or
+ *\li When the request completes, successfully, due to a timeout, or
* because it was canceled, a completion event will be sent to 'task'.
*
* Requires:
*
- * 'message' is a valid DNS message.
+ *\li 'message' is a valid DNS message.
*
- * 'dstaddr' is a valid sockaddr.
+ *\li 'dstaddr' is a valid sockaddr.
*
- * 'srcaddr' is a valid sockaddr or NULL.
+ *\li 'srcaddr' is a valid sockaddr or NULL.
*
- * 'srcaddr' and 'dstaddr' are the same protocol family.
+ *\li 'srcaddr' and 'dstaddr' are the same protocol family.
*
- * 'timeout' > 0
+ *\li 'timeout' > 0
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * requestp != NULL && *requestp == NULL
+ *\li requestp != NULL && *requestp == NULL
*/
+/*% See dns_request_createraw3() */
isc_result_t
dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
@@ -253,6 +255,7 @@ dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
isc_task_t *task, isc_taskaction_t action, void *arg,
dns_request_t **requestp);
+/*% See dns_request_createraw3() */
isc_result_t
dns_request_createraw2(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
@@ -268,55 +271,55 @@ dns_request_createraw3(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
unsigned int udptimeout, unsigned int udpretries,
isc_task_t *task, isc_taskaction_t action, void *arg,
dns_request_t **requestp);
-/*
- * Create and send a request.
+/*!<
+ * \brief Create and send a request.
*
* Notes:
*
- * 'msgbuf' will be sent to 'destaddr' after setting the id. If the
- * DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
+ *\li 'msgbuf' will be sent to 'destaddr' after setting the id. If the
+ * #DNS_REQUESTOPT_TCP option is set, TCP will be used. The request
* will timeout after 'timeout' seconds. UDP requests will be resent
* at 'udptimeout' intervals if non-zero or if 'udpretries' is not zero.
*
- * When the request completes, successfully, due to a timeout, or
+ *\li When the request completes, successfully, due to a timeout, or
* because it was canceled, a completion event will be sent to 'task'.
*
* Requires:
*
- * 'msgbuf' is a valid DNS message in compressed wire format.
+ *\li 'msgbuf' is a valid DNS message in compressed wire format.
*
- * 'destaddr' is a valid sockaddr.
+ *\li 'destaddr' is a valid sockaddr.
*
- * 'srcaddr' is a valid sockaddr or NULL.
+ *\li 'srcaddr' is a valid sockaddr or NULL.
*
- * 'srcaddr' and 'dstaddr' are the same protocol family.
+ *\li 'srcaddr' and 'dstaddr' are the same protocol family.
*
- * 'timeout' > 0
+ *\li 'timeout' > 0
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * requestp != NULL && *requestp == NULL
+ *\li requestp != NULL && *requestp == NULL
*/
void
dns_request_cancel(dns_request_t *request);
-/*
+/*%<
* Cancel 'request'.
*
* Requires:
*
- * 'request' is a valid request.
+ *\li 'request' is a valid request.
*
* Ensures:
*
- * If the completion event for 'request' has not yet been sent, it
+ *\li If the completion event for 'request' has not yet been sent, it
* will be sent, and the result code will be ISC_R_CANCELED.
*/
isc_result_t
dns_request_getresponse(dns_request_t *request, dns_message_t *message,
unsigned int options);
-/*
+/*%<
* Get the response to 'request' by filling in 'message'.
*
* 'options' is passed to dns_message_parse(). See dns_message_parse()
@@ -324,46 +327,46 @@ dns_request_getresponse(dns_request_t *request, dns_message_t *message,
*
* Requires:
*
- * 'request' is a valid request for which the caller has received the
+ *\li 'request' is a valid request for which the caller has received the
* completion event.
*
- * The result code of the completion event was ISC_R_SUCCESS.
+ *\li The result code of the completion event was #ISC_R_SUCCESS.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li ISC_R_SUCCESS
*
- * Any result that dns_message_parse() can return.
+ *\li Any result that dns_message_parse() can return.
*/
isc_boolean_t
dns_request_usedtcp(dns_request_t *request);
-/*
- * Return whether this query used TCP or not. Setting DNS_REQUESTOPT_TCP
+/*%<
+ * Return whether this query used TCP or not. Setting #DNS_REQUESTOPT_TCP
* in the call to dns_request_create() will cause the function to return
- * ISC_TRUE, othewise the result is based on the query message size.
+ * #ISC_TRUE, othewise the result is based on the query message size.
*
* Requires:
- * 'request' is a valid request.
+ *\li 'request' is a valid request.
*
* Returns:
- * ISC_TRUE if TCP was used.
- * ISC_FALSE if UDP was used.
+ *\li ISC_TRUE if TCP was used.
+ *\li ISC_FALSE if UDP was used.
*/
void
dns_request_destroy(dns_request_t **requestp);
-/*
+/*%<
* Destroy 'request'.
*
* Requires:
*
- * 'request' is a valid request for which the caller has received the
+ *\li 'request' is a valid request for which the caller has received the
* completion event.
*
* Ensures:
*
- * *requestp == NULL
+ *\li *requestp == NULL
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/resolver.h b/contrib/bind9/lib/dns/include/dns/resolver.h
index 8e3e632..4e0e6a0 100644
--- a/contrib/bind9/lib/dns/include/dns/resolver.h
+++ b/contrib/bind9/lib/dns/include/dns/resolver.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.h,v 1.34.12.9 2006/02/01 23:48:51 marka Exp $ */
+/* $Id: resolver.h,v 1.40.18.11 2006/02/01 22:39:17 marka Exp $ */
#ifndef DNS_RESOLVER_H
#define DNS_RESOLVER_H 1
@@ -24,9 +24,9 @@
***** Module Info
*****/
-/*
- * DNS Resolver
+/*! \file
*
+ * \brief
* This is the BIND 9 resolver, the module responsible for resolving DNS
* requests by iteratively querying authoritative servers and following
* referrals. This is a "full resolver", not to be confused with
@@ -35,21 +35,21 @@
* daemon the stub resolver talks to.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * RFCs: 1034, 1035, 2181, <TBS>
- * Drafts: <TBS>
+ *\li RFCs: 1034, 1035, 2181, TBS
+ *\li Drafts: TBS
*/
#include <isc/lang.h>
@@ -60,14 +60,14 @@
ISC_LANG_BEGINDECLS
-/*
+/*%
* A dns_fetchevent_t is sent when a 'fetch' completes. Any of 'db',
* 'node', 'rdataset', and 'sigrdataset' may be bound. It is the
* receiver's responsibility to detach before freeing the event.
- *
- * 'rdataset' and 'sigrdataset' are the values that were supplied when
- * dns_resolver_createfetch() was called. They are returned to the
- * caller so that they may be freed.
+ * \brief
+ * 'rdataset', 'sigrdataset', 'client' and 'id' are the values that were
+ * supplied when dns_resolver_createfetch() was called. They are returned
+ * to the caller so that they may be freed.
*/
typedef struct dns_fetchevent {
ISC_EVENT_COMMON(struct dns_fetchevent);
@@ -79,17 +79,25 @@ typedef struct dns_fetchevent {
dns_rdataset_t * rdataset;
dns_rdataset_t * sigrdataset;
dns_fixedname_t foundname;
+ isc_sockaddr_t * client;
+ dns_messageid_t id;
} dns_fetchevent_t;
/*
* Options that modify how a 'fetch' is done.
*/
-#define DNS_FETCHOPT_TCP 0x01 /* Use TCP. */
-#define DNS_FETCHOPT_UNSHARED 0x02 /* See below. */
-#define DNS_FETCHOPT_RECURSIVE 0x04 /* Set RD? */
-#define DNS_FETCHOPT_NOEDNS0 0x08 /* Do not use EDNS. */
-#define DNS_FETCHOPT_FORWARDONLY 0x10 /* Only use forwarders. */
-#define DNS_FETCHOPT_NOVALIDATE 0x20 /* Disable validation. */
+#define DNS_FETCHOPT_TCP 0x01 /*%< Use TCP. */
+#define DNS_FETCHOPT_UNSHARED 0x02 /*%< See below. */
+#define DNS_FETCHOPT_RECURSIVE 0x04 /*%< Set RD? */
+#define DNS_FETCHOPT_NOEDNS0 0x08 /*%< Do not use EDNS. */
+#define DNS_FETCHOPT_FORWARDONLY 0x10 /*%< Only use forwarders. */
+#define DNS_FETCHOPT_NOVALIDATE 0x20 /*%< Disable validation. */
+#define DNS_FETCHOPT_EDNS512 0x40 /*%< Advertise a 512 byte
+ UDP buffer. */
+
+#define DNS_FETCHOPT_EDNSVERSIONSET 0x00800000
+#define DNS_FETCHOPT_EDNSVERSIONMASK 0xff000000
+#define DNS_FETCHOPT_EDNSVERSIONSHIFT 24
/*
* XXXRTH Should this API be made semi-private? (I.e.
@@ -110,114 +118,114 @@ dns_resolver_create(dns_view_t *view,
dns_dispatch_t *dispatchv6,
dns_resolver_t **resp);
-/*
+/*%<
* Create a resolver.
*
* Notes:
*
- * Generally, applications should not create a resolver directly, but
+ *\li Generally, applications should not create a resolver directly, but
* should instead call dns_view_createresolver().
*
- * No options are currently defined.
+ *\li No options are currently defined.
*
* Requires:
*
- * 'view' is a valid view.
+ *\li 'view' is a valid view.
*
- * 'taskmgr' is a valid task manager.
+ *\li 'taskmgr' is a valid task manager.
*
- * 'ntasks' > 0.
+ *\li 'ntasks' > 0.
*
- * 'socketmgr' is a valid socket manager.
+ *\li 'socketmgr' is a valid socket manager.
*
- * 'timermgr' is a valid timer manager.
+ *\li 'timermgr' is a valid timer manager.
*
- * 'dispatchv4' is a valid dispatcher with an IPv4 UDP socket, or is NULL.
+ *\li 'dispatchv4' is a valid dispatcher with an IPv4 UDP socket, or is NULL.
*
- * 'dispatchv6' is a valid dispatcher with an IPv6 UDP socket, or is NULL.
+ *\li 'dispatchv6' is a valid dispatcher with an IPv6 UDP socket, or is NULL.
*
- * resp != NULL && *resp == NULL.
+ *\li resp != NULL && *resp == NULL.
*
* Returns:
*
- * ISC_R_SUCCESS On success.
+ *\li #ISC_R_SUCCESS On success.
*
- * Anything else Failure.
+ *\li Anything else Failure.
*/
void
dns_resolver_freeze(dns_resolver_t *res);
-/*
+/*%<
* Freeze resolver.
*
* Notes:
*
- * Certain configuration changes cannot be made after the resolver
+ *\li Certain configuration changes cannot be made after the resolver
* is frozen. Fetches cannot be created until the resolver is frozen.
*
* Requires:
*
- * 'res' is a valid, unfrozen resolver.
+ *\li 'res' is a valid, unfrozen resolver.
*
* Ensures:
*
- * 'res' is frozen.
+ *\li 'res' is frozen.
*/
void
dns_resolver_prime(dns_resolver_t *res);
-/*
+/*%<
* Prime resolver.
*
* Notes:
*
- * Resolvers which have a forwarding policy other than dns_fwdpolicy_only
+ *\li Resolvers which have a forwarding policy other than dns_fwdpolicy_only
* need to be primed with the root nameservers, otherwise the root
* nameserver hints data may be used indefinitely. This function requests
* that the resolver start a priming fetch, if it isn't already priming.
*
* Requires:
*
- * 'res' is a valid, frozen resolver.
+ *\li 'res' is a valid, frozen resolver.
*/
void
dns_resolver_whenshutdown(dns_resolver_t *res, isc_task_t *task,
isc_event_t **eventp);
-/*
+/*%<
* Send '*eventp' to 'task' when 'res' has completed shutdown.
*
* Notes:
*
- * It is not safe to detach the last reference to 'res' until
+ *\li It is not safe to detach the last reference to 'res' until
* shutdown is complete.
*
* Requires:
*
- * 'res' is a valid resolver.
+ *\li 'res' is a valid resolver.
*
- * 'task' is a valid task.
+ *\li 'task' is a valid task.
*
- * *eventp is a valid event.
+ *\li *eventp is a valid event.
*
* Ensures:
*
- * *eventp == NULL.
+ *\li *eventp == NULL.
*/
void
dns_resolver_shutdown(dns_resolver_t *res);
-/*
+/*%<
* Start the shutdown process for 'res'.
*
* Notes:
*
- * This call has no effect if the resolver is already shutting down.
+ *\li This call has no effect if the resolver is already shutting down.
*
* Requires:
*
- * 'res' is a valid resolver.
+ *\li 'res' is a valid resolver.
*/
void
@@ -236,88 +244,108 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
dns_rdataset_t *rdataset,
dns_rdataset_t *sigrdataset,
dns_fetch_t **fetchp);
-/*
+
+isc_result_t
+dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+ dns_rdatatype_t type,
+ dns_name_t *domain, dns_rdataset_t *nameservers,
+ dns_forwarders_t *forwarders,
+ isc_sockaddr_t *client, isc_uint16_t id,
+ unsigned int options, isc_task_t *task,
+ isc_taskaction_t action, void *arg,
+ dns_rdataset_t *rdataset,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp);
+/*%<
* Recurse to answer a question.
*
* Notes:
*
- * This call starts a query for 'name', type 'type'.
+ *\li This call starts a query for 'name', type 'type'.
*
- * The 'domain' is a parent domain of 'name' for which
+ *\li The 'domain' is a parent domain of 'name' for which
* a set of name servers 'nameservers' is known. If no
* such name server information is available, set
* 'domain' and 'nameservers' to NULL.
*
- * 'forwarders' is unimplemented, and subject to change when
+ *\li 'forwarders' is unimplemented, and subject to change when
* we figure out how selective forwarding will work.
*
- * When the fetch completes (successfully or otherwise), a
- * DNS_EVENT_FETCHDONE event with action 'action' and arg 'arg' will be
+ *\li When the fetch completes (successfully or otherwise), a
+ * #DNS_EVENT_FETCHDONE event with action 'action' and arg 'arg' will be
* posted to 'task'.
*
- * The values of 'rdataset' and 'sigrdataset' will be returned in
+ *\li The values of 'rdataset' and 'sigrdataset' will be returned in
* the FETCHDONE event.
*
+ *\li 'client' and 'id' are used for duplicate query detection. '*client'
+ * must remain stable until after 'action' has been called or
+ * dns_resolver_cancelfetch() is called.
+ *
* Requires:
*
- * 'res' is a valid resolver that has been frozen.
+ *\li 'res' is a valid resolver that has been frozen.
*
- * 'name' is a valid name.
+ *\li 'name' is a valid name.
*
- * 'type' is not a meta type other than ANY.
+ *\li 'type' is not a meta type other than ANY.
*
- * 'domain' is a valid name or NULL.
+ *\li 'domain' is a valid name or NULL.
*
- * 'nameservers' is a valid NS rdataset (whose owner name is 'domain')
+ *\li 'nameservers' is a valid NS rdataset (whose owner name is 'domain')
* iff. 'domain' is not NULL.
*
- * 'forwarders' is NULL.
+ *\li 'forwarders' is NULL.
+ *
+ *\li 'client' is a valid sockaddr or NULL.
*
- * 'options' contains valid options.
+ *\li 'options' contains valid options.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
- * 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
+ *\li 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
*
- * fetchp != NULL && *fetchp == NULL.
+ *\li fetchp != NULL && *fetchp == NULL.
*
* Returns:
*
- * ISC_R_SUCCESS Success
+ *\li #ISC_R_SUCCESS Success
+ *\li #DNS_R_DUPLICATE
+ *\li #DNS_R_DROP
*
- * Many other values are possible, all of which indicate failure.
+ *\li Many other values are possible, all of which indicate failure.
*/
void
dns_resolver_cancelfetch(dns_fetch_t *fetch);
-/*
+/*%<
* Cancel 'fetch'.
*
* Notes:
*
- * If 'fetch' has not completed, post its FETCHDONE event with a
- * result code of ISC_R_CANCELED.
+ *\li If 'fetch' has not completed, post its FETCHDONE event with a
+ * result code of #ISC_R_CANCELED.
*
* Requires:
*
- * 'fetch' is a valid fetch.
+ *\li 'fetch' is a valid fetch.
*/
void
dns_resolver_destroyfetch(dns_fetch_t **fetchp);
-/*
+/*%<
* Destroy 'fetch'.
*
* Requires:
*
- * '*fetchp' is a valid fetch.
+ *\li '*fetchp' is a valid fetch.
*
- * The caller has received the FETCHDONE event (either because the
+ *\li The caller has received the FETCHDONE event (either because the
* fetch completed or because dns_resolver_cancelfetch() was called).
*
* Ensures:
*
- * *fetchp == NULL.
+ *\li *fetchp == NULL.
*/
dns_dispatchmgr_t *
@@ -337,25 +365,25 @@ dns_resolver_taskmgr(dns_resolver_t *resolver);
isc_uint32_t
dns_resolver_getlamettl(dns_resolver_t *resolver);
-/*
+/*%<
* Get the resolver's lame-ttl. zero => no lame processing.
*
* Requires:
- * 'resolver' to be valid.
+ *\li 'resolver' to be valid.
*/
void
dns_resolver_setlamettl(dns_resolver_t *resolver, isc_uint32_t lame_ttl);
-/*
+/*%<
* Set the resolver's lame-ttl. zero => no lame processing.
*
* Requires:
- * 'resolver' to be valid.
+ *\li 'resolver' to be valid.
*/
unsigned int
dns_resolver_nrunning(dns_resolver_t *resolver);
-/*
+/*%<
* Return the number of currently running resolutions in this
* resolver. This is may be less than the number of outstanding
* fetches due to multiple identical fetches, or more than the
@@ -366,56 +394,62 @@ dns_resolver_nrunning(dns_resolver_t *resolver);
isc_result_t
dns_resolver_addalternate(dns_resolver_t *resolver, isc_sockaddr_t *alt,
dns_name_t *name, in_port_t port);
-/*
+/*%<
* Add alternate addresses to be tried in the event that the nameservers
* for a zone are not available in the address families supported by the
* operating system.
*
* Require:
- * only one of 'name' or 'alt' to be valid.
+ * \li only one of 'name' or 'alt' to be valid.
*/
void
dns_resolver_setudpsize(dns_resolver_t *resolver, isc_uint16_t udpsize);
-/*
+/*%<
* Set the EDNS UDP buffer size advertised by the server.
*/
isc_uint16_t
dns_resolver_getudpsize(dns_resolver_t *resolver);
-/*
+/*%<
* Get the current EDNS UDP buffer size.
*/
void
dns_resolver_reset_algorithms(dns_resolver_t *resolver);
-/*
+/*%<
* Clear the disabled DNSSEC algorithms.
*/
isc_result_t
dns_resolver_disable_algorithm(dns_resolver_t *resolver, dns_name_t *name,
unsigned int alg);
-/*
+/*%<
* Mark the give DNSSEC algorithm as disabled and below 'name'.
* Valid algorithms are less than 256.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_RANGE
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_RANGE
+ *\li #ISC_R_NOMEMORY
*/
isc_boolean_t
dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
unsigned int alg);
-/*
+/*%<
* Check if the given algorithm is supported by this resolver.
* This checks if the algorithm has been disabled via
* dns_resolver_disable_algorithm() then the underlying
* crypto libraries if not specifically disabled.
*/
+isc_boolean_t
+dns_resolver_digest_supported(dns_resolver_t *resolver, unsigned int digest_type);
+/*%<
+ * Is this digest type supported.
+ */
+
void
dns_resolver_resetmustbesecure(dns_resolver_t *resolver);
@@ -426,6 +460,20 @@ dns_resolver_setmustbesecure(dns_resolver_t *resolver, dns_name_t *name,
isc_boolean_t
dns_resolver_getmustbesecure(dns_resolver_t *resolver, dns_name_t *name);
+void
+dns_resolver_setclientsperquery(dns_resolver_t *resolver,
+ isc_uint32_t min, isc_uint32_t max);
+
+void
+dns_resolver_getclientsperquery(dns_resolver_t *resolver, isc_uint32_t *cur,
+ isc_uint32_t *min, isc_uint32_t *max);
+
+isc_boolean_t
+dns_resolver_getzeronosoattl(dns_resolver_t *resolver);
+
+void
+dns_resolver_setzeronosoattl(dns_resolver_t *resolver, isc_boolean_t state);
+
ISC_LANG_ENDDECLS
#endif /* DNS_RESOLVER_H */
diff --git a/contrib/bind9/lib/dns/include/dns/result.h b/contrib/bind9/lib/dns/include/dns/result.h
index f1a71d9..db5481b 100644
--- a/contrib/bind9/lib/dns/include/dns/result.h
+++ b/contrib/bind9/lib/dns/include/dns/result.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.81.2.7.2.13 2004/05/14 05:06:41 marka Exp $ */
+/* $Id: result.h,v 1.104.10.6 2005/06/17 02:04:32 marka Exp $ */
#ifndef DNS_RESULT_H
#define DNS_RESULT_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/resultclass.h>
@@ -143,8 +145,10 @@
#define DNS_R_UNKNOWNCOMMAND (ISC_RESULTCLASS_DNS + 99)
#define DNS_R_MUSTBESECURE (ISC_RESULTCLASS_DNS + 100)
#define DNS_R_COVERINGNSEC (ISC_RESULTCLASS_DNS + 101)
+#define DNS_R_MXISADDRESS (ISC_RESULTCLASS_DNS + 102)
+#define DNS_R_DUPLICATE (ISC_RESULTCLASS_DNS + 103)
-#define DNS_R_NRESULTS 102 /* Number of results */
+#define DNS_R_NRESULTS 104 /*%< Number of results */
/*
* DNS wire format rcodes.
@@ -165,7 +169,7 @@
#define DNS_R_NOTZONE (ISC_RESULTCLASS_DNSRCODE + 10)
#define DNS_R_BADVERS (ISC_RESULTCLASS_DNSRCODE + 16)
-#define DNS_R_NRCODERESULTS 17 /* Number of rcode results */
+#define DNS_R_NRCODERESULTS 17 /*%< Number of rcode results */
#define DNS_RESULT_ISRCODE(result) \
(ISC_RESULTCLASS_INCLASS(ISC_RESULTCLASS_DNSRCODE, (result)))
diff --git a/contrib/bind9/lib/dns/include/dns/rootns.h b/contrib/bind9/lib/dns/include/dns/rootns.h
index 02da556..a3ddc48 100644
--- a/contrib/bind9/lib/dns/include/dns/rootns.h
+++ b/contrib/bind9/lib/dns/include/dns/rootns.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rootns.h,v 1.8.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: rootns.h,v 1.9.18.3 2005/04/27 05:01:38 sra Exp $ */
#ifndef DNS_ROOTNS_H
#define DNS_ROOTNS_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -30,6 +32,14 @@ isc_result_t
dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
const char *filename, dns_db_t **target);
+void
+dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db);
+/*
+ * Reports differences between hints and the real roots.
+ *
+ * Requires view, hints and (cache) db to be valid.
+ */
+
ISC_LANG_ENDDECLS
#endif /* DNS_ROOTNS_H */
diff --git a/contrib/bind9/lib/dns/include/dns/sdb.h b/contrib/bind9/lib/dns/include/dns/sdb.h
index 5fdeace..de849f9 100644
--- a/contrib/bind9/lib/dns/include/dns/sdb.h
+++ b/contrib/bind9/lib/dns/include/dns/sdb.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sdb.h,v 1.12.12.3 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: sdb.h,v 1.15.18.2 2005/04/29 00:16:21 marka Exp $ */
#ifndef DNS_SDB_H
#define DNS_SDB_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Simple database API.
*/
@@ -40,17 +41,17 @@
*** Types
***/
-/*
+/*%
* A simple database. This is an opaque type.
*/
typedef struct dns_sdb dns_sdb_t;
-/*
+/*%
* A simple database lookup in progress. This is an opaque type.
*/
typedef struct dns_sdblookup dns_sdblookup_t;
-/*
+/*%
* A simple database traversal in progress. This is an opaque type.
*/
typedef struct dns_sdballnodes dns_sdballnodes_t;
@@ -96,7 +97,7 @@ isc_result_t
dns_sdb_register(const char *drivername, const dns_sdbmethods_t *methods,
void *driverdata, unsigned int flags, isc_mem_t *mctx,
dns_sdbimplementation_t **sdbimp);
-/*
+/*%<
* Register a simple database driver for the database type 'drivername',
* implemented by the functions in '*methods'.
*
@@ -126,7 +127,7 @@ dns_sdb_register(const char *drivername, const dns_sdbmethods_t *methods,
* The allnodes function, if non-NULL, fills in an opaque structure to be
* used by a database iterator. This allows the zone to be transferred.
* This may use a considerable amount of memory for large zones, and the
- * zone transfer may not be fully RFC 1035 compliant if the zone is
+ * zone transfer may not be fully RFC1035 compliant if the zone is
* frequently changed.
*
* The create function will be called for each zone configured
@@ -156,19 +157,20 @@ dns_sdb_register(const char *drivername, const dns_sdbmethods_t *methods,
void
dns_sdb_unregister(dns_sdbimplementation_t **sdbimp);
-/*
+/*%<
* Removes the simple database driver from the list of registered database
* types. There must be no active databases of this type when this function
* is called.
*/
+/*% See dns_sdb_putradata() */
isc_result_t
dns_sdb_putrr(dns_sdblookup_t *lookup, const char *type, dns_ttl_t ttl,
const char *data);
isc_result_t
dns_sdb_putrdata(dns_sdblookup_t *lookup, dns_rdatatype_t type, dns_ttl_t ttl,
const unsigned char *rdata, unsigned int rdlen);
-/*
+/*%<
* Add a single resource record to the lookup structure to be
* returned in the query response. dns_sdb_putrr() takes the
* resource record in master file text format as a null-terminated
@@ -176,6 +178,7 @@ dns_sdb_putrdata(dns_sdblookup_t *lookup, dns_rdatatype_t type, dns_ttl_t ttl,
* uncompressed wire format.
*/
+/*% See dns_sdb_putnamerdata() */
isc_result_t
dns_sdb_putnamedrr(dns_sdballnodes_t *allnodes, const char *name,
const char *type, dns_ttl_t ttl, const char *data);
@@ -183,7 +186,7 @@ isc_result_t
dns_sdb_putnamedrdata(dns_sdballnodes_t *allnodes, const char *name,
dns_rdatatype_t type, dns_ttl_t ttl,
const void *rdata, unsigned int rdlen);
-/*
+/*%<
* Add a single resource record to the allnodes structure to be
* included in a zone transfer response, in text or wire
* format as above.
@@ -192,7 +195,7 @@ dns_sdb_putnamedrdata(dns_sdballnodes_t *allnodes, const char *name,
isc_result_t
dns_sdb_putsoa(dns_sdblookup_t *lookup, const char *mname, const char *rname,
isc_uint32_t serial);
-/*
+/*%<
* This function may optionally be called from the 'authority' callback
* to simplify construction of the SOA record for 'zone'. It will
* provide a SOA listing 'mname' as as the master server and 'rname' as
diff --git a/contrib/bind9/lib/dns/include/dns/sdlz.h b/contrib/bind9/lib/dns/include/dns/sdlz.h
new file mode 100644
index 0000000..13ba14a
--- /dev/null
+++ b/contrib/bind9/lib/dns/include/dns/sdlz.h
@@ -0,0 +1,266 @@
+/*
+ * Portions Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+ * USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
+ * conceived and contributed by Rob Butler.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+ * USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: sdlz.h,v 1.2.2.2 2005/09/06 03:47:19 marka Exp $ */
+
+/*! \file */
+
+#ifndef SDLZ_H
+#define SDLZ_H 1
+
+#include <dns/dlz.h>
+
+ISC_LANG_BEGINDECLS
+
+#define DNS_SDLZFLAG_THREADSAFE 0x00000001U
+#define DNS_SDLZFLAG_RELATIVEOWNER 0x00000002U
+#define DNS_SDLZFLAG_RELATIVERDATA 0x00000004U
+
+ /* A simple DLZ database. */
+typedef struct dns_sdlz_db dns_sdlz_db_t;
+
+ /* A simple DLZ database lookup in progress. */
+typedef struct dns_sdlzlookup dns_sdlzlookup_t;
+
+ /* A simple DLZ database traversal in progress. */
+typedef struct dns_sdlzallnodes dns_sdlzallnodes_t;
+
+
+typedef isc_result_t
+(*dns_sdlzallnodesfunc_t)(const char *zone, void *driverarg, void *dbdata,
+ dns_sdlzallnodes_t *allnodes);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface may
+ * supply an all nodes method. This method is called when the DNS
+ * server is performing a zone transfer query, after the allow zone
+ * transfer method has been called. This method is only called if the
+ * allow zone transfer method returned ISC_R_SUCCESS. This method and
+ * the allow zone transfer method are both required for zone transfers
+ * to be supported. If the driver generates data dynamically (instead
+ * of searching in a database for it) it should not implement this
+ * function as a zone transfer would be meaningless. A SDLZ driver
+ * does not have to implement an all nodes method.
+ */
+
+typedef isc_result_t
+(*dns_sdlzallowzonexfr_t)(void *driverarg, void *dbdata, const char *name,
+ const char *client);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface may
+ * supply an allow zone transfer method. This method is called when
+ * the DNS server is performing a zone transfer query, before the all
+ * nodes method can be called. This method and the all node method
+ * are both required for zone transfers to be supported. If the
+ * driver generates data dynamically (instead of searching in a
+ * database for it) it should not implement this function as a zone
+ * transfer would be meaningless. A SDLZ driver does not have to
+ * implement an allow zone transfer method.
+ *
+ * This method should return ISC_R_SUCCESS if the zone is supported by
+ * the database and a zone transfer is allowed for the specified
+ * client. If the zone is supported by the database, but zone
+ * transfers are not allowed for the specified client this method
+ * should return ISC_R_NOPERM.. Lastly the method should return
+ * ISC_R_NOTFOUND if the zone is not supported by the database. If an
+ * error occurs it should return a result code indicating the type of
+ * error.
+ */
+
+typedef isc_result_t
+(*dns_sdlzauthorityfunc_t)(const char *zone, void *driverarg, void *dbdata,
+ dns_sdlzlookup_t *lookup);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface may
+ * supply an authority method. This method is called when the DNS
+ * server is performing a query, after both the find zone and lookup
+ * methods have been called. This method is required if the lookup
+ * function does not supply authority information for the dns
+ * record. A SDLZ driver does not have to implement an authority
+ * method.
+ */
+
+typedef isc_result_t
+(*dns_sdlzcreate_t)(const char *dlzname, unsigned int argc, char *argv[],
+ void *driverarg, void **dbdata);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface may
+ * supply a create method. This method is called when the DNS server
+ * is starting up and creating drivers for use later. A SDLZ driver
+ * does not have to implement a create method.
+ */
+
+typedef void
+(*dns_sdlzdestroy_t)(void *driverarg, void *dbdata);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface may
+ * supply a destroy method. This method is called when the DNS server
+ * is shuting down and no longer needs the driver. A SDLZ driver does
+ * not have to implement a destroy method.
+ */
+
+typedef isc_result_t
+(*dns_sdlzfindzone_t)(void *driverarg, void *dbdata, const char *name);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface MUST
+ * supply a find zone method. This method is called when the DNS
+ * server is performing a query to to determine if 'name' is a
+ * supported dns zone. The find zone method will be called with the
+ * longest possible name first, and continue to be called with
+ * successively shorter domain names, until any of the following
+ * occur:
+ *
+ * \li 1) the function returns (ISC_R_SUCCESS) indicating a zone name
+ * match.
+ *
+ * \li 2) a problem occurs, and the functions returns anything other than
+ * (ISC_R_NOTFOUND)
+ *
+ * \li 3) we run out of domain name labels. I.E. we have tried the
+ * shortest domain name
+ *
+ * \li 4) the number of labels in the domain name is less than min_lables
+ * for dns_dlzfindzone
+ *
+ * The driver's find zone method should return ISC_R_SUCCESS if the
+ * zone is supported by the database. Otherwise it should return
+ * ISC_R_NOTFOUND, if the zone is not supported. If an error occurs
+ * it should return a result code indicating the type of error.
+ */
+
+typedef isc_result_t
+(*dns_sdlzlookupfunc_t)(const char *zone, const char *name, void *driverarg,
+ void *dbdata, dns_sdlzlookup_t *lookup);
+
+/*%<
+ * Method prototype. Drivers implementing the SDLZ interface MUST
+ * supply a lookup method. This method is called when the DNS server
+ * is performing a query, after the find zone and before any other
+ * methods have been called. This function returns record DNS record
+ * information using the dns_sdlz_putrr and dns_sdlz_putsoa functions.
+ * If this function supplies authority information for the DNS record
+ * the authority method is not required. If it does not, the
+ * authority function is required. A SDLZ driver must implement a
+ * lookup method.
+ */
+
+typedef struct dns_sdlzmethods {
+ dns_sdlzcreate_t create;
+ dns_sdlzdestroy_t destroy;
+ dns_sdlzfindzone_t findzone;
+ dns_sdlzlookupfunc_t lookup;
+ dns_sdlzauthorityfunc_t authority;
+ dns_sdlzallnodesfunc_t allnodes;
+ dns_sdlzallowzonexfr_t allowzonexfr;
+} dns_sdlzmethods_t;
+
+isc_result_t
+dns_sdlzregister(const char *drivername, const dns_sdlzmethods_t *methods,
+ void *driverarg, unsigned int flags, isc_mem_t *mctx,
+ dns_sdlzimplementation_t **sdlzimp);
+/*%<
+ * Register a dynamically loadable zones (dlz) driver for the database
+ * type 'drivername', implemented by the functions in '*methods'.
+ *
+ * sdlzimp must point to a NULL dns_sdlzimplementation_t pointer.
+ * That is, sdlzimp != NULL && *sdlzimp == NULL. It will be assigned
+ * a value that will later be used to identify the driver when
+ * deregistering it.
+ */
+
+void
+dns_sdlzunregister(dns_sdlzimplementation_t **sdlzimp);
+
+/*%<
+ * Removes the sdlz driver from the list of registered sdlz drivers.
+ * There must be no active sdlz drivers of this type when this
+ * function is called.
+ */
+
+isc_result_t
+dns_sdlz_putnamedrr(dns_sdlzallnodes_t *allnodes, const char *name,
+ const char *type, dns_ttl_t ttl, const char *data);
+/*%<
+ * Add a single resource record to the allnodes structure to be later
+ * parsed into a zone transfer response.
+ */
+
+isc_result_t
+dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl,
+ const char *data);
+/*%<
+ * Add a single resource record to the lookup structure to be later
+ * parsed into a query response.
+ */
+
+isc_result_t
+dns_sdlz_putsoa(dns_sdlzlookup_t *lookup, const char *mname, const char *rname,
+ isc_uint32_t serial);
+/*%<
+ * This function may optionally be called from the 'authority'
+ * callback to simplify construction of the SOA record for 'zone'. It
+ * will provide a SOA listing 'mname' as as the master server and
+ * 'rname' as the responsible person mailbox. It is the
+ * responsibility of the driver to increment the serial number between
+ * responses if necessary. All other SOA fields will have reasonable
+ * default values.
+ */
+
+
+ISC_LANG_ENDDECLS
+
+#endif /* SDLZ_H */
diff --git a/contrib/bind9/lib/dns/include/dns/secalg.h b/contrib/bind9/lib/dns/include/dns/secalg.h
index 3f7a16f..0466d91 100644
--- a/contrib/bind9/lib/dns/include/dns/secalg.h
+++ b/contrib/bind9/lib/dns/include/dns/secalg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: secalg.h,v 1.12.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: secalg.h,v 1.13.18.2 2005/04/29 00:16:21 marka Exp $ */
#ifndef DNS_SECALG_H
#define DNS_SECALG_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,40 +30,40 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNSSEC security algorithm value.
* The text may contain either a mnemonic algorithm name or a decimal algorithm
* number.
*
* Requires:
- * 'secalgp' is a valid pointer.
+ *\li 'secalgp' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_RANGE numeric type is out of range
- * DNS_R_UNKNOWN mnemonic type is unknown
+ *\li ISC_R_SUCCESS on success
+ *\li ISC_R_RANGE numeric type is out of range
+ *\li DNS_R_UNKNOWN mnemonic type is unknown
*/
isc_result_t
dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of the DNSSEC security algorithm 'secalg'
* into 'target'.
*
* Requires:
- * 'secalg' is a valid secalg.
+ *\li 'secalg' is a valid secalg.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
- * Ensures:
- * If the result is success:
- * The used space in 'target' is updated.
+ * Ensures,
+ * if the result is success:
+ *\li The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li ISC_R_SUCCESS on success
+ *\li ISC_R_NOSPACE target buffer is too small
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/secproto.h b/contrib/bind9/lib/dns/include/dns/secproto.h
index da8c1dd..a6cfd5c 100644
--- a/contrib/bind9/lib/dns/include/dns/secproto.h
+++ b/contrib/bind9/lib/dns/include/dns/secproto.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: secproto.h,v 1.9.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: secproto.h,v 1.10.18.2 2005/04/29 00:16:21 marka Exp $ */
#ifndef DNS_SECPROTO_H
#define DNS_SECPROTO_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,40 +30,40 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source);
-/*
+/*%<
* Convert the text 'source' refers to into a DNSSEC security protocol value.
* The text may contain either a mnemonic protocol name or a decimal protocol
* number.
*
* Requires:
- * 'secprotop' is a valid pointer.
+ *\li 'secprotop' is a valid pointer.
*
- * 'source' is a valid text region.
+ *\li 'source' is a valid text region.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_RANGE numeric type is out of range
- * DNS_R_UNKNOWN mnemonic type is unknown
+ *\li ISC_R_SUCCESS on success
+ *\li ISC_R_RANGE numeric type is out of range
+ *\li DNS_R_UNKNOWN mnemonic type is unknown
*/
isc_result_t
dns_secproto_totext(dns_secproto_t secproto, isc_buffer_t *target);
-/*
+/*%<
* Put a textual representation of the DNSSEC security protocol 'secproto'
* into 'target'.
*
* Requires:
- * 'secproto' is a valid secproto.
+ *\li 'secproto' is a valid secproto.
*
- * 'target' is a valid text buffer.
+ *\li 'target' is a valid text buffer.
*
- * Ensures:
- * If the result is success:
- * The used space in 'target' is updated.
+ * Ensures,
+ * if the result is success:
+ * \li The used space in 'target' is updated.
*
* Returns:
- * ISC_R_SUCCESS on success
- * ISC_R_NOSPACE target buffer is too small
+ *\li ISC_R_SUCCESS on success
+ *\li ISC_R_NOSPACE target buffer is too small
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/soa.h b/contrib/bind9/lib/dns/include/dns/soa.h
index 304ae15..70c6725 100644
--- a/contrib/bind9/lib/dns/include/dns/soa.h
+++ b/contrib/bind9/lib/dns/include/dns/soa.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: soa.h,v 1.2.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: soa.h,v 1.3.18.2 2005/04/29 00:16:22 marka Exp $ */
#ifndef DNS_SOA_H
#define DNS_SOA_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* SOA utilities.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/ssu.h b/contrib/bind9/lib/dns/include/dns/ssu.h
index f26a039..b709030 100644
--- a/contrib/bind9/lib/dns/include/dns/ssu.h
+++ b/contrib/bind9/lib/dns/include/dns/ssu.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ssu.h,v 1.11.206.3 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: ssu.h,v 1.13.18.4 2006/02/16 23:51:32 marka Exp $ */
#ifndef DNS_SSU_H
#define DNS_SSU_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -30,46 +32,50 @@ ISC_LANG_BEGINDECLS
#define DNS_SSUMATCHTYPE_SUBDOMAIN 1
#define DNS_SSUMATCHTYPE_WILDCARD 2
#define DNS_SSUMATCHTYPE_SELF 3
+#define DNS_SSUMATCHTYPE_SELFSUB 4
+#define DNS_SSUMATCHTYPE_SELFWILD 5
+#define DNS_SSUMATCHTYPE_MAX 5 /* maximum defined value */
+
isc_result_t
dns_ssutable_create(isc_mem_t *mctx, dns_ssutable_t **table);
-/*
+/*%<
* Creates a table that will be used to store simple-secure-update rules.
* Note: all locking must be provided by the client.
*
* Requires:
- * 'mctx' is a valid memory context
- * 'table' is not NULL, and '*table' is NULL
+ *\li 'mctx' is a valid memory context
+ *\li 'table' is not NULL, and '*table' is NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMEMORY
*/
void
dns_ssutable_attach(dns_ssutable_t *source, dns_ssutable_t **targetp);
-/*
+/*%<
* Attach '*targetp' to 'source'.
*
* Requires:
- * 'source' is a valid SSU table
- * 'targetp' points to a NULL dns_ssutable_t *.
+ *\li 'source' is a valid SSU table
+ *\li 'targetp' points to a NULL dns_ssutable_t *.
*
* Ensures:
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*/
void
dns_ssutable_detach(dns_ssutable_t **tablep);
-/*
+/*%<
* Detach '*tablep' from its simple-secure-update rule table.
*
* Requires:
- * 'tablep' points to a valid dns_ssutable_t
+ *\li 'tablep' points to a valid dns_ssutable_t
*
* Ensures:
- * *tablep is NULL
- * If '*tablep' is the last reference to the SSU table, all
+ *\li *tablep is NULL
+ *\li If '*tablep' is the last reference to the SSU table, all
* resources used by the table will be freed.
*/
@@ -78,78 +84,80 @@ dns_ssutable_addrule(dns_ssutable_t *table, isc_boolean_t grant,
dns_name_t *identity, unsigned int matchtype,
dns_name_t *name, unsigned int ntypes,
dns_rdatatype_t *types);
-/*
+/*%<
* Adds a new rule to a simple-secure-update rule table. The rule
* either grants or denies update privileges of an identity (or set of
* identities) to modify a name (or set of names) or certain types present
* at that name.
*
* Notes:
- * If 'matchtype' is SELF, this rule only matches if the name
+ *\li If 'matchtype' is SELF, this rule only matches if the name
* to be updated matches the signing identity.
*
- * If 'ntypes' is 0, this rule applies to all types except
+ *\li If 'ntypes' is 0, this rule applies to all types except
* NS, SOA, RRSIG, and NSEC.
*
- * If 'types' includes ANY, this rule applies to all types
+ *\li If 'types' includes ANY, this rule applies to all types
* except NSEC.
*
* Requires:
- * 'table' is a valid SSU table
- * 'identity' is a valid absolute name
- * 'matchtype' must be one of the defined constants.
- * 'name' is a valid absolute name
- * If 'ntypes' > 0, 'types' must not be NULL
+ *\li 'table' is a valid SSU table
+ *\li 'identity' is a valid absolute name
+ *\li 'matchtype' must be one of the defined constants.
+ *\li 'name' is a valid absolute name
+ *\li If 'ntypes' > 0, 'types' must not be NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li ISC_R_SUCCESS
+ *\li ISC_R_NOMEMORY
*/
isc_boolean_t
dns_ssutable_checkrules(dns_ssutable_t *table, dns_name_t *signer,
dns_name_t *name, dns_rdatatype_t type);
-/*
+/*%<
* Checks that the attempted update of (name, type) is allowed according
* to the rules specified in the simple-secure-update rule table. If
* no rules are matched, access is denied. If signer is NULL, access
* is denied.
*
* Requires:
- * 'table' is a valid SSU table
- * 'signer' is NULL or a valid absolute name
- * 'name' is a valid absolute name
+ *\li 'table' is a valid SSU table
+ *\li 'signer' is NULL or a valid absolute name
+ *\li 'name' is a valid absolute name
*/
+/*% Accessor functions to extract rule components */
isc_boolean_t dns_ssurule_isgrant(const dns_ssurule_t *rule);
+/*% Accessor functions to extract rule components */
dns_name_t * dns_ssurule_identity(const dns_ssurule_t *rule);
+/*% Accessor functions to extract rule components */
unsigned int dns_ssurule_matchtype(const dns_ssurule_t *rule);
+/*% Accessor functions to extract rule components */
dns_name_t * dns_ssurule_name(const dns_ssurule_t *rule);
+/*% Accessor functions to extract rule components */
unsigned int dns_ssurule_types(const dns_ssurule_t *rule,
dns_rdatatype_t **types);
-/*
- * Accessor functions to extract rule components
- */
isc_result_t dns_ssutable_firstrule(const dns_ssutable_t *table,
dns_ssurule_t **rule);
-/*
+/*%<
* Initiates a rule iterator. There is no need to maintain any state.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE
*/
isc_result_t dns_ssutable_nextrule(dns_ssurule_t *rule,
dns_ssurule_t **nextrule);
-/*
+/*%<
* Returns the next rule in the table.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMORE
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMORE
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/stats.h b/contrib/bind9/lib/dns/include/dns/stats.h
index db94b52..6cd95ac 100644
--- a/contrib/bind9/lib/dns/include/dns/stats.h
+++ b/contrib/bind9/lib/dns/include/dns/stats.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,39 +15,43 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stats.h,v 1.4.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: stats.h,v 1.5.18.4 2005/06/27 00:20:03 marka Exp $ */
#ifndef DNS_STATS_H
#define DNS_STATS_H 1
+/*! \file */
+
#include <dns/types.h>
-/*
+/*%
* Query statistics counter types.
*/
typedef enum {
- dns_statscounter_success = 0, /* Successful lookup */
- dns_statscounter_referral = 1, /* Referral result */
- dns_statscounter_nxrrset = 2, /* NXRRSET result */
- dns_statscounter_nxdomain = 3, /* NXDOMAIN result */
- dns_statscounter_recursion = 4, /* Recursion was used */
- dns_statscounter_failure = 5 /* Some other failure */
+ dns_statscounter_success = 0, /*%< Successful lookup */
+ dns_statscounter_referral = 1, /*%< Referral result */
+ dns_statscounter_nxrrset = 2, /*%< NXRRSET result */
+ dns_statscounter_nxdomain = 3, /*%< NXDOMAIN result */
+ dns_statscounter_recursion = 4, /*%< Recursion was used */
+ dns_statscounter_failure = 5, /*%< Some other failure */
+ dns_statscounter_duplicate = 6, /*%< Duplicate query */
+ dns_statscounter_dropped = 7 /*%< Duplicate query */
} dns_statscounter_t;
-#define DNS_STATS_NCOUNTERS 6
+#define DNS_STATS_NCOUNTERS 8
LIBDNS_EXTERNAL_DATA extern const char *dns_statscounter_names[];
isc_result_t
dns_stats_alloccounters(isc_mem_t *mctx, isc_uint64_t **ctrp);
-/*
+/*%<
* Allocate an array of query statistics counters from the memory
* context 'mctx'.
*/
void
dns_stats_freecounters(isc_mem_t *mctx, isc_uint64_t **ctrp);
-/*
+/*%<
* Free an array of query statistics counters allocated from the memory
* context 'mctx'.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/tcpmsg.h b/contrib/bind9/lib/dns/include/dns/tcpmsg.h
index ae1d704..075f463 100644
--- a/contrib/bind9/lib/dns/include/dns/tcpmsg.h
+++ b/contrib/bind9/lib/dns/include/dns/tcpmsg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tcpmsg.h,v 1.15.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: tcpmsg.h,v 1.16.18.2 2005/04/29 00:16:22 marka Exp $ */
#ifndef DNS_TCPMSG_H
#define DNS_TCPMSG_H 1
+/*! \file */
+
#include <isc/buffer.h>
#include <isc/lang.h>
#include <isc/socket.h>
@@ -45,56 +47,56 @@ ISC_LANG_BEGINDECLS
void
dns_tcpmsg_init(isc_mem_t *mctx, isc_socket_t *sock, dns_tcpmsg_t *tcpmsg);
-/*
+/*%<
* Associate a tcp message state with a given memory context and
* TCP socket.
*
* Requires:
*
- * "mctx" and "sock" be non-NULL and valid types.
+ *\li "mctx" and "sock" be non-NULL and valid types.
*
- * "sock" be a read/write TCP socket.
+ *\li "sock" be a read/write TCP socket.
*
- * "tcpmsg" be non-NULL and an uninitialized or invalidated structure.
+ *\li "tcpmsg" be non-NULL and an uninitialized or invalidated structure.
*
* Ensures:
*
- * "tcpmsg" is a valid structure.
+ *\li "tcpmsg" is a valid structure.
*/
void
dns_tcpmsg_setmaxsize(dns_tcpmsg_t *tcpmsg, unsigned int maxsize);
-/*
+/*%<
* Set the maximum packet size to "maxsize"
*
* Requires:
*
- * "tcpmsg" be valid.
+ *\li "tcpmsg" be valid.
*
- * 512 <= "maxsize" <= 65536
+ *\li 512 <= "maxsize" <= 65536
*/
isc_result_t
dns_tcpmsg_readmessage(dns_tcpmsg_t *tcpmsg,
isc_task_t *task, isc_taskaction_t action, void *arg);
-/*
+/*%<
* Schedule an event to be delivered when a DNS message is readable, or
* when an error occurs on the socket.
*
* Requires:
*
- * "tcpmsg" be valid.
+ *\li "tcpmsg" be valid.
*
- * "task", "taskaction", and "arg" be valid.
+ *\li "task", "taskaction", and "arg" be valid.
*
* Returns:
*
- * ISC_R_SUCCESS -- no error
- * Anything that the isc_socket_recv() call can return. XXXMLG
+ *\li ISC_R_SUCCESS -- no error
+ *\li Anything that the isc_socket_recv() call can return. XXXMLG
*
* Notes:
*
- * The event delivered is a fully generic event. It will contain no
+ *\li The event delivered is a fully generic event. It will contain no
* actual data. The sender will be a pointer to the dns_tcpmsg_t.
* The result code inside that structure should be checked to see
* what the final result was.
@@ -102,41 +104,41 @@ dns_tcpmsg_readmessage(dns_tcpmsg_t *tcpmsg,
void
dns_tcpmsg_cancelread(dns_tcpmsg_t *tcpmsg);
-/*
+/*%<
* Cancel a readmessage() call. The event will still be posted with a
* CANCELED result code.
*
* Requires:
*
- * "tcpmsg" be valid.
+ *\li "tcpmsg" be valid.
*/
void
dns_tcpmsg_keepbuffer(dns_tcpmsg_t *tcpmsg, isc_buffer_t *buffer);
-/*
+/*%<
* If a dns buffer is to be kept between calls, this function marks the
* internal state-machine buffer as invalid, and copies all the contents
* of the state into "buffer".
*
* Requires:
*
- * "tcpmsg" be valid.
+ *\li "tcpmsg" be valid.
*
- * "buffer" be non-NULL.
+ *\li "buffer" be non-NULL.
*/
void
dns_tcpmsg_invalidate(dns_tcpmsg_t *tcpmsg);
-/*
+/*%<
* Clean up all allocated state, and invalidate the structure.
*
* Requires:
*
- * "tcpmsg" be valid.
+ *\li "tcpmsg" be valid.
*
* Ensures:
*
- * "tcpmsg" is invalidated and disassociated with all memory contexts,
+ *\li "tcpmsg" is invalidated and disassociated with all memory contexts,
* sockets, etc.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/time.h b/contrib/bind9/lib/dns/include/dns/time.h
index 0b82443..9e8f5cc 100644
--- a/contrib/bind9/lib/dns/include/dns/time.h
+++ b/contrib/bind9/lib/dns/include/dns/time.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.h,v 1.9.12.3 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: time.h,v 1.11.18.2 2005/04/29 00:16:23 marka Exp $ */
#ifndef DNS_TIME_H
#define DNS_TIME_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -35,7 +37,7 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_time64_fromtext(const char *source, isc_int64_t *target);
-/*
+/*%<
* Convert a date and time in YYYYMMDDHHMMSS text format at 'source'
* into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT.
* Store the count at 'target'.
@@ -43,7 +45,7 @@ dns_time64_fromtext(const char *source, isc_int64_t *target);
isc_result_t
dns_time32_fromtext(const char *source, isc_uint32_t *target);
-/*
+/*%<
* Like dns_time64_fromtext, but returns the second count modulo 2^32
* as per RFC2535.
*/
@@ -51,14 +53,14 @@ dns_time32_fromtext(const char *source, isc_uint32_t *target);
isc_result_t
dns_time64_totext(isc_int64_t value, isc_buffer_t *target);
-/*
+/*%<
* Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into
* a YYYYMMDDHHMMSS text representation and append it to 'target'.
*/
isc_result_t
dns_time32_totext(isc_uint32_t value, isc_buffer_t *target);
-/*
+/*%<
* Like dns_time64_totext, but for a 32-bit cyclic time value.
* Of those dates whose counts of seconds since Jan 1 1970 0:00 GMT
* are congruent with 'value' modulo 2^32, the one closest to the
diff --git a/contrib/bind9/lib/dns/include/dns/timer.h b/contrib/bind9/lib/dns/include/dns/timer.h
index 36e2ac3..cd936a0 100644
--- a/contrib/bind9/lib/dns/include/dns/timer.h
+++ b/contrib/bind9/lib/dns/include/dns/timer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.h,v 1.2.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: timer.h,v 1.3.18.2 2005/04/29 00:16:23 marka Exp $ */
#ifndef DNS_TIMER_H
#define DNS_TIMER_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -36,10 +38,10 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_timer_setidle(isc_timer_t *timer, unsigned int maxtime,
unsigned int idletime, isc_boolean_t purge);
-/*
+/*%<
* Convenience function for setting up simple, one-second-granularity
* idle timers as used by zone transfers.
- *
+ * \brief
* Set the timer 'timer' to go off after 'idletime' seconds of inactivity,
* or after 'maxtime' at the very latest. Events are purged iff
* 'purge' is ISC_TRUE.
diff --git a/contrib/bind9/lib/dns/include/dns/tkey.h b/contrib/bind9/lib/dns/include/dns/tkey.h
index e5ca3b3..4e3e80a 100644
--- a/contrib/bind9/lib/dns/include/dns/tkey.h
+++ b/contrib/bind9/lib/dns/include/dns/tkey.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tkey.h,v 1.18.206.1 2004/03/06 08:14:00 marka Exp $ */
+/* $Id: tkey.h,v 1.19.18.2 2005/04/29 00:16:23 marka Exp $ */
#ifndef DNS_TKEY_H
#define DNS_TKEY_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -45,55 +47,55 @@ struct dns_tkeyctx {
isc_result_t
dns_tkeyctx_create(isc_mem_t *mctx, isc_entropy_t *ectx, dns_tkeyctx_t **tctxp);
-/*
+/*%<
* Create an empty TKEY context.
*
* Requires:
- * 'mctx' is not NULL
- * 'tctx' is not NULL
- * '*tctx' is NULL
+ *\li 'mctx' is not NULL
+ *\li 'tctx' is not NULL
+ *\li '*tctx' is NULL
*
* Returns
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * return codes from dns_name_fromtext()
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li return codes from dns_name_fromtext()
*/
void
dns_tkeyctx_destroy(dns_tkeyctx_t **tctxp);
-/*
+/*%<
* Frees all data associated with the TKEY context
*
* Requires:
- * 'tctx' is not NULL
- * '*tctx' is not NULL
+ *\li 'tctx' is not NULL
+ *\li '*tctx' is not NULL
*/
isc_result_t
dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
dns_tsig_keyring_t *ring);
-/*
+/*%<
* Processes a query containing a TKEY record, adding or deleting TSIG
* keys if necessary, and modifies the message to contain the response.
*
* Requires:
- * 'msg' is a valid message
- * 'tctx' is a valid TKEY context
- * 'ring' is a valid TSIG keyring
+ *\li 'msg' is a valid message
+ *\li 'tctx' is a valid TKEY context
+ *\li 'ring' is a valid TSIG keyring
*
* Returns
- * ISC_R_SUCCESS msg was updated (the TKEY operation succeeded,
+ *\li #ISC_R_SUCCESS msg was updated (the TKEY operation succeeded,
* or msg now includes a TKEY with an error set)
* DNS_R_FORMERR the packet was malformed (missing a TKEY
* or KEY).
- * other An error occurred while processing the message
+ *\li other An error occurred while processing the message
*/
isc_result_t
dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
dns_name_t *algorithm, isc_buffer_t *nonce,
isc_uint32_t lifetime);
-/*
+/*%<
* Builds a query containing a TKEY that will generate a shared
* secret using a Diffie-Hellman key exchange. The shared key
* will be of the specified algorithm (only DNS_TSIG_HMACMD5_NAME
@@ -105,61 +107,61 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
*
*
* Requires:
- * 'msg' is a valid message
- * 'key' is a valid Diffie Hellman dst key
- * 'name' is a valid name
- * 'algorithm' is a valid name
+ *\li 'msg' is a valid message
+ *\li 'key' is a valid Diffie Hellman dst key
+ *\li 'name' is a valid name
+ *\li 'algorithm' is a valid name
*
* Returns:
- * ISC_R_SUCCESS msg was successfully updated to include the
+ *\li #ISC_R_SUCCESS msg was successfully updated to include the
* query to be sent
- * other an error occurred while building the message
+ *\li other an error occurred while building the message
*/
isc_result_t
dns_tkey_buildgssquery(dns_message_t *msg, dns_name_t *name,
dns_name_t *gname, void *cred,
isc_uint32_t lifetime, void **context);
-/*
+/*%<
* XXX
*/
isc_result_t
dns_tkey_builddeletequery(dns_message_t *msg, dns_tsigkey_t *key);
-/*
+/*%<
* Builds a query containing a TKEY record that will delete the
* specified shared secret from the server.
*
* Requires:
- * 'msg' is a valid message
- * 'key' is a valid TSIG key
+ *\li 'msg' is a valid message
+ *\li 'key' is a valid TSIG key
*
* Returns:
- * ISC_R_SUCCESS msg was successfully updated to include the
+ *\li #ISC_R_SUCCESS msg was successfully updated to include the
* query to be sent
- * other an error occurred while building the message
+ *\li other an error occurred while building the message
*/
isc_result_t
dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dst_key_t *key, isc_buffer_t *nonce,
dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring);
-/*
+/*%<
* Processes a response to a query containing a TKEY that was
* designed to generate a shared secret using a Diffie-Hellman key
* exchange. If the query was successful, a new shared key
* is created and added to the list of shared keys.
*
* Requires:
- * 'qmsg' is a valid message (the query)
- * 'rmsg' is a valid message (the response)
- * 'key' is a valid Diffie Hellman dst key
- * 'outkey' is either NULL or a pointer to NULL
- * 'ring' is a valid keyring or NULL
+ *\li 'qmsg' is a valid message (the query)
+ *\li 'rmsg' is a valid message (the response)
+ *\li 'key' is a valid Diffie Hellman dst key
+ *\li 'outkey' is either NULL or a pointer to NULL
+ *\li 'ring' is a valid keyring or NULL
*
* Returns:
- * ISC_R_SUCCESS the shared key was successfully added
- * ISC_R_NOTFOUND an error occurred while looking for a
+ *\li #ISC_R_SUCCESS the shared key was successfully added
+ *\li #ISC_R_NOTFOUND an error occurred while looking for a
* component of the query or response
*/
@@ -167,26 +169,26 @@ isc_result_t
dns_tkey_processgssresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_name_t *gname, void *cred, void **context,
dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring);
-/*
+/*%<
* XXX
*/
isc_result_t
dns_tkey_processdeleteresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_tsig_keyring_t *ring);
-/*
+/*%<
* Processes a response to a query containing a TKEY that was
* designed to delete a shared secret. If the query was successful,
* the shared key is deleted from the list of shared keys.
*
* Requires:
- * 'qmsg' is a valid message (the query)
- * 'rmsg' is a valid message (the response)
- * 'ring' is not NULL
+ *\li 'qmsg' is a valid message (the query)
+ *\li 'rmsg' is a valid message (the response)
+ *\li 'ring' is not NULL
*
* Returns:
- * ISC_R_SUCCESS the shared key was successfully deleted
- * ISC_R_NOTFOUND an error occurred while looking for a
+ *\li #ISC_R_SUCCESS the shared key was successfully deleted
+ *\li #ISC_R_NOTFOUND an error occurred while looking for a
* component of the query or response
*/
diff --git a/contrib/bind9/lib/dns/include/dns/tsig.h b/contrib/bind9/lib/dns/include/dns/tsig.h
index 7b5b458..b3fd6cc 100644
--- a/contrib/bind9/lib/dns/include/dns/tsig.h
+++ b/contrib/bind9/lib/dns/include/dns/tsig.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsig.h,v 1.40.2.2.8.3 2004/03/08 09:04:39 marka Exp $ */
+/* $Id: tsig.h,v 1.43.18.4 2006/01/27 23:57:44 marka Exp $ */
#ifndef DNS_TSIG_H
#define DNS_TSIG_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/refcount.h>
#include <isc/rwlock.h>
@@ -39,8 +41,18 @@ LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_gssapi_name;
#define DNS_TSIG_GSSAPI_NAME dns_tsig_gssapi_name
LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_gssapims_name;
#define DNS_TSIG_GSSAPIMS_NAME dns_tsig_gssapims_name
-
-/*
+LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_hmacsha1_name;
+#define DNS_TSIG_HMACSHA1_NAME dns_tsig_hmacsha1_name
+LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_hmacsha224_name;
+#define DNS_TSIG_HMACSHA224_NAME dns_tsig_hmacsha224_name
+LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_hmacsha256_name;
+#define DNS_TSIG_HMACSHA256_NAME dns_tsig_hmacsha256_name
+LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_hmacsha384_name;
+#define DNS_TSIG_HMACSHA384_NAME dns_tsig_hmacsha384_name
+LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_tsig_hmacsha512_name;
+#define DNS_TSIG_HMACSHA512_NAME dns_tsig_hmacsha512_name
+
+/*%
* Default fudge value.
*/
#define DNS_TSIG_FUDGE 300
@@ -53,17 +65,17 @@ struct dns_tsig_keyring {
struct dns_tsigkey {
/* Unlocked */
- unsigned int magic; /* Magic number. */
+ unsigned int magic; /*%< Magic number. */
isc_mem_t *mctx;
- dst_key_t *key; /* Key */
- dns_name_t name; /* Key name */
- dns_name_t *algorithm; /* Algorithm name */
- dns_name_t *creator; /* name that created secret */
- isc_boolean_t generated; /* was this generated? */
- isc_stdtime_t inception; /* start of validity period */
- isc_stdtime_t expire; /* end of validity period */
- dns_tsig_keyring_t *ring; /* the enclosing keyring */
- isc_refcount_t refs; /* reference counter */
+ dst_key_t *key; /*%< Key */
+ dns_name_t name; /*%< Key name */
+ dns_name_t *algorithm; /*%< Algorithm name */
+ dns_name_t *creator; /*%< name that created secret */
+ isc_boolean_t generated; /*%< was this generated? */
+ isc_stdtime_t inception; /*%< start of validity period */
+ isc_stdtime_t expire; /*%< end of validity period */
+ dns_tsig_keyring_t *ring; /*%< the enclosing keyring */
+ isc_refcount_t refs; /*%< reference counter */
};
#define dns_tsigkey_identity(tsigkey) \
@@ -84,7 +96,7 @@ dns_tsigkey_createfromkey(dns_name_t *name, dns_name_t *algorithm,
dns_name_t *creator, isc_stdtime_t inception,
isc_stdtime_t expire, isc_mem_t *mctx,
dns_tsig_keyring_t *ring, dns_tsigkey_t **key);
-/*
+/*%<
* Creates a tsig key structure and saves it in the keyring. If key is
* not NULL, *key will contain a copy of the key. The keys validity
* period is specified by (inception, expire), and will not expire if
@@ -95,100 +107,100 @@ dns_tsigkey_createfromkey(dns_name_t *name, dns_name_t *algorithm,
* to generate a BADKEY response.
*
* Requires:
- * 'name' is a valid dns_name_t
- * 'algorithm' is a valid dns_name_t
- * 'secret' is a valid pointer
- * 'length' is an integer >= 0
- * 'key' is a valid dst key or NULL
- * 'creator' points to a valid dns_name_t or is NULL
- * 'mctx' is a valid memory context
- * 'ring' is a valid TSIG keyring or NULL
- * 'key' or '*key' must be NULL
+ *\li 'name' is a valid dns_name_t
+ *\li 'algorithm' is a valid dns_name_t
+ *\li 'secret' is a valid pointer
+ *\li 'length' is an integer >= 0
+ *\li 'key' is a valid dst key or NULL
+ *\li 'creator' points to a valid dns_name_t or is NULL
+ *\li 'mctx' is a valid memory context
+ *\li 'ring' is a valid TSIG keyring or NULL
+ *\li 'key' or '*key' must be NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_EXISTS - a key with this name already exists
- * ISC_R_NOTIMPLEMENTED - algorithm is not implemented
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_EXISTS - a key with this name already exists
+ *\li #ISC_R_NOTIMPLEMENTED - algorithm is not implemented
+ *\li #ISC_R_NOMEMORY
*/
void
dns_tsigkey_attach(dns_tsigkey_t *source, dns_tsigkey_t **targetp);
-/*
+/*%<
* Attach '*targetp' to 'source'.
*
* Requires:
- * 'key' is a valid TSIG key
+ *\li 'key' is a valid TSIG key
*
* Ensures:
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*/
void
dns_tsigkey_detach(dns_tsigkey_t **keyp);
-/*
+/*%<
* Detaches from the tsig key structure pointed to by '*key'.
*
* Requires:
- * 'keyp' is not NULL and '*keyp' is a valid TSIG key
+ *\li 'keyp' is not NULL and '*keyp' is a valid TSIG key
*
* Ensures:
- * 'keyp' points to NULL
+ *\li 'keyp' points to NULL
*/
void
dns_tsigkey_setdeleted(dns_tsigkey_t *key);
-/*
+/*%<
* Prevents this key from being used again. It will be deleted when
* no references exist.
*
* Requires:
- * 'key' is a valid TSIG key on a keyring
+ *\li 'key' is a valid TSIG key on a keyring
*/
isc_result_t
dns_tsig_sign(dns_message_t *msg);
-/*
+/*%<
* Generates a TSIG record for this message
*
* Requires:
- * 'msg' is a valid message
- * 'msg->tsigkey' is a valid TSIG key
- * 'msg->tsig' is NULL
+ *\li 'msg' is a valid message
+ *\li 'msg->tsigkey' is a valid TSIG key
+ *\li 'msg->tsig' is NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_NOSPACE
- * DNS_R_EXPECTEDTSIG
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_NOSPACE
+ *\li #DNS_R_EXPECTEDTSIG
* - this is a response & msg->querytsig is NULL
*/
isc_result_t
dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
dns_tsig_keyring_t *ring1, dns_tsig_keyring_t *ring2);
-/*
+/*%<
* Verifies the TSIG record in this message
*
* Requires:
- * 'source' is a valid buffer containing the unparsed message
- * 'msg' is a valid message
- * 'msg->tsigkey' is a valid TSIG key if this is a response
- * 'msg->tsig' is NULL
- * 'msg->querytsig' is not NULL if this is a response
- * 'ring1' and 'ring2' are each either a valid keyring or NULL
+ *\li 'source' is a valid buffer containing the unparsed message
+ *\li 'msg' is a valid message
+ *\li 'msg->tsigkey' is a valid TSIG key if this is a response
+ *\li 'msg->tsig' is NULL
+ *\li 'msg->querytsig' is not NULL if this is a response
+ *\li 'ring1' and 'ring2' are each either a valid keyring or NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * DNS_R_EXPECTEDTSIG - A TSIG was expected but not seen
- * DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
- * DNS_R_TSIGERRORSET - the TSIG verified but ->error was set
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #DNS_R_EXPECTEDTSIG - A TSIG was expected but not seen
+ *\li #DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
+ *\li #DNS_R_TSIGERRORSET - the TSIG verified but ->error was set
* and this is a query
- * DNS_R_CLOCKSKEW - the TSIG failed to verify because of
+ *\li #DNS_R_CLOCKSKEW - the TSIG failed to verify because of
* the time was out of the allowed range.
- * DNS_R_TSIGVERIFYFAILURE - the TSIG failed to verify
- * DNS_R_EXPECTEDRESPONSE - the message was set over TCP and
+ *\li #DNS_R_TSIGVERIFYFAILURE - the TSIG failed to verify
+ *\li #DNS_R_EXPECTEDRESPONSE - the message was set over TCP and
* should have been a response,
* but was not.
*/
@@ -196,45 +208,45 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
isc_result_t
dns_tsigkey_find(dns_tsigkey_t **tsigkey, dns_name_t *name,
dns_name_t *algorithm, dns_tsig_keyring_t *ring);
-/*
+/*%<
* Returns the TSIG key corresponding to this name and (possibly)
* algorithm. Also increments the key's reference counter.
*
* Requires:
- * 'tsigkey' is not NULL
- * '*tsigkey' is NULL
- * 'name' is a valid dns_name_t
- * 'algorithm' is a valid dns_name_t or NULL
- * 'ring' is a valid keyring
+ *\li 'tsigkey' is not NULL
+ *\li '*tsigkey' is NULL
+ *\li 'name' is a valid dns_name_t
+ *\li 'algorithm' is a valid dns_name_t or NULL
+ *\li 'ring' is a valid keyring
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOTFOUND
*/
isc_result_t
dns_tsigkeyring_create(isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
-/*
+/*%<
* Create an empty TSIG key ring.
*
* Requires:
- * 'mctx' is not NULL
- * 'ringp' is not NULL, and '*ringp' is NULL
+ *\li 'mctx' is not NULL
+ *\li 'ringp' is not NULL, and '*ringp' is NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
void
dns_tsigkeyring_destroy(dns_tsig_keyring_t **ringp);
-/*
+/*%<
* Destroy a TSIG key ring.
*
* Requires:
- * 'ringp' is not NULL
+ *\li 'ringp' is not NULL
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/ttl.h b/contrib/bind9/lib/dns/include/dns/ttl.h
index dc7167d..ad01578 100644
--- a/contrib/bind9/lib/dns/include/dns/ttl.h
+++ b/contrib/bind9/lib/dns/include/dns/ttl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ttl.h,v 1.12.206.1 2004/03/06 08:14:01 marka Exp $ */
+/* $Id: ttl.h,v 1.13.18.2 2005/04/29 00:16:24 marka Exp $ */
#ifndef DNS_TTL_H
#define DNS_TTL_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -36,7 +38,7 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_ttl_totext(isc_uint32_t src, isc_boolean_t verbose,
isc_buffer_t *target);
-/*
+/*%<
* Output a TTL or other time interval in a human-readable form.
* The time interval is given as a count of seconds in 'src'.
* The text representation is appended to 'target'.
@@ -47,28 +49,28 @@ dns_ttl_totext(isc_uint32_t src, isc_boolean_t verbose,
* in "dig", like "1 week 2 days 3 hours 4 minutes 5 seconds".
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOSPACE
+ * \li ISC_R_SUCCESS
+ * \li ISC_R_NOSPACE
*/
isc_result_t
dns_counter_fromtext(isc_textregion_t *source, isc_uint32_t *ttl);
-/*
+/*%<
* Converts a counter from either a plain number or a BIND 8 style value.
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_SYNTAX
+ *\li ISC_R_SUCCESS
+ *\li DNS_R_SYNTAX
*/
isc_result_t
dns_ttl_fromtext(isc_textregion_t *source, isc_uint32_t *ttl);
-/*
+/*%<
* Converts a ttl from either a plain number or a BIND 8 style value.
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_BADTTL
+ *\li ISC_R_SUCCESS
+ *\li DNS_R_BADTTL
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/types.h b/contrib/bind9/lib/dns/include/dns/types.h
index 27995de..8dcbe57 100644
--- a/contrib/bind9/lib/dns/include/dns/types.h
+++ b/contrib/bind9/lib/dns/include/dns/types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,21 +15,25 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.103.12.9 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: types.h,v 1.109.18.12 2006/05/02 12:55:31 shane Exp $ */
#ifndef DNS_TYPES_H
#define DNS_TYPES_H 1
-/*
+/*! \file
+ * \brief
* Including this file gives you type declarations suitable for use in
* .h files, which lets us avoid circular type reference problems.
- *
+ * \brief
* To actually use a type or get declarations of its methods, you must
* include the appropriate .h file too.
*/
#include <isc/types.h>
+typedef struct dns_acache dns_acache_t;
+typedef struct dns_acacheentry dns_acacheentry_t;
+typedef struct dns_acachestats dns_acachestats_t;
typedef struct dns_acl dns_acl_t;
typedef struct dns_aclelement dns_aclelement_t;
typedef struct dns_aclenv dns_aclenv_t;
@@ -50,6 +54,9 @@ typedef void dns_dbload_t;
typedef void dns_dbnode_t;
typedef struct dns_dbtable dns_dbtable_t;
typedef void dns_dbversion_t;
+typedef struct dns_dlzimplementation dns_dlzimplementation_t;
+typedef struct dns_dlzdb dns_dlzdb_t;
+typedef struct dns_sdlzimplementation dns_sdlzimplementation_t;
typedef struct dns_decompress dns_decompress_t;
typedef struct dns_dispatch dns_dispatch_t;
typedef struct dns_dispatchevent dns_dispatchevent_t;
@@ -136,7 +143,8 @@ typedef enum {
typedef enum {
dns_notifytype_no = 0,
dns_notifytype_yes = 1,
- dns_notifytype_explicit = 2
+ dns_notifytype_explicit = 2,
+ dns_notifytype_masteronly = 3
} dns_notifytype_t;
typedef enum {
@@ -148,13 +156,19 @@ typedef enum {
dns_dialuptype_passive = 5
} dns_dialuptype_t;
+typedef enum {
+ dns_masterformat_none = 0,
+ dns_masterformat_text = 1,
+ dns_masterformat_raw = 2
+} dns_masterformat_t;
+
/*
* These are generated by gen.c.
*/
#include <dns/enumtype.h> /* Provides dns_rdatatype_t. */
#include <dns/enumclass.h> /* Provides dns_rdataclass_t. */
-/*
+/*%
* rcodes.
*/
enum {
@@ -190,7 +204,7 @@ enum {
#define dns_rcode_badvers ((dns_rcode_t)dns_rcode_badvers)
};
-/*
+/*%
* TSIG errors.
*/
enum {
@@ -199,10 +213,11 @@ enum {
dns_tsigerror_badtime = 18,
dns_tsigerror_badmode = 19,
dns_tsigerror_badname = 20,
- dns_tsigerror_badalg = 21
+ dns_tsigerror_badalg = 21,
+ dns_tsigerror_badtrunc = 22
};
-/*
+/*%
* Opcodes.
*/
enum {
@@ -218,7 +233,7 @@ enum {
#define dns_opcode_update ((dns_opcode_t)dns_opcode_update)
};
-/*
+/*%
* Trust levels. Must be kept in sync with trustnames[] in masterdump.c.
*/
enum {
@@ -226,11 +241,11 @@ enum {
dns_trust_none = 0,
#define dns_trust_none ((dns_trust_t)dns_trust_none)
- /* Subject to DNSSEC validation but has not yet been validated */
+ /*% Subject to DNSSEC validation but has not yet been validated */
dns_trust_pending = 1,
#define dns_trust_pending ((dns_trust_t)dns_trust_pending)
- /* Received in the additional section of a response. */
+ /*% Received in the additional section of a response. */
dns_trust_additional = 2,
#define dns_trust_additional ((dns_trust_t)dns_trust_additional)
@@ -260,7 +275,7 @@ enum {
#define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate)
};
-/*
+/*%
* Name checking severites.
*/
typedef enum {
@@ -294,6 +309,20 @@ typedef void
(*dns_updatecallback_t)(void *, isc_result_t, dns_message_t *);
typedef int
-(*dns_rdatasetorderfunc_t)(const dns_rdata_t *rdata, const void *arg);
+(*dns_rdatasetorderfunc_t)(const dns_rdata_t *, const void *);
+
+typedef isc_boolean_t
+(*dns_checkmxfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *);
+
+typedef isc_boolean_t
+(*dns_checksrvfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *);
+
+typedef isc_boolean_t
+(*dns_checknsfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *,
+ dns_rdataset_t *, dns_rdataset_t *);
+
+typedef isc_boolean_t
+(*dns_isselffunc_t)(dns_view_t *, dns_tsigkey_t *, isc_sockaddr_t *,
+ isc_sockaddr_t *, dns_rdataclass_t, void *);
#endif /* DNS_TYPES_H */
diff --git a/contrib/bind9/lib/dns/include/dns/validator.h b/contrib/bind9/lib/dns/include/dns/validator.h
index a0d6acb..acce76e 100644
--- a/contrib/bind9/lib/dns/include/dns/validator.h
+++ b/contrib/bind9/lib/dns/include/dns/validator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.h,v 1.18.12.11.6.1 2007/01/11 04:51:39 marka Exp $ */
+/* $Id: validator.h,v 1.27.18.8 2007/01/08 02:42:00 marka Exp $ */
#ifndef DNS_VALIDATOR_H
#define DNS_VALIDATOR_H 1
diff --git a/contrib/bind9/lib/dns/include/dns/version.h b/contrib/bind9/lib/dns/include/dns/version.h
index 28c83be..bb254534 100644
--- a/contrib/bind9/lib/dns/include/dns/version.h
+++ b/contrib/bind9/lib/dns/include/dns/version.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: version.h,v 1.2.224.3 2004/03/08 09:04:40 marka Exp $ */
+/* $Id: version.h,v 1.3.18.2 2005/04/29 00:16:25 marka Exp $ */
+
+/*! \file */
#include <isc/platform.h>
diff --git a/contrib/bind9/lib/dns/include/dns/view.h b/contrib/bind9/lib/dns/include/dns/view.h
index a3cd935..ea3d4c7 100644
--- a/contrib/bind9/lib/dns/include/dns/view.h
+++ b/contrib/bind9/lib/dns/include/dns/view.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: view.h,v 1.73.2.4.2.12 2004/03/10 02:55:58 marka Exp $ */
+/* $Id: view.h,v 1.91.18.9 2006/03/09 23:38:21 marka Exp $ */
#ifndef DNS_VIEW_H
#define DNS_VIEW_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* DNS View
*
* A "view" is a DNS namespace, together with an optional resolver and a
@@ -41,22 +42,22 @@
* to be accessed without locking.
*
* MP:
- * Before the view is frozen, the caller must ensure synchronization.
+ *\li Before the view is frozen, the caller must ensure synchronization.
*
- * After the view is frozen, the module guarantees appropriate
+ *\li After the view is frozen, the module guarantees appropriate
* synchronization of any data structures it creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * None.
+ *\li None.
*/
#include <stdio.h>
@@ -83,9 +84,11 @@ struct dns_view {
dns_rdataclass_t rdclass;
char * name;
dns_zt_t * zonetable;
+ dns_dlzdb_t * dlzdatabase;
dns_resolver_t * resolver;
dns_adb_t * adb;
dns_requestmgr_t * requestmgr;
+ dns_acache_t * acache;
dns_cache_t * cache;
dns_db_t * cachedb;
dns_db_t * hints;
@@ -109,6 +112,8 @@ struct dns_view {
isc_boolean_t additionalfromauth;
isc_boolean_t minimalresponses;
isc_boolean_t enablednssec;
+ isc_boolean_t enablevalidation;
+ isc_boolean_t acceptexpired;
dns_transfer_format_t transfer_format;
dns_acl_t * queryacl;
dns_acl_t * recursionacl;
@@ -127,6 +132,7 @@ struct dns_view {
isc_boolean_t checknames;
dns_name_t * dlv;
dns_fixedname_t dlv_fixed;
+ isc_uint16_t maxudp;
/*
* Configurable data for server use only,
@@ -156,109 +162,109 @@ struct dns_view {
isc_result_t
dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
const char *name, dns_view_t **viewp);
-/*
+/*%<
* Create a view.
*
* Notes:
*
- * The newly created view has no cache, no resolver, and an empty
+ *\li The newly created view has no cache, no resolver, and an empty
* zone table. The view is not frozen.
*
* Requires:
*
- * 'mctx' is a valid memory context.
+ *\li 'mctx' is a valid memory context.
*
- * 'rdclass' is a valid class.
+ *\li 'rdclass' is a valid class.
*
- * 'name' is a valid C string.
+ *\li 'name' is a valid C string.
*
- * viewp != NULL && *viewp == NULL
+ *\li viewp != NULL && *viewp == NULL
*
* Returns:
*
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*
- * Other errors are possible.
+ *\li Other errors are possible.
*/
void
dns_view_attach(dns_view_t *source, dns_view_t **targetp);
-/*
+/*%<
* Attach '*targetp' to 'source'.
*
* Requires:
*
- * 'source' is a valid, frozen view.
+ *\li 'source' is a valid, frozen view.
*
- * 'targetp' points to a NULL dns_view_t *.
+ *\li 'targetp' points to a NULL dns_view_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*
- * While *targetp is attached, the view will not shut down.
+ *\li While *targetp is attached, the view will not shut down.
*/
void
dns_view_detach(dns_view_t **viewp);
-/*
+/*%<
* Detach '*viewp' from its view.
*
* Requires:
*
- * 'viewp' points to a valid dns_view_t *
+ *\li 'viewp' points to a valid dns_view_t *
*
* Ensures:
*
- * *viewp is NULL.
+ *\li *viewp is NULL.
*/
void
dns_view_flushanddetach(dns_view_t **viewp);
-/*
+/*%<
* Detach '*viewp' from its view. If this was the last reference
* uncommited changed in zones will be flushed to disk.
*
* Requires:
*
- * 'viewp' points to a valid dns_view_t *
+ *\li 'viewp' points to a valid dns_view_t *
*
* Ensures:
*
- * *viewp is NULL.
+ *\li *viewp is NULL.
*/
void
dns_view_weakattach(dns_view_t *source, dns_view_t **targetp);
-/*
+/*%<
* Weakly attach '*targetp' to 'source'.
*
* Requires:
*
- * 'source' is a valid, frozen view.
+ *\li 'source' is a valid, frozen view.
*
- * 'targetp' points to a NULL dns_view_t *.
+ *\li 'targetp' points to a NULL dns_view_t *.
*
* Ensures:
*
- * *targetp is attached to source.
+ *\li *targetp is attached to source.
*
- * While *targetp is attached, the view will not be freed.
+ * \li While *targetp is attached, the view will not be freed.
*/
void
dns_view_weakdetach(dns_view_t **targetp);
-/*
+/*%<
* Detach '*viewp' from its view.
*
* Requires:
*
- * 'viewp' points to a valid dns_view_t *.
+ *\li 'viewp' points to a valid dns_view_t *.
*
* Ensures:
*
- * *viewp is NULL.
+ *\li *viewp is NULL.
*/
isc_result_t
@@ -270,94 +276,94 @@ dns_view_createresolver(dns_view_t *view,
dns_dispatchmgr_t *dispatchmgr,
dns_dispatch_t *dispatchv4,
dns_dispatch_t *dispatchv6);
-/*
+/*%<
* Create a resolver and address database for the view.
*
* Requires:
*
- * 'view' is a valid, unfrozen view.
+ *\li 'view' is a valid, unfrozen view.
*
- * 'view' does not have a resolver already.
+ *\li 'view' does not have a resolver already.
*
- * The requirements of dns_resolver_create() apply to 'taskmgr',
+ *\li The requirements of dns_resolver_create() apply to 'taskmgr',
* 'ntasks', 'socketmgr', 'timermgr', 'options', 'dispatchv4', and
* 'dispatchv6'.
*
* Returns:
*
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*
- * Any error that dns_resolver_create() can return.
+ *\li Any error that dns_resolver_create() can return.
*/
void
dns_view_setcache(dns_view_t *view, dns_cache_t *cache);
-/*
+/*%<
* Set the view's cache database.
*
* Requires:
*
- * 'view' is a valid, unfrozen view.
+ *\li 'view' is a valid, unfrozen view.
*
- * 'cache' is a valid cache.
+ *\li 'cache' is a valid cache.
*
* Ensures:
*
- * The cache of 'view' is 'cached.
+ * \li The cache of 'view' is 'cached.
*
- * If this is not the first call to dns_view_setcache() for this
+ *\li If this is not the first call to dns_view_setcache() for this
* view, then previously set cache is detached.
*/
void
dns_view_sethints(dns_view_t *view, dns_db_t *hints);
-/*
+/*%<
* Set the view's hints database.
*
* Requires:
*
- * 'view' is a valid, unfrozen view, whose hints database has not been
+ *\li 'view' is a valid, unfrozen view, whose hints database has not been
* set.
*
- * 'hints' is a valid zone database.
+ *\li 'hints' is a valid zone database.
*
* Ensures:
*
- * The hints database of 'view' is 'hints'.
+ * \li The hints database of 'view' is 'hints'.
*/
void
dns_view_setkeyring(dns_view_t *view, dns_tsig_keyring_t *ring);
-/*
+/*%<
* Set the view's static TSIG keys
*
* Requires:
*
- * 'view' is a valid, unfrozen view, whose static TSIG keyring has not
+ * \li 'view' is a valid, unfrozen view, whose static TSIG keyring has not
* been set.
*
- * 'ring' is a valid TSIG keyring
+ *\li 'ring' is a valid TSIG keyring
*
* Ensures:
*
- * The static TSIG keyring of 'view' is 'ring'.
+ *\li The static TSIG keyring of 'view' is 'ring'.
*/
void
dns_view_setdstport(dns_view_t *view, in_port_t dstport);
-/*
+/*%<
* Set the view's destination port. This is the port to
* which outgoing queries are sent. The default is 53,
* the standard DNS port.
*
* Requires:
*
- * 'view' is a valid view.
+ *\li 'view' is a valid view.
*
- * 'dstport' is a valid TCP/UDP port number.
+ *\li 'dstport' is a valid TCP/UDP port number.
*
* Ensures:
- * External name servers will be assumed to be listning
+ *\li External name servers will be assumed to be listning
* on 'dstport'. For servers whose address has already
* obtained obtained at the time of the call, the view may
* continue to use the previously set port until the address
@@ -367,28 +373,28 @@ dns_view_setdstport(dns_view_t *view, in_port_t dstport);
isc_result_t
dns_view_addzone(dns_view_t *view, dns_zone_t *zone);
-/*
+/*%<
* Add zone 'zone' to 'view'.
*
* Requires:
*
- * 'view' is a valid, unfrozen view.
+ *\li 'view' is a valid, unfrozen view.
*
- * 'zone' is a valid zone.
+ *\li 'zone' is a valid zone.
*/
void
dns_view_freeze(dns_view_t *view);
-/*
+/*%<
* Freeze view.
*
* Requires:
*
- * 'view' is a valid, unfrozen view.
+ *\li 'view' is a valid, unfrozen view.
*
* Ensures:
*
- * 'view' is frozen.
+ *\li 'view' is frozen.
*/
isc_result_t
@@ -396,63 +402,63 @@ dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
isc_stdtime_t now, unsigned int options, isc_boolean_t use_hints,
dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Find an rdataset whose owner name is 'name', and whose type is
* 'type'.
*
* Notes:
*
- * See the description of dns_db_find() for information about 'options'.
- * If the caller sets DNS_DBFIND_GLUEOK, it must ensure that 'name'
+ *\li See the description of dns_db_find() for information about 'options'.
+ * If the caller sets #DNS_DBFIND_GLUEOK, it must ensure that 'name'
* and 'type' are appropriate for glue retrieval.
*
- * If 'now' is zero, then the current time will be used.
+ *\li If 'now' is zero, then the current time will be used.
*
- * If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li If 'use_hints' is ISC_TRUE, and the view has a hints database, then
* it will be searched last. If the answer is found in the hints
* database, the result code will be DNS_R_HINT. If the name is found
* in the hints database but not the type, the result code will be
- * DNS_R_HINTNXRRSET.
+ * #DNS_R_HINTNXRRSET.
*
- * 'foundname' must meet the requirements of dns_db_find().
+ *\li 'foundname' must meet the requirements of dns_db_find().
*
- * If 'sigrdataset' is not NULL, and there is a SIG rdataset which
+ *\li If 'sigrdataset' is not NULL, and there is a SIG rdataset which
* covers 'type', then 'sigrdataset' will be bound to it.
*
* Requires:
*
- * 'view' is a valid, frozen view.
+ *\li 'view' is a valid, frozen view.
*
- * 'name' is valid name.
+ *\li 'name' is valid name.
*
- * 'type' is a valid dns_rdatatype_t, and is not a meta query type
+ *\li 'type' is a valid dns_rdatatype_t, and is not a meta query type
* except dns_rdatatype_any.
*
- * dbp == NULL || *dbp == NULL
+ *\li dbp == NULL || *dbp == NULL
*
- * nodep == NULL || *nodep == NULL. If nodep != NULL, dbp != NULL.
+ *\li nodep == NULL || *nodep == NULL. If nodep != NULL, dbp != NULL.
*
- * 'foundname' is a valid name with a dedicated buffer or NULL.
+ *\li 'foundname' is a valid name with a dedicated buffer or NULL.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
- * 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
+ *\li 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
*
* Ensures:
*
- * In successful cases, 'rdataset', and possibly 'sigrdataset', are
+ *\li In successful cases, 'rdataset', and possibly 'sigrdataset', are
* bound to the found data.
*
- * If dbp != NULL, it points to the database containing the data.
+ *\li If dbp != NULL, it points to the database containing the data.
*
- * If nodep != NULL, it points to the database node containing the data.
+ *\li If nodep != NULL, it points to the database node containing the data.
*
- * If foundname != NULL, it contains the full name of the found data.
+ *\li If foundname != NULL, it contains the full name of the found data.
*
* Returns:
*
- * Any result that dns_db_find() can return, with the exception of
- * DNS_R_DELEGATION.
+ *\li Any result that dns_db_find() can return, with the exception of
+ * #DNS_R_DELEGATION.
*/
isc_result_t
@@ -460,62 +466,63 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
isc_stdtime_t now, unsigned int options,
isc_boolean_t use_hints,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Find an rdataset whose owner name is 'name', and whose type is
* 'type'.
*
* Notes:
*
- * This routine is appropriate for simple, exact-match queries of the
+ *\li This routine is appropriate for simple, exact-match queries of the
* view. 'name' must be a canonical name; there is no DNAME or CNAME
* processing.
*
- * See the description of dns_db_find() for information about 'options'.
+ *\li See the description of dns_db_find() for information about 'options'.
* If the caller sets DNS_DBFIND_GLUEOK, it must ensure that 'name'
* and 'type' are appropriate for glue retrieval.
*
- * If 'now' is zero, then the current time will be used.
+ *\li If 'now' is zero, then the current time will be used.
*
- * If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li If 'use_hints' is ISC_TRUE, and the view has a hints database, then
* it will be searched last. If the answer is found in the hints
* database, the result code will be DNS_R_HINT. If the name is found
* in the hints database but not the type, the result code will be
* DNS_R_HINTNXRRSET.
*
- * If 'sigrdataset' is not NULL, and there is a SIG rdataset which
+ *\li If 'sigrdataset' is not NULL, and there is a SIG rdataset which
* covers 'type', then 'sigrdataset' will be bound to it.
*
* Requires:
*
- * 'view' is a valid, frozen view.
+ *\li 'view' is a valid, frozen view.
*
- * 'name' is valid name.
+ *\li 'name' is valid name.
*
- * 'type' is a valid dns_rdatatype_t, and is not a meta query type
+ *\li 'type' is a valid dns_rdatatype_t, and is not a meta query type
* (e.g. dns_rdatatype_any), or dns_rdatatype_rrsig.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
- * 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
+ *\li 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
*
* Ensures:
*
- * In successful cases, 'rdataset', and possibly 'sigrdataset', are
+ *\li In successful cases, 'rdataset', and possibly 'sigrdataset', are
* bound to the found data.
*
* Returns:
*
- * ISC_R_SUCCESS Success; result is desired type.
- * DNS_R_GLUE Success; result is glue.
- * DNS_R_HINT Success; result is a hint.
- * DNS_R_NCACHENXDOMAIN Success; result is a ncache entry.
- * DNS_R_NCACHENXRRSET Success; result is a ncache entry.
- * DNS_R_NXDOMAIN The name does not exist.
- * DNS_R_NXRRSET The rrset does not exist.
- * ISC_R_NOTFOUND No matching data found,
+ *\li #ISC_R_SUCCESS Success; result is desired type.
+ *\li DNS_R_GLUE Success; result is glue.
+ *\li DNS_R_HINT Success; result is a hint.
+ *\li DNS_R_NCACHENXDOMAIN Success; result is a ncache entry.
+ *\li DNS_R_NCACHENXRRSET Success; result is a ncache entry.
+ *\li DNS_R_NXDOMAIN The name does not exist.
+ *\li DNS_R_NXRRSET The rrset does not exist.
+ *\li #ISC_R_NOTFOUND No matching data found,
* or an error occurred.
*/
+/*% See dns_view_findzonecut2() */
isc_result_t
dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
isc_stdtime_t now, unsigned int options,
@@ -527,7 +534,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
isc_stdtime_t now, unsigned int options,
isc_boolean_t use_hints, isc_boolean_t use_cache,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
-/*
+/*%<
* Find the best known zonecut containing 'name'.
*
* This uses local authority, cache, and optionally hints data.
@@ -535,69 +542,69 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
*
* Notes:
*
- * If 'now' is zero, then the current time will be used.
+ *\li If 'now' is zero, then the current time will be used.
*
- * If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li If 'use_hints' is ISC_TRUE, and the view has a hints database, then
* it will be searched last.
*
- * If 'use_cache' is ISC_TRUE, and the view has a cache, then it will be
+ *\li If 'use_cache' is ISC_TRUE, and the view has a cache, then it will be
* searched.
*
- * If 'sigrdataset' is not NULL, and there is a SIG rdataset which
+ *\li If 'sigrdataset' is not NULL, and there is a SIG rdataset which
* covers 'type', then 'sigrdataset' will be bound to it.
*
- * If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
+ *\li If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
* (if any) will be the deepest known ancestor of 'name'.
*
* Requires:
*
- * 'view' is a valid, frozen view.
+ *\li 'view' is a valid, frozen view.
*
- * 'name' is valid name.
+ *\li 'name' is valid name.
*
- * 'rdataset' is a valid, disassociated rdataset.
+ *\li 'rdataset' is a valid, disassociated rdataset.
*
- * 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
+ *\li 'sigrdataset' is NULL, or is a valid, disassociated rdataset.
*
* Returns:
*
- * ISC_R_SUCCESS Success.
+ *\li #ISC_R_SUCCESS Success.
*
- * Many other results are possible.
+ *\li Many other results are possible.
*/
isc_result_t
dns_viewlist_find(dns_viewlist_t *list, const char *name,
dns_rdataclass_t rdclass, dns_view_t **viewp);
-/*
+/*%<
* Search for a view with name 'name' and class 'rdclass' in 'list'.
* If found, '*viewp' is (strongly) attached to it.
*
* Requires:
*
- * 'viewp' points to a NULL dns_view_t *.
+ *\li 'viewp' points to a NULL dns_view_t *.
*
* Returns:
*
- * ISC_R_SUCCESS A matching view was found.
- * ISC_R_NOTFOUND No matching view was found.
+ *\li #ISC_R_SUCCESS A matching view was found.
+ *\li #ISC_R_NOTFOUND No matching view was found.
*/
isc_result_t
dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
-/*
+/*%<
* Search for the zone 'name' in the zone table of 'view'.
* If found, 'zonep' is (strongly) attached to it. There
* are no partial matches.
*
* Requires:
*
- * 'zonep' points to a NULL dns_zone_t *.
+ *\li 'zonep' points to a NULL dns_zone_t *.
*
* Returns:
- * ISC_R_SUCCESS A matching zone was found.
- * ISC_R_NOTFOUND No matching zone was found.
- * others An error occurred.
+ *\li #ISC_R_SUCCESS A matching zone was found.
+ *\li #ISC_R_NOTFOUND No matching zone was found.
+ *\li others An error occurred.
*/
isc_result_t
@@ -605,7 +612,7 @@ dns_view_load(dns_view_t *view, isc_boolean_t stop);
isc_result_t
dns_view_loadnew(dns_view_t *view, isc_boolean_t stop);
-/*
+/*%<
* Load zones attached to this view. dns_view_load() loads
* all zones whose master file has changed since the last
* load; dns_view_loadnew() loads only zones that have never
@@ -616,29 +623,29 @@ dns_view_loadnew(dns_view_t *view, isc_boolean_t stop);
*
* Requires:
*
- * 'view' is valid.
+ *\li 'view' is valid.
*/
isc_result_t
dns_view_gettsig(dns_view_t *view, dns_name_t *keyname,
dns_tsigkey_t **keyp);
-/*
+/*%<
* Find the TSIG key configured in 'view' with name 'keyname',
* if any.
*
* Reqires:
- * keyp points to a NULL dns_tsigkey_t *.
+ *\li keyp points to a NULL dns_tsigkey_t *.
*
* Returns:
- * ISC_R_SUCCESS A key was found and '*keyp' now points to it.
- * ISC_R_NOTFOUND No key was found.
- * others An error occurred.
+ *\li #ISC_R_SUCCESS A key was found and '*keyp' now points to it.
+ *\li #ISC_R_NOTFOUND No key was found.
+ *\li others An error occurred.
*/
isc_result_t
dns_view_getpeertsig(dns_view_t *view, isc_netaddr_t *peeraddr,
dns_tsigkey_t **keyp);
-/*
+/*%<
* Find the TSIG key configured in 'view' for the server whose
* address is 'peeraddr', if any.
*
@@ -646,35 +653,35 @@ dns_view_getpeertsig(dns_view_t *view, isc_netaddr_t *peeraddr,
* keyp points to a NULL dns_tsigkey_t *.
*
* Returns:
- * ISC_R_SUCCESS A key was found and '*keyp' now points to it.
- * ISC_R_NOTFOUND No key was found.
- * others An error occurred.
+ *\li #ISC_R_SUCCESS A key was found and '*keyp' now points to it.
+ *\li #ISC_R_NOTFOUND No key was found.
+ *\li others An error occurred.
*/
isc_result_t
dns_view_checksig(dns_view_t *view, isc_buffer_t *source, dns_message_t *msg);
-/*
+/*%<
* Verifies the signature of a message.
*
* Requires:
*
- * 'view' is a valid view.
- * 'source' is a valid buffer containing the message
- * 'msg' is a valid message
+ *\li 'view' is a valid view.
+ *\li 'source' is a valid buffer containing the message
+ *\li 'msg' is a valid message
*
* Returns:
- * see dns_tsig_verify()
+ *\li see dns_tsig_verify()
*/
void
dns_view_dialup(dns_view_t *view);
-/*
+/*%<
* Perform dialup-time maintenance on the zones of 'view'.
*/
isc_result_t
dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
-/*
+/*%<
* Dump the current state of the view 'view' to the stream 'fp'
* for purposes of analysis or debugging.
*
@@ -685,18 +692,18 @@ dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
*
* Requires:
*
- * 'view' is valid.
+ *\li 'view' is valid.
*
- * 'fp' refers to a file open for writing.
+ *\li 'fp' refers to a file open for writing.
*
* Returns:
- * ISC_R_SUCCESS The cache was successfully dumped.
- * others An error occurred (see dns_master_dump)
+ * \li ISC_R_SUCCESS The cache was successfully dumped.
+ * \li others An error occurred (see dns_master_dump)
*/
isc_result_t
dns_view_flushcache(dns_view_t *view);
-/*
+/*%<
* Flush the view's cache (and ADB).
*
* Requires:
@@ -705,85 +712,93 @@ dns_view_flushcache(dns_view_t *view);
* No other tasks are executing.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
isc_result_t
dns_view_flushname(dns_view_t *view, dns_name_t *);
-/*
+/*%<
* Flush the given name from the view's cache (and ADB).
*
* Requires:
- * 'view' is valid.
- * 'name' is valid.
+ *\li 'view' is valid.
+ *\li 'name' is valid.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
* other returns are failures.
*/
isc_result_t
dns_view_adddelegationonly(dns_view_t *view, dns_name_t *name);
-/*
+/*%<
* Add the given name to the delegation only table.
*
*
* Requires:
- * 'view' is valid.
- * 'name' is valid.
+ *\li 'view' is valid.
+ *\li 'name' is valid.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
isc_result_t
dns_view_excludedelegationonly(dns_view_t *view, dns_name_t *name);
-/*
+/*%<
* Add the given name to be excluded from the root-delegation-only.
*
*
* Requires:
- * 'view' is valid.
- * 'name' is valid.
+ *\li 'view' is valid.
+ *\li 'name' is valid.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
isc_boolean_t
dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name);
-/*
+/*%<
* Check if 'name' is in the delegation only table or if
* rootdelonly is set that name is not being excluded.
*
* Requires:
- * 'view' is valid.
- * 'name' is valid.
+ *\li 'view' is valid.
+ *\li 'name' is valid.
*
* Returns:
- * ISC_TRUE if the name is is the table.
- * ISC_FALSE othewise.
+ *\li #ISC_TRUE if the name is is the table.
+ *\li #ISC_FALSE othewise.
*/
void
dns_view_setrootdelonly(dns_view_t *view, isc_boolean_t value);
-/*
+/*%<
* Set the root delegation only flag.
*
* Requires:
- * 'view' is valid.
+ *\li 'view' is valid.
*/
isc_boolean_t
dns_view_getrootdelonly(dns_view_t *view);
-/*
+/*%<
* Get the root delegation only flag.
*
* Requires:
- * 'view' is valid.
+ *\li 'view' is valid.
*/
+isc_result_t
+dns_view_freezezones(dns_view_t *view, isc_boolean_t freeze);
+/*%<
+ * Freeze/thaw updates to master zones.
+ *
+ * Requires:
+ * \li 'view' is valid.
+ */
#endif /* DNS_VIEW_H */
diff --git a/contrib/bind9/lib/dns/include/dns/xfrin.h b/contrib/bind9/lib/dns/include/dns/xfrin.h
index 0f5e086..fcd482e 100644
--- a/contrib/bind9/lib/dns/include/dns/xfrin.h
+++ b/contrib/bind9/lib/dns/include/dns/xfrin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: xfrin.h,v 1.18.136.4 2006/07/20 01:10:29 marka Exp $ */
+/* $Id: xfrin.h,v 1.20.18.5 2006/07/20 01:10:30 marka Exp $ */
#ifndef DNS_XFRIN_H
#define DNS_XFRIN_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* Incoming zone transfers (AXFR + IXFR).
*/
@@ -40,7 +41,7 @@
*** Types
***/
-/*
+/*%
* A transfer in progress. This is an opaque type.
*/
typedef struct dns_xfrin_ctx dns_xfrin_ctx_t;
@@ -51,6 +52,7 @@ typedef struct dns_xfrin_ctx dns_xfrin_ctx_t;
ISC_LANG_BEGINDECLS
+/*% see dns_xfrin_create2() */
isc_result_t
dns_xfrin_create(dns_zone_t *zone, dns_rdatatype_t xfrtype,
isc_sockaddr_t *masteraddr, dns_tsigkey_t *tsigkey,
@@ -65,7 +67,7 @@ dns_xfrin_create2(dns_zone_t *zone, dns_rdatatype_t xfrtype,
isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr,
isc_task_t *task, dns_xfrindone_t done,
dns_xfrin_ctx_t **xfrp);
-/*
+/*%<
* Attempt to start an incoming zone transfer of 'zone'
* from 'masteraddr', creating a dns_xfrin_ctx_t object to
* manage it. Attach '*xfrp' to the newly created object.
@@ -75,17 +77,17 @@ dns_xfrin_create2(dns_zone_t *zone, dns_rdatatype_t xfrtype,
* code as arguments when the transfer finishes.
*
* Requires:
- * 'xfrtype' is dns_rdatatype_axfr, dns_rdatatype_ixfr
+ *\li 'xfrtype' is dns_rdatatype_axfr, dns_rdatatype_ixfr
* or dns_rdatatype_soa (soa query followed by axfr if
* serial is greater than current serial).
*
- * If 'xfrtype' is dns_rdatatype_ixfr or dns_rdatatype_soa,
+ *\li If 'xfrtype' is dns_rdatatype_ixfr or dns_rdatatype_soa,
* the zone has a database.
*/
void
dns_xfrin_shutdown(dns_xfrin_ctx_t *xfr);
-/*
+/*%<
* If the zone transfer 'xfr' has already finished,
* do nothing. Otherwise, abort it and cause it to call
* its done callback with a status of ISC_R_CANCELLED.
@@ -93,14 +95,14 @@ dns_xfrin_shutdown(dns_xfrin_ctx_t *xfr);
void
dns_xfrin_detach(dns_xfrin_ctx_t **xfrp);
-/*
+/*%<
* Detach a reference to a zone transfer object.
* Caller to maintain external locking if required.
*/
void
dns_xfrin_attach(dns_xfrin_ctx_t *source, dns_xfrin_ctx_t **target);
-/*
+/*%<
* Caller to maintain external locking if required.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/zone.h b/contrib/bind9/lib/dns/include/dns/zone.h
index 4baf36a..7cb8272 100644
--- a/contrib/bind9/lib/dns/include/dns/zone.h
+++ b/contrib/bind9/lib/dns/include/dns/zone.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.106.2.7.4.18 2006/08/01 03:44:00 marka Exp $ */
+/* $Id: zone.h,v 1.126.18.19 2006/08/01 03:45:21 marka Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
+/*! \file */
+
/***
*** Imports
***/
@@ -30,6 +32,7 @@
#include <isc/lang.h>
#include <isc/rwlock.h>
+#include <dns/masterdump.h>
#include <dns/types.h>
typedef enum {
@@ -39,19 +42,30 @@ typedef enum {
dns_zone_stub
} dns_zonetype_t;
-#define DNS_ZONEOPT_SERVERS 0x00000001U /* perform server checks */
-#define DNS_ZONEOPT_PARENTS 0x00000002U /* perform parent checks */
-#define DNS_ZONEOPT_CHILDREN 0x00000004U /* perform child checks */
-#define DNS_ZONEOPT_NOTIFY 0x00000008U /* perform NOTIFY */
-#define DNS_ZONEOPT_MANYERRORS 0x00000010U /* return many errors on load */
-#define DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U /* calculate differences */
-#define DNS_ZONEOPT_NOMERGE 0x00000040U /* don't merge journal */
-#define DNS_ZONEOPT_CHECKNS 0x00000080U /* check if NS's are addresses */
-#define DNS_ZONEOPT_FATALNS 0x00000100U /* DNS_ZONEOPT_CHECKNS is fatal */
-#define DNS_ZONEOPT_MULTIMASTER 0x00000200U /* this zone has multiple masters */
-#define DNS_ZONEOPT_USEALTXFRSRC 0x00000400U /* use alternate transfer sources */
-#define DNS_ZONEOPT_CHECKNAMES 0x00000800U /* check-names */
-#define DNS_ZONEOPT_CHECKNAMESFAIL 0x00001000U /* fatal check-name failures */
+#define DNS_ZONEOPT_SERVERS 0x00000001U /*%< perform server checks */
+#define DNS_ZONEOPT_PARENTS 0x00000002U /*%< perform parent checks */
+#define DNS_ZONEOPT_CHILDREN 0x00000004U /*%< perform child checks */
+#define DNS_ZONEOPT_NOTIFY 0x00000008U /*%< perform NOTIFY */
+#define DNS_ZONEOPT_MANYERRORS 0x00000010U /*%< return many errors on load */
+#define DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U /*%< calculate differences */
+#define DNS_ZONEOPT_NOMERGE 0x00000040U /*%< don't merge journal */
+#define DNS_ZONEOPT_CHECKNS 0x00000080U /*%< check if NS's are addresses */
+#define DNS_ZONEOPT_FATALNS 0x00000100U /*%< DNS_ZONEOPT_CHECKNS is fatal */
+#define DNS_ZONEOPT_MULTIMASTER 0x00000200U /*%< this zone has multiple masters */
+#define DNS_ZONEOPT_USEALTXFRSRC 0x00000400U /*%< use alternate transfer sources */
+#define DNS_ZONEOPT_CHECKNAMES 0x00000800U /*%< check-names */
+#define DNS_ZONEOPT_CHECKNAMESFAIL 0x00001000U /*%< fatal check-name failures */
+#define DNS_ZONEOPT_CHECKWILDCARD 0x00002000U /*%< check for internal wildcards */
+#define DNS_ZONEOPT_CHECKMX 0x00004000U /*%< check-mx */
+#define DNS_ZONEOPT_CHECKMXFAIL 0x00008000U /*%< fatal check-mx failures */
+#define DNS_ZONEOPT_CHECKINTEGRITY 0x00010000U /*%< perform integrity checks */
+#define DNS_ZONEOPT_CHECKSIBLING 0x00020000U /*%< perform sibling glue checks */
+#define DNS_ZONEOPT_NOCHECKNS 0x00040000U /*%< disable IN NS address checks */
+#define DNS_ZONEOPT_WARNMXCNAME 0x00080000U /*%< warn on MX CNAME check */
+#define DNS_ZONEOPT_IGNOREMXCNAME 0x00100000U /*%< ignore MX CNAME check */
+#define DNS_ZONEOPT_WARNSRVCNAME 0x00200000U /*%< warn on SRV CNAME check */
+#define DNS_ZONEOPT_IGNORESRVCNAME 0x00400000U /*%< ignore SRV CNAME check */
+#define DNS_ZONEOPT_UPDATECHECKKSK 0x00800000U /*%< check dnskey KSK flag */
#ifndef NOMINUM_PUBLIC
/*
@@ -61,22 +75,22 @@ typedef enum {
#endif /* NOMINUM_PUBLIC */
#ifndef DNS_ZONE_MINREFRESH
-#define DNS_ZONE_MINREFRESH 300 /* 5 minutes */
+#define DNS_ZONE_MINREFRESH 300 /*%< 5 minutes */
#endif
#ifndef DNS_ZONE_MAXREFRESH
-#define DNS_ZONE_MAXREFRESH 2419200 /* 4 weeks */
+#define DNS_ZONE_MAXREFRESH 2419200 /*%< 4 weeks */
#endif
#ifndef DNS_ZONE_DEFAULTREFRESH
-#define DNS_ZONE_DEFAULTREFRESH 3600 /* 1 hour */
+#define DNS_ZONE_DEFAULTREFRESH 3600 /*%< 1 hour */
#endif
#ifndef DNS_ZONE_MINRETRY
-#define DNS_ZONE_MINRETRY 300 /* 5 minutes */
+#define DNS_ZONE_MINRETRY 300 /*%< 5 minutes */
#endif
#ifndef DNS_ZONE_MAXRETRY
-#define DNS_ZONE_MAXRETRY 1209600 /* 2 weeks */
+#define DNS_ZONE_MAXRETRY 1209600 /*%< 2 weeks */
#endif
#ifndef DNS_ZONE_DEFAULTRETRY
-#define DNS_ZONE_DEFAULTRETRY 60 /* 1 minute, subject to
+#define DNS_ZONE_DEFAULTRETRY 60 /*%< 1 minute, subject to
exponential backoff */
#endif
@@ -93,126 +107,135 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx);
-/*
+/*%<
* Creates a new empty zone and attach '*zonep' to it.
*
* Requires:
- * 'zonep' to point to a NULL pointer.
- * 'mctx' to be a valid memory context.
+ *\li 'zonep' to point to a NULL pointer.
+ *\li 'mctx' to be a valid memory context.
*
* Ensures:
- * '*zonep' refers to a valid zone.
+ *\li '*zonep' refers to a valid zone.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * ISC_R_UNEXPECTED
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_UNEXPECTED
*/
void
dns_zone_setclass(dns_zone_t *zone, dns_rdataclass_t rdclass);
-/*
+/*%<
* Sets the class of a zone. This operation can only be performed
* once on a zone.
*
* Require:
- * 'zone' to be a valid zone.
- * dns_zone_setclass() not to have been called since the zone was
+ *\li 'zone' to be a valid zone.
+ *\li dns_zone_setclass() not to have been called since the zone was
* created.
- * 'rdclass' != dns_rdataclass_none.
+ *\li 'rdclass' != dns_rdataclass_none.
*/
dns_rdataclass_t
dns_zone_getclass(dns_zone_t *zone);
-/*
+/*%<
* Returns the current zone class.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_settype(dns_zone_t *zone, dns_zonetype_t type);
-/*
+/*%<
* Sets the zone type. This operation can only be performed once on
* a zone.
*
* Requires:
- * 'zone' to be a valid zone.
- * dns_zone_settype() not to have been called since the zone was
+ *\li 'zone' to be a valid zone.
+ *\li dns_zone_settype() not to have been called since the zone was
* created.
- * 'type' != dns_zone_none
+ *\li 'type' != dns_zone_none
*/
void
dns_zone_setview(dns_zone_t *zone, dns_view_t *view);
-/*
+/*%<
* Associate the zone with a view.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
dns_view_t *
dns_zone_getview(dns_zone_t *zone);
-/*
+/*%<
* Returns the zone's associated view.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin);
-/*
+/*%<
* Sets the zones origin to 'origin'.
*
* Require:
- * 'zone' to be a valid zone.
- * 'origin' to be non NULL.
+ *\li 'zone' to be a valid zone.
+ *\li 'origin' to be non NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
dns_name_t *
dns_zone_getorigin(dns_zone_t *zone);
-/*
+/*%<
* Returns the value of the origin.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setfile(dns_zone_t *zone, const char *file);
-/*
- * Sets the name of the master file from which the zone
- * loads its database to 'file'. For zones that have
- * no associated master file, 'file' will be NULL.
+
+isc_result_t
+dns_zone_setfile2(dns_zone_t *zone, const char *file,
+ dns_masterformat_t format);
+/*%<
+ * Sets the name of the master file in the format of 'format' from which
+ * the zone loads its database to 'file'.
+ *
+ * For zones that have no associated master file, 'file' will be NULL.
*
* For zones with persistent databases, the file name
* setting is ignored.
*
+ * dns_zone_setfile() is a backward-compatible form of
+ * dns_zone_setfile2(), which always specifies the
+ * dns_masterformat_text (RFC1035) format.
+ *
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * ISC_R_NOMEMORY
- * ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
*/
const char *
dns_zone_getfile(dns_zone_t *zone);
-/*
+/*%<
* Gets the name of the zone's master file, if any.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*
* Returns:
- * Pointer to null-terminated file name, or NULL.
+ *\li Pointer to null-terminated file name, or NULL.
*/
isc_result_t
@@ -220,7 +243,7 @@ dns_zone_load(dns_zone_t *zone);
isc_result_t
dns_zone_loadnew(dns_zone_t *zone);
-/*
+/*%<
* Cause the database to be loaded from its backing store.
* Confirm that the minimum requirements for the zone type are
* met, otherwise DNS_R_BADZONE is returned.
@@ -230,187 +253,216 @@ dns_zone_loadnew(dns_zone_t *zone);
* and whose master file has changed since the last load.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * ISC_R_UNEXPECTED
- * ISC_R_SUCCESS
- * DNS_R_CONTINUE Incremental load has been queued.
- * DNS_R_UPTODATE The zone has already been loaded based on
+ *\li #ISC_R_UNEXPECTED
+ *\li #ISC_R_SUCCESS
+ *\li DNS_R_CONTINUE Incremental load has been queued.
+ *\li DNS_R_UPTODATE The zone has already been loaded based on
* file system timestamps.
- * DNS_R_BADZONE
- * Any result value from dns_db_load().
+ *\li DNS_R_BADZONE
+ *\li Any result value from dns_db_load().
*/
void
dns_zone_attach(dns_zone_t *source, dns_zone_t **target);
-/*
+/*%<
* Attach '*target' to 'source' incrementing its external
* reference count.
*
* Require:
- * 'zone' to be a valid zone.
- * 'target' to be non NULL and '*target' to be NULL.
+ *\li 'zone' to be a valid zone.
+ *\li 'target' to be non NULL and '*target' to be NULL.
*/
void
dns_zone_detach(dns_zone_t **zonep);
-/*
+/*%<
* Detach from a zone decrementing its external reference count.
* If this was the last external reference to the zone it will be
* shut down and eventually freed.
*
* Require:
- * 'zonep' to point to a valid zone.
+ *\li 'zonep' to point to a valid zone.
*/
void
dns_zone_iattach(dns_zone_t *source, dns_zone_t **target);
-/*
+/*%<
* Attach '*target' to 'source' incrementing its internal
* reference count. This is intended for use by operations
* such as zone transfers that need to prevent the zone
* object from being freed but not from shutting down.
*
* Require:
- * The caller is running in the context of the zone's task.
- * 'zone' to be a valid zone.
- * 'target' to be non NULL and '*target' to be NULL.
+ *\li The caller is running in the context of the zone's task.
+ *\li 'zone' to be a valid zone.
+ *\li 'target' to be non NULL and '*target' to be NULL.
*/
void
dns_zone_idetach(dns_zone_t **zonep);
-/*
+/*%<
* Detach from a zone decrementing its internal reference count.
* If there are no more internal or external references to the
* zone, it will be freed.
*
* Require:
- * The caller is running in the context of the zone's task.
- * 'zonep' to point to a valid zone.
+ *\li The caller is running in the context of the zone's task.
+ *\li 'zonep' to point to a valid zone.
*/
void
dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value);
-/*
+/*%<
* Sets ('value' == 'ISC_TRUE') / clears ('value' == 'IS_FALSE')
* zone flags. Valid flag bits are DNS_ZONE_F_*.
*
* Requires
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_getdb(dns_zone_t *zone, dns_db_t **dbp);
-/*
+/*%<
* Attach '*dbp' to the database to if it exists otherwise
* return DNS_R_NOTLOADED.
*
* Require:
- * 'zone' to be a valid zone.
- * 'dbp' to be != NULL && '*dbp' == NULL.
+ *\li 'zone' to be a valid zone.
+ *\li 'dbp' to be != NULL && '*dbp' == NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_NOTLOADED
+ *\li #ISC_R_SUCCESS
+ *\li DNS_R_NOTLOADED
*/
isc_result_t
dns_zone_setdbtype(dns_zone_t *zone,
unsigned int dbargc, const char * const *dbargv);
-/*
+/*%<
* Sets the database type to dbargv[0] and database arguments
* to subsequent dbargv elements.
* 'db_type' is not checked to see if it is a valid database type.
*
* Require:
- * 'zone' to be a valid zone.
- * 'database' to be non NULL.
- * 'dbargc' to be >= 1
- * 'dbargv' to point to dbargc NULL-terminated strings
+ *\li 'zone' to be a valid zone.
+ *\li 'database' to be non NULL.
+ *\li 'dbargc' to be >= 1
+ *\li 'dbargv' to point to dbargc NULL-terminated strings
*
* Returns:
- * ISC_R_NOMEMORY
- * ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ */
+
+isc_result_t
+dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx);
+/*%<
+ * Returns the current dbtype. isc_mem_free() should be used
+ * to free 'argv' after use.
+ *
+ * Require:
+ *\li 'zone' to be a valid zone.
+ *\li 'argv' to be non NULL and *argv to be NULL.
+ *\li 'mctx' to be valid.
+ *
+ * Returns:
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
*/
void
dns_zone_markdirty(dns_zone_t *zone);
-/*
+/*%<
* Mark a zone as 'dirty'.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_expire(dns_zone_t *zone);
-/*
+/*%<
* Mark the zone as expired. If the zone requires dumping cause it to
* be initiated. Set the refresh and retry intervals to there default
* values and unload the zone.
*
* Require
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_refresh(dns_zone_t *zone);
-/*
+/*%<
* Initiate zone up to date checks. The zone must already be being
* managed.
*
* Require
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_flush(dns_zone_t *zone);
-/*
+/*%<
* Write the zone to database if there are uncommited changes.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_dump(dns_zone_t *zone);
-/*
+/*%<
* Write the zone to database.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_dumptostream(dns_zone_t *zone, FILE *fd);
-/*
- * Write the zone to stream 'fd'.
+
+isc_result_t
+dns_zone_dumptostream2(dns_zone_t *zone, FILE *fd, dns_masterformat_t format,
+ const dns_master_style_t *style);
+/*%<
+ * Write the zone to stream 'fd' in the specified 'format'.
+ * If the 'format' is dns_masterformat_text (RFC1035), 'style' also
+ * specifies the file style (e.g., &dns_master_style_default).
+ *
+ * dns_zone_dumptostream() is a backward-compatible form of
+ * dns_zone_dumptostream2(), which always uses the dns_masterformat_text
+ * format and the dns_master_style_default style.
+ *
+ * Note that dns_zone_dumptostream2() is the most flexible form. It
+ * can also provide the functionality of dns_zone_fulldumptostream().
*
* Require:
- * 'zone' to be a valid zone.
- * 'fd' to be a stream open for writing.
+ *\li 'zone' to be a valid zone.
+ *\li 'fd' to be a stream open for writing.
*/
isc_result_t
dns_zone_fulldumptostream(dns_zone_t *zone, FILE *fd);
-/*
+/*%<
* The same as dns_zone_dumptostream, but dumps the zone with
* different dump settings (dns_master_style_full).
*
* Require:
- * 'zone' to be a valid zone.
- * 'fd' to be a stream open for writing.
+ *\li 'zone' to be a valid zone.
+ *\li 'fd' to be a stream open for writing.
*/
void
dns_zone_maintenance(dns_zone_t *zone);
-/*
+/*%<
* Perform regular maintenace on the zone. This is called as a
* result of a zone being managed.
*
* Require
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
@@ -421,108 +473,108 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone,
const isc_sockaddr_t *masters,
dns_name_t **keynames,
isc_uint32_t count);
-/*
+/*%<
* Set the list of master servers for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'masters' array of isc_sockaddr_t with port set or NULL.
- * 'count' the number of masters.
- * 'keynames' array of dns_name_t's for tsig keys or NULL.
+ *\li 'zone' to be a valid zone.
+ *\li 'masters' array of isc_sockaddr_t with port set or NULL.
+ *\li 'count' the number of masters.
+ *\li 'keynames' array of dns_name_t's for tsig keys or NULL.
*
- * dns_zone_setmasters() is just a wrapper to setmasterswithkeys(),
+ * \li dns_zone_setmasters() is just a wrapper to setmasterswithkeys(),
* passing NULL in the keynames field.
*
- * If 'masters' is NULL then 'count' must be zero.
+ * \li If 'masters' is NULL then 'count' must be zero.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
- * Any result dns_name_dup() can return, if keynames!=NULL
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li Any result dns_name_dup() can return, if keynames!=NULL
*/
isc_result_t
dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
isc_uint32_t count);
-/*
+/*%<
* Set the list of additional servers to be notified when
* a zone changes. To clear the list use 'count = 0'.
*
* Require:
- * 'zone' to be a valid zone.
- * 'notify' to be non-NULL if count != 0.
- * 'count' to be the number of notifyees.
+ *\li 'zone' to be a valid zone.
+ *\li 'notify' to be non-NULL if count != 0.
+ *\li 'count' to be the number of notifyees.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
void
dns_zone_unload(dns_zone_t *zone);
-/*
+/*%<
* detach the database from the zone structure.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_setoption(dns_zone_t *zone, unsigned int option, isc_boolean_t value);
-/*
+/*%<
* Set given options on ('value' == ISC_TRUE) or off ('value' ==
- * ISC_FALSE).
+ * #ISC_FALSE).
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
unsigned int
dns_zone_getoptions(dns_zone_t *zone);
-/*
+/*%<
* Returns the current zone options.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_setminrefreshtime(dns_zone_t *zone, isc_uint32_t val);
-/*
+/*%<
* Set the minimum refresh time.
*
* Requires:
- * 'zone' is valid.
- * val > 0.
+ *\li 'zone' is valid.
+ *\li val > 0.
*/
void
dns_zone_setmaxrefreshtime(dns_zone_t *zone, isc_uint32_t val);
-/*
+/*%<
* Set the maximum refresh time.
*
* Requires:
- * 'zone' is valid.
- * val > 0.
+ *\li 'zone' is valid.
+ *\li val > 0.
*/
void
dns_zone_setminretrytime(dns_zone_t *zone, isc_uint32_t val);
-/*
+/*%<
* Set the minimum retry time.
*
* Requires:
- * 'zone' is valid.
- * val > 0.
+ *\li 'zone' is valid.
+ *\li val > 0.
*/
void
dns_zone_setmaxretrytime(dns_zone_t *zone, isc_uint32_t val);
-/*
+/*%<
* Set the maximum retry time.
*
* Requires:
- * 'zone' is valid.
+ *\li 'zone' is valid.
* val > 0.
*/
@@ -531,436 +583,454 @@ dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
isc_result_t
dns_zone_setaltxfrsource4(dns_zone_t *zone,
const isc_sockaddr_t *xfrsource);
-/*
+/*%<
* Set the source address to be used in IPv4 zone transfers.
*
* Require:
- * 'zone' to be a valid zone.
- * 'xfrsource' to contain the address.
+ *\li 'zone' to be a valid zone.
+ *\li 'xfrsource' to contain the address.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*/
isc_sockaddr_t *
dns_zone_getxfrsource4(dns_zone_t *zone);
isc_sockaddr_t *
dns_zone_getaltxfrsource4(dns_zone_t *zone);
-/*
+/*%<
* Returns the source address set by a previous dns_zone_setxfrsource4
* call, or the default of inaddr_any, port 0.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
isc_result_t
dns_zone_setaltxfrsource6(dns_zone_t *zone,
- const isc_sockaddr_t *xfrsource);
-/*
+ const isc_sockaddr_t *xfrsource);
+/*%<
* Set the source address to be used in IPv6 zone transfers.
*
* Require:
- * 'zone' to be a valid zone.
- * 'xfrsource' to contain the address.
+ *\li 'zone' to be a valid zone.
+ *\li 'xfrsource' to contain the address.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*/
isc_sockaddr_t *
dns_zone_getxfrsource6(dns_zone_t *zone);
isc_sockaddr_t *
dns_zone_getaltxfrsource6(dns_zone_t *zone);
-/*
+/*%<
* Returns the source address set by a previous dns_zone_setxfrsource6
* call, or the default of in6addr_any, port 0.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
-/*
+/*%<
* Set the source address to be used with IPv4 NOTIFY messages.
*
* Require:
- * 'zone' to be a valid zone.
- * 'notifysrc' to contain the address.
+ *\li 'zone' to be a valid zone.
+ *\li 'notifysrc' to contain the address.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*/
isc_sockaddr_t *
dns_zone_getnotifysrc4(dns_zone_t *zone);
-/*
+/*%<
* Returns the source address set by a previous dns_zone_setnotifysrc4
* call, or the default of inaddr_any, port 0.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
-/*
+/*%<
* Set the source address to be used with IPv6 NOTIFY messages.
*
* Require:
- * 'zone' to be a valid zone.
- * 'notifysrc' to contain the address.
+ *\li 'zone' to be a valid zone.
+ *\li 'notifysrc' to contain the address.
*
* Returns:
- * ISC_R_SUCCESS
+ *\li #ISC_R_SUCCESS
*/
isc_sockaddr_t *
dns_zone_getnotifysrc6(dns_zone_t *zone);
-/*
+/*%<
* Returns the source address set by a previous dns_zone_setnotifysrc6
* call, or the default of in6addr_any, port 0.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_setnotifyacl(dns_zone_t *zone, dns_acl_t *acl);
-/*
+/*%<
* Sets the notify acl list for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'acl' to be a valid acl.
+ *\li 'zone' to be a valid zone.
+ *\li 'acl' to be a valid acl.
*/
void
dns_zone_setqueryacl(dns_zone_t *zone, dns_acl_t *acl);
-/*
+/*%<
* Sets the query acl list for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'acl' to be a valid acl.
+ *\li 'zone' to be a valid zone.
+ *\li 'acl' to be a valid acl.
*/
void
dns_zone_setupdateacl(dns_zone_t *zone, dns_acl_t *acl);
-/*
+/*%<
* Sets the update acl list for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'acl' to be valid acl.
+ *\li 'zone' to be a valid zone.
+ *\li 'acl' to be valid acl.
*/
void
dns_zone_setforwardacl(dns_zone_t *zone, dns_acl_t *acl);
-/*
+/*%<
* Sets the forward unsigned updates acl list for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'acl' to be valid acl.
+ *\li 'zone' to be a valid zone.
+ *\li 'acl' to be valid acl.
*/
void
dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl);
-/*
+/*%<
* Sets the transfer acl list for the zone.
*
* Require:
- * 'zone' to be a valid zone.
- * 'acl' to be valid acl.
+ *\li 'zone' to be a valid zone.
+ *\li 'acl' to be valid acl.
*/
dns_acl_t *
dns_zone_getnotifyacl(dns_zone_t *zone);
-/*
+/*%<
* Returns the current notify acl or NULL.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * acl a pointer to the acl.
- * NULL
+ *\li acl a pointer to the acl.
+ *\li NULL
*/
dns_acl_t *
dns_zone_getqueryacl(dns_zone_t *zone);
-/*
+/*%<
* Returns the current query acl or NULL.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * acl a pointer to the acl.
- * NULL
+ *\li acl a pointer to the acl.
+ *\li NULL
*/
dns_acl_t *
dns_zone_getupdateacl(dns_zone_t *zone);
-/*
+/*%<
* Returns the current update acl or NULL.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * acl a pointer to the acl.
- * NULL
+ *\li acl a pointer to the acl.
+ *\li NULL
*/
dns_acl_t *
dns_zone_getforwardacl(dns_zone_t *zone);
-/*
+/*%<
* Returns the current forward unsigned updates acl or NULL.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * acl a pointer to the acl.
- * NULL
+ *\li acl a pointer to the acl.
+ *\li NULL
*/
dns_acl_t *
dns_zone_getxfracl(dns_zone_t *zone);
-/*
+/*%<
* Returns the current transfer acl or NULL.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * acl a pointer to the acl.
- * NULL
+ *\li acl a pointer to the acl.
+ *\li NULL
*/
void
dns_zone_clearupdateacl(dns_zone_t *zone);
-/*
+/*%<
* Clear the current update acl.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_clearforwardacl(dns_zone_t *zone);
-/*
+/*%<
* Clear the current forward unsigned updates acl.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_clearnotifyacl(dns_zone_t *zone);
-/*
+/*%<
* Clear the current notify acl.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_clearqueryacl(dns_zone_t *zone);
-/*
+/*%<
* Clear the current query acl.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_clearxfracl(dns_zone_t *zone);
-/*
+/*%<
* Clear the current transfer acl.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_boolean_t
dns_zone_getupdatedisabled(dns_zone_t *zone);
+/*%<
+ * Return update disabled.
+ */
void
dns_zone_setupdatedisabled(dns_zone_t *zone, isc_boolean_t state);
+/*%<
+ * Set update disabled.
+ */
+
+isc_boolean_t
+dns_zone_getzeronosoattl(dns_zone_t *zone);
+/*%<
+ * Return zero-no-soa-ttl status.
+ */
+
+void
+dns_zone_setzeronosoattl(dns_zone_t *zone, isc_boolean_t state);
+/*%<
+ * Set zero-no-soa-ttl status.
+ */
void
dns_zone_setchecknames(dns_zone_t *zone, dns_severity_t severity);
-/*
+/*%<
* Set the severity of name checking when loading a zone.
*
* Require:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
dns_severity_t
dns_zone_getchecknames(dns_zone_t *zone);
-/*
+/*%<
* Return the current severity of name checking.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
void
dns_zone_setjournalsize(dns_zone_t *zone, isc_int32_t size);
-/*
+/*%<
* Sets the journal size for the zone.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_int32_t
dns_zone_getjournalsize(dns_zone_t *zone);
-/*
+/*%<
* Return the journal size as set with a previous call to
* dns_zone_setjournalsize().
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
dns_message_t *msg);
-/*
+/*%<
* Tell the zone that it has recieved a NOTIFY message from another
* server. This may cause some zone maintainence activity to occur.
*
* Requires:
- * 'zone' to be a valid zone.
- * '*from' to contain the address of the server from which 'msg'
+ *\li 'zone' to be a valid zone.
+ *\li '*from' to contain the address of the server from which 'msg'
* was recieved.
- * 'msg' a message with opcode NOTIFY and qr clear.
+ *\li 'msg' a message with opcode NOTIFY and qr clear.
*
* Returns:
- * DNS_R_REFUSED
- * DNS_R_NOTIMP
- * DNS_R_FORMERR
- * DNS_R_SUCCESS
+ *\li DNS_R_REFUSED
+ *\li DNS_R_NOTIMP
+ *\li DNS_R_FORMERR
+ *\li DNS_R_SUCCESS
*/
void
dns_zone_setmaxxfrin(dns_zone_t *zone, isc_uint32_t maxxfrin);
-/*
+/*%<
* Set the maximum time (in seconds) that a zone transfer in (AXFR/IXFR)
* of this zone will use before being aborted.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ * \li 'zone' to be valid initialised zone.
*/
isc_uint32_t
dns_zone_getmaxxfrin(dns_zone_t *zone);
-/*
+/*%<
* Returns the maximum transfer time for this zone. This will be
* either the value set by the last call to dns_zone_setmaxxfrin() or
* the default value of 1 hour.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*/
void
dns_zone_setmaxxfrout(dns_zone_t *zone, isc_uint32_t maxxfrout);
-/*
+/*%<
* Set the maximum time (in seconds) that a zone transfer out (AXFR/IXFR)
* of this zone will use before being aborted.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ * \li 'zone' to be valid initialised zone.
*/
isc_uint32_t
dns_zone_getmaxxfrout(dns_zone_t *zone);
-/*
+/*%<
* Returns the maximum transfer time for this zone. This will be
* either the value set by the last call to dns_zone_setmaxxfrout() or
* the default value of 1 hour.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*/
isc_result_t
dns_zone_setjournal(dns_zone_t *zone, const char *journal);
-/*
+/*%<
* Sets the filename used for journaling updates / IXFR transfers.
* The default journal name is set by dns_zone_setfile() to be
* "file.jnl". If 'journal' is NULL, the zone will have no
* journal name.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
*/
char *
dns_zone_getjournal(dns_zone_t *zone);
-/*
+/*%<
* Returns the journal name associated with this zone.
* If no journal has been set this will be NULL.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*/
dns_zonetype_t
dns_zone_gettype(dns_zone_t *zone);
-/*
+/*%<
* Returns the type of the zone (master/slave/etc.)
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*/
void
dns_zone_settask(dns_zone_t *zone, isc_task_t *task);
-/*
+/*%<
* Give a zone a task to work with. Any current task will be detached.
*
* Requires:
- * 'zone' to be valid.
- * 'task' to be valid.
+ *\li 'zone' to be valid.
+ *\li 'task' to be valid.
*/
void
dns_zone_gettask(dns_zone_t *zone, isc_task_t **target);
-/*
+/*%<
* Attach '*target' to the zone's task.
*
* Requires:
- * 'zone' to be valid initialised zone.
- * 'zone' to have a task.
- * 'target' to be != NULL && '*target' == NULL.
+ *\li 'zone' to be valid initialised zone.
+ *\li 'zone' to have a task.
+ *\li 'target' to be != NULL && '*target' == NULL.
*/
void
dns_zone_notify(dns_zone_t *zone);
-/*
+/*%<
* Generate notify events for this zone.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump);
-/*
+/*%<
* Replace the database of "zone" with a new database "db".
*
* If "dump" is ISC_TRUE, then the new zone contents are dumped
@@ -974,11 +1044,11 @@ dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump);
* journal file, and the master file dump is postponed.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*
* Returns:
- * DNS_R_SUCCESS
- * DNS_R_BADZONE zone failed basic consistancy checks:
+ * \li DNS_R_SUCCESS
+ * \li DNS_R_BADZONE zone failed basic consistancy checks:
* * a single SOA must exist
* * some NS records must exist.
* Others
@@ -986,111 +1056,111 @@ dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump);
isc_uint32_t
dns_zone_getidlein(dns_zone_t *zone);
-/*
+/*%<
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*
* Returns:
- * number of seconds of idle time before we abort the transfer in.
+ * \li number of seconds of idle time before we abort the transfer in.
*/
void
dns_zone_setidlein(dns_zone_t *zone, isc_uint32_t idlein);
-/*
- * Set the idle timeout for transfer the.
- * Zero set the default value, 1 hour.
+/*%<
+ * \li Set the idle timeout for transfer the.
+ * \li Zero set the default value, 1 hour.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
isc_uint32_t
dns_zone_getidleout(dns_zone_t *zone);
-/*
+/*%<
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*
* Returns:
- * number of seconds of idle time before we abort a transfer out.
+ * \li number of seconds of idle time before we abort a transfer out.
*/
void
dns_zone_setidleout(dns_zone_t *zone, isc_uint32_t idleout);
-/*
- * Set the idle timeout for transfers out.
- * Zero set the default value, 1 hour.
+/*%<
+ * \li Set the idle timeout for transfers out.
+ * \li Zero set the default value, 1 hour.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
void
dns_zone_getssutable(dns_zone_t *zone, dns_ssutable_t **table);
-/*
+/*%<
* Get the simple-secure-update policy table.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
void
dns_zone_setssutable(dns_zone_t *zone, dns_ssutable_t *table);
-/*
+/*%<
* Set / clear the simple-secure-update policy table.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
isc_mem_t *
dns_zone_getmctx(dns_zone_t *zone);
-/*
+/*%<
* Get the memory context of a zone.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
dns_zonemgr_t *
dns_zone_getmgr(dns_zone_t *zone);
-/*
+/*%<
* If 'zone' is managed return the zone manager otherwise NULL.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
void
dns_zone_setsigvalidityinterval(dns_zone_t *zone, isc_uint32_t interval);
-/*
+/*%<
* Set the zone's SIG validity interval. This is the length of time
* for which DNSSEC signatures created as a result of dynamic updates
* to secure zones will remain valid, in seconds.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
isc_uint32_t
dns_zone_getsigvalidityinterval(dns_zone_t *zone);
-/*
+/*%<
* Get the zone's SIG validity interval.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
void
dns_zone_setnotifytype(dns_zone_t *zone, dns_notifytype_t notifytype);
-/*
+/*%<
* Sets zone notify method to "notifytype"
*/
isc_result_t
dns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg,
dns_updatecallback_t callback, void *callback_arg);
-/*
+/*%<
* Forward 'msg' to each master in turn until we get an answer or we
* have exausted the list of masters. 'callback' will be called with
* ISC_R_SUCCESS if we get an answer and the returned message will be
@@ -1100,69 +1170,69 @@ dns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg,
* (callback)(callback_arg, result, answer_message);
*
* Require:
- * 'zone' to be valid
- * 'msg' to be valid.
- * 'callback' to be non NULL.
+ *\li 'zone' to be valid
+ *\li 'msg' to be valid.
+ *\li 'callback' to be non NULL.
* Returns:
- * ISC_R_SUCCESS if the message has been forwarded,
- * ISC_R_NOMEMORY
- * Others
+ *\li #ISC_R_SUCCESS if the message has been forwarded,
+ *\li #ISC_R_NOMEMORY
+ *\li Others
*/
isc_result_t
dns_zone_next(dns_zone_t *zone, dns_zone_t **next);
-/*
+/*%<
* Find the next zone in the list of managed zones.
*
* Requires:
- * 'zone' to be valid
- * The zone manager for the indicated zone MUST be locked
+ *\li 'zone' to be valid
+ *\li The zone manager for the indicated zone MUST be locked
* by the caller. This is not checked.
- * 'next' be non-NULL, and '*next' be NULL.
+ *\li 'next' be non-NULL, and '*next' be NULL.
*
* Ensures:
- * 'next' points to a valid zone (result ISC_R_SUCCESS) or to NULL
+ *\li 'next' points to a valid zone (result ISC_R_SUCCESS) or to NULL
* (result ISC_R_NOMORE).
*/
isc_result_t
dns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first);
-/*
+/*%<
* Find the first zone in the list of managed zones.
*
* Requires:
- * 'zonemgr' to be valid
- * The zone manager for the indicated zone MUST be locked
+ *\li 'zonemgr' to be valid
+ *\li The zone manager for the indicated zone MUST be locked
* by the caller. This is not checked.
- * 'first' be non-NULL, and '*first' be NULL
+ *\li 'first' be non-NULL, and '*first' be NULL
*
* Ensures:
- * 'first' points to a valid zone (result ISC_R_SUCCESS) or to NULL
+ *\li 'first' points to a valid zone (result ISC_R_SUCCESS) or to NULL
* (result ISC_R_NOMORE).
*/
isc_result_t
dns_zone_setkeydirectory(dns_zone_t *zone, const char *directory);
-/*
+/*%<
* Sets the name of the directory where private keys used for
* online signing of dynamic zones are found.
*
* Require:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*
* Returns:
- * ISC_R_NOMEMORY
- * ISC_R_SUCCESS
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
*/
const char *
dns_zone_getkeydirectory(dns_zone_t *zone);
-/*
+/*%<
* Gets the name of the directory where private keys used for
* online signing of dynamic zones are found.
*
* Requires:
- * 'zone' to be valid initialised zone.
+ *\li 'zone' to be valid initialised zone.
*
* Returns:
* Pointer to null-terminated file name, or NULL.
@@ -1173,231 +1243,231 @@ isc_result_t
dns_zonemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr,
dns_zonemgr_t **zmgrp);
-/*
+/*%<
* Create a zone manager.
*
* Requires:
- * 'mctx' to be a valid memory context.
- * 'taskmgr' to be a valid task manager.
- * 'timermgr' to be a valid timer manager.
- * 'zmgrp' to point to a NULL pointer.
+ *\li 'mctx' to be a valid memory context.
+ *\li 'taskmgr' to be a valid task manager.
+ *\li 'timermgr' to be a valid timer manager.
+ *\li 'zmgrp' to point to a NULL pointer.
*/
isc_result_t
dns_zonemgr_managezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);
-/*
+/*%<
* Bring the zone under control of a zone manager.
*
* Require:
- * 'zmgr' to be a valid zone manager.
- * 'zone' to be a valid zone.
+ *\li 'zmgr' to be a valid zone manager.
+ *\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zonemgr_forcemaint(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Force zone maintenance of all zones managed by 'zmgr' at its
* earliest conveniene.
*/
void
dns_zonemgr_resumexfrs(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Attempt to start any stalled zone transfers.
*/
void
dns_zonemgr_shutdown(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Shut down the zone manager.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
void
dns_zonemgr_attach(dns_zonemgr_t *source, dns_zonemgr_t **target);
-/*
+/*%<
* Attach '*target' to 'source' incrementing its external
* reference count.
*
* Require:
- * 'zone' to be a valid zone.
- * 'target' to be non NULL and '*target' to be NULL.
+ *\li 'zone' to be a valid zone.
+ *\li 'target' to be non NULL and '*target' to be NULL.
*/
void
dns_zonemgr_detach(dns_zonemgr_t **zmgrp);
-/*
+/*%<
* Detach from a zone manager.
*
* Requires:
- * '*zmgrp' is a valid, non-NULL zone manager pointer.
+ *\li '*zmgrp' is a valid, non-NULL zone manager pointer.
*
* Ensures:
- * '*zmgrp' is NULL.
+ *\li '*zmgrp' is NULL.
*/
void
dns_zonemgr_releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);
-/*
+/*%<
* Release 'zone' from the managed by 'zmgr'. 'zmgr' is implicitly
* detached from 'zone'.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
- * 'zone' to be a valid zone.
- * 'zmgr' == 'zone->zmgr'
+ *\li 'zmgr' to be a valid zone manager.
+ *\li 'zone' to be a valid zone.
+ *\li 'zmgr' == 'zone->zmgr'
*
* Ensures:
- * 'zone->zmgr' == NULL;
+ *\li 'zone->zmgr' == NULL;
*/
void
dns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, isc_uint32_t value);
-/*
+/*%<
* Set the maximum number of simultaneous transfers in allowed by
* the zone manager.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
isc_uint32_t
dns_zonemgr_getttransfersin(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Return the the maximum number of simultaneous transfers in allowed.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
void
dns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, isc_uint32_t value);
-/*
+/*%<
* Set the number of zone transfers allowed per nameserver.
*
* Requires:
- * 'zmgr' to be a valid zone manager
+ *\li 'zmgr' to be a valid zone manager
*/
isc_uint32_t
dns_zonemgr_getttransfersperns(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Return the number of transfers allowed per nameserver.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
void
dns_zonemgr_setiolimit(dns_zonemgr_t *zmgr, isc_uint32_t iolimit);
-/*
+/*%<
* Set the number of simultaneous file descriptors available for
* reading and writing masterfiles.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
- * 'iolimit' to be positive.
+ *\li 'zmgr' to be a valid zone manager.
+ *\li 'iolimit' to be positive.
*/
isc_uint32_t
dns_zonemgr_getiolimit(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Get the number of simultaneous file descriptors available for
* reading and writing masterfiles.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
void
dns_zonemgr_setserialqueryrate(dns_zonemgr_t *zmgr, unsigned int value);
-/*
+/*%<
* Set the number of SOA queries sent per second.
*
* Requires:
- * 'zmgr' to be a valid zone manager
+ *\li 'zmgr' to be a valid zone manager
*/
unsigned int
dns_zonemgr_getserialqueryrate(dns_zonemgr_t *zmgr);
-/*
+/*%<
* Return the number of SOA queries sent per second.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
+ *\li 'zmgr' to be a valid zone manager.
*/
unsigned int
dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state);
-/*
+/*%<
* Returns the number of zones in the specified state.
*
* Requires:
- * 'zmgr' to be a valid zone manager.
- * 'state' to be a valid DNS_ZONESTATE_ constant.
+ *\li 'zmgr' to be a valid zone manager.
+ *\li 'state' to be a valid DNS_ZONESTATE_ constant.
*/
void
dns_zone_forcereload(dns_zone_t *zone);
-/*
+/*%<
* Force a reload of specified zone.
*
* Requires:
- * 'zone' to be a valid zone.
+ *\li 'zone' to be a valid zone.
*/
isc_boolean_t
dns_zone_isforced(dns_zone_t *zone);
-/*
+/*%<
* Check if the zone is waiting a forced reload.
*
* Requires:
- * 'zone' to be a valid zone.
+ * \li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setstatistics(dns_zone_t *zone, isc_boolean_t on);
-/*
+/*%<
* Make the zone keep or not keep an array of statistics
* counter.
*
* Requires:
- * zone be a valid zone.
+ * \li zone be a valid zone.
*/
isc_uint64_t *
dns_zone_getstatscounters(dns_zone_t *zone);
-/*
+/*%<
* Requires:
* zone be a valid zone.
*
* Returns:
- * A pointer to the zone's array of statistics counters,
+ * \li A pointer to the zone's array of statistics counters,
* or NULL if it has none.
*/
void
dns_zone_dialup(dns_zone_t *zone);
-/*
+/*%<
* Perform dialup-time maintenance on 'zone'.
*/
void
dns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup);
-/*
+/*%<
* Set the dialup type of 'zone' to 'dialup'.
*
* Requires:
- * 'zone' to be valid initialised zone.
- * 'dialup' to be a valid dialup type.
+ * \li 'zone' to be valid initialised zone.
+ *\li 'dialup' to be a valid dialup type.
*/
void
dns_zone_log(dns_zone_t *zone, int level, const char *msg, ...)
ISC_FORMAT_PRINTF(3, 4);
-/*
+/*%<
* Log the message 'msg...' at 'level', including text that identifies
* the message as applying to 'zone'.
*/
@@ -1405,19 +1475,19 @@ dns_zone_log(dns_zone_t *zone, int level, const char *msg, ...)
void
dns_zone_logc(dns_zone_t *zone, isc_logcategory_t *category, int level,
const char *msg, ...) ISC_FORMAT_PRINTF(4, 5);
-/*
+/*%<
* Log the message 'msg...' at 'level', including text that identifies
* the message as applying to 'zone'.
*/
void
dns_zone_name(dns_zone_t *zone, char *buf, size_t len);
-/*
+/*%<
* Return the name of the zone with class and view.
*
* Requires:
- * 'zone' to be valid.
- * 'buf' to be non NULL.
+ *\li 'zone' to be valid.
+ *\li 'buf' to be non NULL.
*/
isc_result_t
@@ -1436,6 +1506,81 @@ dns_zone_checknames(dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata);
* DNS_R_BADNAME failed rdata checks.
*/
+void
+dns_zone_setacache(dns_zone_t *zone, dns_acache_t *acache);
+/*
+ * Associate the zone with an additional cache.
+ *
+ * Require:
+ * 'zone' to be a valid zone.
+ * 'acache' to be a non NULL pointer.
+ *
+ * Ensures:
+ * 'zone' will have a reference to 'acache'
+ */
+
+void
+dns_zone_setcheckmx(dns_zone_t *zone, dns_checkmxfunc_t checkmx);
+/*
+ * Set the post load integrity callback function 'checkmx'.
+ * 'checkmx' will be called if the MX is not within the zone.
+ *
+ * Require:
+ * 'zone' to be a valid zone.
+ */
+
+void
+dns_zone_setchecksrv(dns_zone_t *zone, dns_checkmxfunc_t checksrv);
+/*
+ * Set the post load integrity callback function 'checksrv'.
+ * 'checksrv' will be called if the SRV TARGET is not within the zone.
+ *
+ * Require:
+ * 'zone' to be a valid zone.
+ */
+
+void
+dns_zone_setcheckns(dns_zone_t *zone, dns_checknsfunc_t checkns);
+/*
+ * Set the post load integrity callback function 'checkmx'.
+ * 'checkmx' will be called if the MX is not within the zone.
+ *
+ * Require:
+ * 'zone' to be a valid zone.
+ */
+
+void
+dns_zone_setnotifydelay(dns_zone_t *zone, isc_uint32_t delay);
+/*
+ * Set the minimum delay between sets of notify messages.
+ *
+ * Requires:
+ * 'zone' to be valid.
+ */
+
+isc_uint32_t
+dns_zone_getnotifydelay(dns_zone_t *zone);
+/*
+ * Get the minimum delay between sets of notify messages.
+ *
+ * Requires:
+ * 'zone' to be valid.
+ */
+
+void
+dns_zone_setisself(dns_zone_t *zone, dns_isselffunc_t isself, void *arg);
+/*
+ * Set the isself callback function and argument.
+ *
+ * isc_boolean_t
+ * isself(dns_view_t *myview, dns_tsigkey_t *mykey, isc_netaddr_t *srcaddr,
+ * isc_netaddr_t *destaddr, dns_rdataclass_t rdclass, void *arg);
+ *
+ * 'isself' returns ISC_TRUE if a non-recursive query from 'srcaddr' to
+ * 'destaddr' with optional key 'mykey' for class 'rdclass' would be
+ * delivered to 'myview'.
+ */
+
ISC_LANG_ENDDECLS
#endif /* DNS_ZONE_H */
diff --git a/contrib/bind9/lib/dns/include/dns/zonekey.h b/contrib/bind9/lib/dns/include/dns/zonekey.h
index 1ac9066..ba4e076 100644
--- a/contrib/bind9/lib/dns/include/dns/zonekey.h
+++ b/contrib/bind9/lib/dns/include/dns/zonekey.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zonekey.h,v 1.3.206.1 2004/03/06 08:14:01 marka Exp $ */
+/* $Id: zonekey.h,v 1.4.18.2 2005/04/29 00:16:26 marka Exp $ */
#ifndef DNS_ZONEKEY_H
#define DNS_ZONEKEY_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -28,7 +30,7 @@ ISC_LANG_BEGINDECLS
isc_boolean_t
dns_zonekey_iszonekey(dns_rdata_t *keyrdata);
-/*
+/*%<
* Determines if the key record contained in the rdata is a zone key.
*
* Requires:
diff --git a/contrib/bind9/lib/dns/include/dns/zt.h b/contrib/bind9/lib/dns/include/dns/zt.h
index fb43590..436ef4c 100644
--- a/contrib/bind9/lib/dns/include/dns/zt.h
+++ b/contrib/bind9/lib/dns/include/dns/zt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zt.h,v 1.27.2.2.8.1 2004/03/06 08:14:01 marka Exp $ */
+/* $Id: zt.h,v 1.30.18.3 2005/04/27 05:01:42 sra Exp $ */
#ifndef DNS_ZT_H
#define DNS_ZT_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -30,101 +32,101 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **zt);
-/*
+/*%<
* Creates a new zone table.
*
* Requires:
- * 'mctx' to be initialized.
+ * \li 'mctx' to be initialized.
*
* Returns:
- * ISC_R_SUCCESS on success.
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS on success.
+ * \li #ISC_R_NOMEMORY
*/
isc_result_t
dns_zt_mount(dns_zt_t *zt, dns_zone_t *zone);
-/*
+/*%<
* Mounts the zone on the zone table.
*
* Requires:
- * 'zt' to be valid
- * 'zone' to be valid
+ * \li 'zt' to be valid
+ * \li 'zone' to be valid
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_EXISTS
- * ISC_R_NOSPACE
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_EXISTS
+ * \li #ISC_R_NOSPACE
+ * \li #ISC_R_NOMEMORY
*/
isc_result_t
dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone);
-/*
+/*%<
* Unmount the given zone from the table.
*
* Requires:
* 'zt' to be valid
- * 'zone' to be valid
+ * \li 'zone' to be valid
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
- * ISC_R_NOMEMORY
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOTFOUND
+ * \li #ISC_R_NOMEMORY
*/
isc_result_t
dns_zt_find(dns_zt_t *zt, dns_name_t *name, unsigned int options,
dns_name_t *foundname, dns_zone_t **zone);
-/*
+/*%<
* Find the best match for 'name' in 'zt'. If foundname is non NULL
* then the name of the zone found is returned.
*
* Notes:
- * If the DNS_ZTFIND_NOEXACT is set, the best partial match (if any)
+ * \li If the DNS_ZTFIND_NOEXACT is set, the best partial match (if any)
* to 'name' will be returned.
*
* Requires:
- * 'zt' to be valid
- * 'name' to be valid
- * 'foundname' to be initialized and associated with a fixedname or NULL
- * 'zone' to be non NULL and '*zone' to be NULL
+ * \li 'zt' to be valid
+ * \li 'name' to be valid
+ * \li 'foundname' to be initialized and associated with a fixedname or NULL
+ * \li 'zone' to be non NULL and '*zone' to be NULL
*
* Returns:
- * ISC_R_SUCCESS
- * DNS_R_PARTIALMATCH
- * ISC_R_NOTFOUND
- * ISC_R_NOSPACE
+ * \li #ISC_R_SUCCESS
+ * \li #DNS_R_PARTIALMATCH
+ * \li #ISC_R_NOTFOUND
+ * \li #ISC_R_NOSPACE
*/
void
dns_zt_detach(dns_zt_t **ztp);
-/*
+/*%<
* Detach the given zonetable, if the reference count goes to zero the
* zonetable will be freed. In either case 'ztp' is set to NULL.
*
* Requires:
- * '*ztp' to be valid
+ * \li '*ztp' to be valid
*/
void
dns_zt_flushanddetach(dns_zt_t **ztp);
-/*
+/*%<
* Detach the given zonetable, if the reference count goes to zero the
* zonetable will be flushed and then freed. In either case 'ztp' is
* set to NULL.
*
* Requires:
- * '*ztp' to be valid
+ * \li '*ztp' to be valid
*/
void
dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp);
-/*
+/*%<
* Attach 'zt' to '*ztp'.
*
* Requires:
- * 'zt' to be valid
- * '*ztp' to be NULL
+ * \li 'zt' to be valid
+ * \li '*ztp' to be NULL
*/
isc_result_t
@@ -132,7 +134,7 @@ dns_zt_load(dns_zt_t *zt, isc_boolean_t stop);
isc_result_t
dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop);
-/*
+/*%<
* Load all zones in the table. If 'stop' is ISC_TRUE,
* stop on the first error and return it. If 'stop'
* is ISC_FALSE, ignore errors.
@@ -142,23 +144,37 @@ dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop);
* and whose master file has changed since the last load.
*
* Requires:
- * 'zt' to be valid
+ * \li 'zt' to be valid
+ */
+
+isc_result_t
+dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze);
+/*%<
+ * Freeze/thaw updates to master zones.
+ * Any pending updates will be flushed.
+ * Zones will be reloaded on thaw.
*/
isc_result_t
dns_zt_apply(dns_zt_t *zt, isc_boolean_t stop,
isc_result_t (*action)(dns_zone_t *, void *), void *uap);
-/*
+
+isc_result_t
+dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
+ isc_result_t (*action)(dns_zone_t *, void *), void *uap);
+/*%<
* Apply a given 'action' to all zone zones in the table.
* If 'stop' is 'ISC_TRUE' then walking the zone tree will stop if
* 'action' does not return ISC_R_SUCCESS.
*
* Requires:
- * 'zt' to be valid.
- * 'action' to be non NULL.
+ * \li 'zt' to be valid.
+ * \li 'action' to be non NULL.
*
* Returns:
- * ISC_R_SUCCESS if action was applied to all nodes.
+ * \li ISC_R_SUCCESS if action was applied to all nodes. If 'stop' is
+ * ISC_FALSE and 'sub' is non NULL then the first error (if any)
+ * reported by 'action' is returned in '*sub';
* any error code from 'action'.
*/
diff --git a/contrib/bind9/lib/dns/include/dst/Makefile.in b/contrib/bind9/lib/dns/include/dst/Makefile.in
index efebfaa..deaa221 100644
--- a/contrib/bind9/lib/dns/include/dst/Makefile.in
+++ b/contrib/bind9/lib/dns/include/dst/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.1.4.1 2004/12/09 04:07:19 marka Exp $
+# $Id: Makefile.in,v 1.1.6.1 2004/12/09 04:41:47 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/contrib/bind9/lib/dns/include/dst/dst.h b/contrib/bind9/lib/dns/include/dst/dst.h
index 1629da5..8d99186 100644
--- a/contrib/bind9/lib/dns/include/dst/dst.h
+++ b/contrib/bind9/lib/dns/include/dst/dst.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dst.h,v 1.1.4.1 2004/12/09 04:07:19 marka Exp $ */
+/* $Id: dst.h,v 1.1.6.5 2006/01/27 23:57:44 marka Exp $ */
#ifndef DST_DST_H
#define DST_DST_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <dns/types.h>
@@ -30,7 +32,7 @@ ISC_LANG_BEGINDECLS
*** Types
***/
-/*
+/*%
* The dst_key structure is opaque. Applications should use the accessor
* functions provided to retrieve key attributes. If an application needs
* to set attributes, new accessor functions will be written.
@@ -42,27 +44,32 @@ typedef struct dst_context dst_context_t;
/* DST algorithm codes */
#define DST_ALG_UNKNOWN 0
#define DST_ALG_RSAMD5 1
-#define DST_ALG_RSA DST_ALG_RSAMD5 /* backwards compatibility */
+#define DST_ALG_RSA DST_ALG_RSAMD5 /*%< backwards compatibility */
#define DST_ALG_DH 2
#define DST_ALG_DSA 3
#define DST_ALG_ECC 4
#define DST_ALG_RSASHA1 5
#define DST_ALG_HMACMD5 157
#define DST_ALG_GSSAPI 160
+#define DST_ALG_HMACSHA1 161 /* XXXMPA */
+#define DST_ALG_HMACSHA224 162 /* XXXMPA */
+#define DST_ALG_HMACSHA256 163 /* XXXMPA */
+#define DST_ALG_HMACSHA384 164 /* XXXMPA */
+#define DST_ALG_HMACSHA512 165 /* XXXMPA */
#define DST_ALG_PRIVATE 254
#define DST_ALG_EXPAND 255
#define DST_MAX_ALGS 255
-/* A buffer of this size is large enough to hold any key */
+/*% A buffer of this size is large enough to hold any key */
#define DST_KEY_MAXSIZE 1280
-/*
+/*%
* A buffer of this size is large enough to hold the textual representation
* of any key
*/
#define DST_KEY_MAXTEXTSIZE 2048
-/* 'Type' for dst_read_key() */
+/*% 'Type' for dst_read_key() */
#define DST_TYPE_KEY 0x1000000 /* KEY key */
#define DST_TYPE_PRIVATE 0x2000000
#define DST_TYPE_PUBLIC 0x4000000
@@ -73,239 +80,262 @@ typedef struct dst_context dst_context_t;
isc_result_t
dst_lib_init(isc_mem_t *mctx, isc_entropy_t *ectx, unsigned int eflags);
-/*
+/*%<
* Initializes the DST subsystem.
*
* Requires:
- * "mctx" is a valid memory context
- * "ectx" is a valid entropy context
+ * \li "mctx" is a valid memory context
+ * \li "ectx" is a valid entropy context
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li ISC_R_SUCCESS
+ * \li ISC_R_NOMEMORY
*
* Ensures:
- * DST is properly initialized.
+ * \li DST is properly initialized.
*/
void
dst_lib_destroy(void);
-/*
+/*%<
* Releases all resources allocated by DST.
*/
isc_boolean_t
dst_algorithm_supported(unsigned int alg);
-/*
+/*%<
* Checks that a given algorithm is supported by DST.
*
* Returns:
- * ISC_TRUE
- * ISC_FALSE
+ * \li ISC_TRUE
+ * \li ISC_FALSE
*/
isc_result_t
dst_context_create(dst_key_t *key, isc_mem_t *mctx, dst_context_t **dctxp);
-/*
+/*%<
* Creates a context to be used for a sign or verify operation.
*
* Requires:
- * "key" is a valid key.
- * "mctx" is a valid memory context.
- * dctxp != NULL && *dctxp == NULL
+ * \li "key" is a valid key.
+ * \li "mctx" is a valid memory context.
+ * \li dctxp != NULL && *dctxp == NULL
*
* Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOMEMORY
+ * \li ISC_R_SUCCESS
+ * \li ISC_R_NOMEMORY
*
* Ensures:
- * *dctxp will contain a usable context.
+ * \li *dctxp will contain a usable context.
*/
void
dst_context_destroy(dst_context_t **dctxp);
-/*
+/*%<
* Destroys all memory associated with a context.
*
* Requires:
- * *dctxp != NULL && *dctxp == NULL
+ * \li *dctxp != NULL && *dctxp == NULL
*
* Ensures:
- * *dctxp == NULL
+ * \li *dctxp == NULL
*/
isc_result_t
dst_context_adddata(dst_context_t *dctx, const isc_region_t *data);
-/*
+/*%<
* Incrementally adds data to the context to be used in a sign or verify
* operation.
*
* Requires:
- * "dctx" is a valid context
- * "data" is a valid region
+ * \li "dctx" is a valid context
+ * \li "data" is a valid region
*
* Returns:
- * ISC_R_SUCCESS
- * DST_R_SIGNFAILURE
- * all other errors indicate failure
+ * \li ISC_R_SUCCESS
+ * \li DST_R_SIGNFAILURE
+ * \li all other errors indicate failure
*/
isc_result_t
dst_context_sign(dst_context_t *dctx, isc_buffer_t *sig);
-/*
+/*%<
* Computes a signature using the data and key stored in the context.
*
* Requires:
- * "dctx" is a valid context.
- * "sig" is a valid buffer.
+ * \li "dctx" is a valid context.
+ * \li "sig" is a valid buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * DST_R_VERIFYFAILURE
- * all other errors indicate failure
+ * \li ISC_R_SUCCESS
+ * \li DST_R_VERIFYFAILURE
+ * \li all other errors indicate failure
*
* Ensures:
- * "sig" will contain the signature
+ * \li "sig" will contain the signature
*/
isc_result_t
dst_context_verify(dst_context_t *dctx, isc_region_t *sig);
-/*
+/*%<
* Verifies the signature using the data and key stored in the context.
*
* Requires:
- * "dctx" is a valid context.
- * "sig" is a valid region.
+ * \li "dctx" is a valid context.
+ * \li "sig" is a valid region.
*
* Returns:
- * ISC_R_SUCCESS
- * all other errors indicate failure
+ * \li ISC_R_SUCCESS
+ * \li all other errors indicate failure
*
* Ensures:
- * "sig" will contain the signature
+ * \li "sig" will contain the signature
*/
isc_result_t
dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
isc_buffer_t *secret);
-/*
+/*%<
* Computes a shared secret from two (Diffie-Hellman) keys.
*
* Requires:
- * "pub" is a valid key that can be used to derive a shared secret
- * "priv" is a valid private key that can be used to derive a shared secret
- * "secret" is a valid buffer
+ * \li "pub" is a valid key that can be used to derive a shared secret
+ * \li "priv" is a valid private key that can be used to derive a shared secret
+ * \li "secret" is a valid buffer
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, secret will contain the derived shared secret.
+ * \li If successful, secret will contain the derived shared secret.
*/
isc_result_t
dst_key_fromfile(dns_name_t *name, dns_keytag_t id, unsigned int alg, int type,
const char *directory, isc_mem_t *mctx, dst_key_t **keyp);
-/*
+/*%<
* Reads a key from permanent storage. The key can either be a public or
* private key, and is specified by name, algorithm, and id. If a private key
* is specified, the public key must also be present. If directory is NULL,
* the current directory is assumed.
*
* Requires:
- * "name" is a valid absolute dns name.
- * "id" is a valid key tag identifier.
- * "alg" is a supported key algorithm.
- * "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union.
+ * \li "name" is a valid absolute dns name.
+ * \li "id" is a valid key tag identifier.
+ * \li "alg" is a supported key algorithm.
+ * \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union.
* DST_TYPE_KEY look for a KEY record otherwise DNSKEY
- * "mctx" is a valid memory context.
- * "keyp" is not NULL and "*keyp" is NULL.
+ * \li "mctx" is a valid memory context.
+ * \li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key.
+ * \li If successful, *keyp will contain a valid key.
*/
isc_result_t
dst_key_fromnamedfile(const char *filename, int type, isc_mem_t *mctx,
dst_key_t **keyp);
-/*
+/*%<
* Reads a key from permanent storage. The key can either be a public or
* key, and is specified by filename. If a private key is specified, the
* public key must also be present.
*
* Requires:
- * "filename" is not NULL
- * "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
+ * \li "filename" is not NULL
+ * \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
* DST_TYPE_KEY look for a KEY record otherwise DNSKEY
- * "mctx" is a valid memory context
- * "keyp" is not NULL and "*keyp" is NULL.
+ * \li "mctx" is a valid memory context
+ * \li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key.
+ * \li If successful, *keyp will contain a valid key.
+ */
+
+
+isc_result_t
+dst_key_read_public(const char *filename, int type,
+ isc_mem_t *mctx, dst_key_t **keyp);
+/*%<
+ * Reads a public key from permanent storage. The key must be a public key.
+ *
+ * Requires:
+ * \li "filename" is not NULL
+ * \li "type" is DST_TYPE_KEY look for a KEY record otherwise DNSKEY
+ * \li "mctx" is a valid memory context
+ * \li "keyp" is not NULL and "*keyp" is NULL.
+ *
+ * Returns:
+ * \li ISC_R_SUCCESS
+ * \li DST_R_BADKEYTYPE if the key type is not the expected one
+ * \li ISC_R_UNEXPECTEDTOKEN if the file can not be parsed as a public key
+ * \li any other result indicates failure
+ *
+ * Ensures:
+ * \li If successful, *keyp will contain a valid key.
*/
isc_result_t
dst_key_tofile(const dst_key_t *key, int type, const char *directory);
-/*
+/*%<
* Writes a key to permanent storage. The key can either be a public or
* private key. Public keys are written in DNS format and private keys
* are written as a set of base64 encoded values. If directory is NULL,
* the current directory is assumed.
*
* Requires:
- * "key" is a valid key.
- * "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
+ * \li "key" is a valid key.
+ * \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*/
isc_result_t
dst_key_fromdns(dns_name_t *name, dns_rdataclass_t rdclass,
isc_buffer_t *source, isc_mem_t *mctx, dst_key_t **keyp);
-/*
+/*%<
* Converts a DNS KEY record into a DST key.
*
* Requires:
- * "name" is a valid absolute dns name.
- * "source" is a valid buffer. There must be at least 4 bytes available.
- * "mctx" is a valid memory context.
- * "keyp" is not NULL and "*keyp" is NULL.
+ * \li "name" is a valid absolute dns name.
+ * \li "source" is a valid buffer. There must be at least 4 bytes available.
+ * \li "mctx" is a valid memory context.
+ * \li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key, and the consumed
+ * \li If successful, *keyp will contain a valid key, and the consumed
* pointer in data will be advanced.
*/
isc_result_t
dst_key_todns(const dst_key_t *key, isc_buffer_t *target);
-/*
+/*%<
* Converts a DST key into a DNS KEY record.
*
* Requires:
- * "key" is a valid key.
- * "target" is a valid buffer. There must be at least 4 bytes unused.
+ * \li "key" is a valid key.
+ * \li "target" is a valid buffer. There must be at least 4 bytes unused.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ * \li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, the used pointer in 'target' is advanced by at least 4.
+ * \li If successful, the used pointer in 'target' is advanced by at least 4.
*/
isc_result_t
@@ -313,80 +343,80 @@ dst_key_frombuffer(dns_name_t *name, unsigned int alg,
unsigned int flags, unsigned int protocol,
dns_rdataclass_t rdclass,
isc_buffer_t *source, isc_mem_t *mctx, dst_key_t **keyp);
-/*
+/*%<
* Converts a buffer containing DNS KEY RDATA into a DST key.
*
* Requires:
- * "name" is a valid absolute dns name.
- * "alg" is a supported key algorithm.
- * "source" is a valid buffer.
- * "mctx" is a valid memory context.
- * "keyp" is not NULL and "*keyp" is NULL.
+ *\li "name" is a valid absolute dns name.
+ *\li "alg" is a supported key algorithm.
+ *\li "source" is a valid buffer.
+ *\li "mctx" is a valid memory context.
+ *\li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ *\li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key, and the consumed
+ *\li If successful, *keyp will contain a valid key, and the consumed
* pointer in source will be advanced.
*/
isc_result_t
dst_key_tobuffer(const dst_key_t *key, isc_buffer_t *target);
-/*
+/*%<
* Converts a DST key into DNS KEY RDATA format.
*
* Requires:
- * "key" is a valid key.
- * "target" is a valid buffer.
+ *\li "key" is a valid key.
+ *\li "target" is a valid buffer.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ *\li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, the used pointer in 'target' is advanced.
+ *\li If successful, the used pointer in 'target' is advanced.
*/
isc_result_t
dst_key_privatefrombuffer(dst_key_t *key, isc_buffer_t *buffer);
-/*
+/*%<
* Converts a public key into a private key, reading the private key
* information from the buffer. The buffer should contain the same data
* as the .private key file would.
*
* Requires:
- * "key" is a valid public key.
- * "buffer" is not NULL.
+ *\li "key" is a valid public key.
+ *\li "buffer" is not NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ *\li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, key will contain a valid private key.
+ *\li If successful, key will contain a valid private key.
*/
isc_result_t
dst_key_fromgssapi(dns_name_t *name, void *opaque, isc_mem_t *mctx,
dst_key_t **keyp);
-/*
+/*%<
* Converts a GSSAPI opaque context id into a DST key.
*
* Requires:
- * "name" is a valid absolute dns name.
- * "opaque" is a GSSAPI context id.
- * "mctx" is a valid memory context.
- * "keyp" is not NULL and "*keyp" is NULL.
+ *\li "name" is a valid absolute dns name.
+ *\li "opaque" is a GSSAPI context id.
+ *\li "mctx" is a valid memory context.
+ *\li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ *\li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key and be responsible for
+ *\li If successful, *keyp will contain a valid key and be responsible for
* the context id.
*/
@@ -396,9 +426,10 @@ dst_key_generate(dns_name_t *name, unsigned int alg,
unsigned int flags, unsigned int protocol,
dns_rdataclass_t rdclass,
isc_mem_t *mctx, dst_key_t **keyp);
-/*
+/*%<
* Generate a DST key (or keypair) with the supplied parameters. The
* interpretation of the "param" field depends on the algorithm:
+ * \code
* RSA: exponent
* 0 use exponent 3
* !0 use Fermat4 (2^16 + 1)
@@ -410,66 +441,67 @@ dst_key_generate(dns_name_t *name, unsigned int alg,
* HMACMD5: entropy
* 0 default - require good entropy
* !0 lack of good entropy is ok
+ *\endcode
*
* Requires:
- * "name" is a valid absolute dns name.
- * "keyp" is not NULL and "*keyp" is NULL.
+ *\li "name" is a valid absolute dns name.
+ *\li "keyp" is not NULL and "*keyp" is NULL.
*
* Returns:
- * ISC_R_SUCCESS
- * any other result indicates failure
+ *\li ISC_R_SUCCESS
+ * \li any other result indicates failure
*
* Ensures:
- * If successful, *keyp will contain a valid key.
+ *\li If successful, *keyp will contain a valid key.
*/
isc_boolean_t
dst_key_compare(const dst_key_t *key1, const dst_key_t *key2);
-/*
+/*%<
* Compares two DST keys.
*
* Requires:
- * "key1" is a valid key.
- * "key2" is a valid key.
+ *\li "key1" is a valid key.
+ *\li "key2" is a valid key.
*
* Returns:
- * ISC_TRUE
- * ISC_FALSE
+ *\li ISC_TRUE
+ * \li ISC_FALSE
*/
isc_boolean_t
dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2);
-/*
+/*%<
* Compares the parameters of two DST keys. This is used to determine if
* two (Diffie-Hellman) keys can be used to derive a shared secret.
*
* Requires:
- * "key1" is a valid key.
- * "key2" is a valid key.
+ *\li "key1" is a valid key.
+ *\li "key2" is a valid key.
*
* Returns:
- * ISC_TRUE
- * ISC_FALSE
+ *\li ISC_TRUE
+ * \li ISC_FALSE
*/
void
dst_key_free(dst_key_t **keyp);
-/*
+/*%<
* Release all memory associated with the key.
*
* Requires:
- * "keyp" is not NULL and "*keyp" is a valid key.
+ *\li "keyp" is not NULL and "*keyp" is a valid key.
*
* Ensures:
- * All memory associated with "*keyp" will be freed.
- * *keyp == NULL
+ *\li All memory associated with "*keyp" will be freed.
+ *\li *keyp == NULL
*/
-/*
+/*%<
* Accessor functions to obtain key fields.
*
* Require:
- * "key" is a valid key.
+ *\li "key" is a valid key.
*/
dns_name_t *
dst_key_name(const dst_key_t *key);
@@ -504,65 +536,83 @@ dst_key_isnullkey(const dst_key_t *key);
isc_result_t
dst_key_buildfilename(const dst_key_t *key, int type,
const char *directory, isc_buffer_t *out);
-/*
+/*%<
* Generates the filename used by dst to store the specified key.
* If directory is NULL, the current directory is assumed.
*
* Requires:
- * "key" is a valid key
- * "type" is either DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or 0 for no suffix.
- * "out" is a valid buffer
+ *\li "key" is a valid key
+ *\li "type" is either DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or 0 for no suffix.
+ *\li "out" is a valid buffer
*
* Ensures:
- * the file name will be written to "out", and the used pointer will
+ *\li the file name will be written to "out", and the used pointer will
* be advanced.
*/
isc_result_t
dst_key_sigsize(const dst_key_t *key, unsigned int *n);
-/*
+/*%<
* Computes the size of a signature generated by the given key.
*
* Requires:
- * "key" is a valid key.
- * "n" is not NULL
+ *\li "key" is a valid key.
+ *\li "n" is not NULL
*
* Returns:
- * ISC_R_SUCCESS
- * DST_R_UNSUPPORTEDALG
+ *\li #ISC_R_SUCCESS
+ *\li DST_R_UNSUPPORTEDALG
*
* Ensures:
- * "n" stores the size of a generated signature
+ *\li "n" stores the size of a generated signature
*/
isc_result_t
dst_key_secretsize(const dst_key_t *key, unsigned int *n);
-/*
+/*%<
* Computes the size of a shared secret generated by the given key.
*
* Requires:
- * "key" is a valid key.
- * "n" is not NULL
+ *\li "key" is a valid key.
+ *\li "n" is not NULL
*
* Returns:
- * ISC_R_SUCCESS
- * DST_R_UNSUPPORTEDALG
+ *\li #ISC_R_SUCCESS
+ *\li DST_R_UNSUPPORTEDALG
*
* Ensures:
- * "n" stores the size of a generated shared secret
+ *\li "n" stores the size of a generated shared secret
*/
isc_uint16_t
dst_region_computeid(const isc_region_t *source, unsigned int alg);
-/*
+/*%<
* Computes the key id of the key stored in the provided region with the
* given algorithm.
*
* Requires:
- * "source" contains a valid, non-NULL region.
+ *\li "source" contains a valid, non-NULL region.
*
* Returns:
- * the key id
+ *\li the key id
+ */
+
+isc_uint16_t
+dst_key_getbits(const dst_key_t *key);
+/*
+ * Get the number of digest bits required (0 == MAX).
+ *
+ * Requires:
+ * "key" is a valid key.
+ */
+
+void
+dst_key_setbits(dst_key_t *key, isc_uint16_t bits);
+/*
+ * Set the number of digest bits required (0 == MAX).
+ *
+ * Requires:
+ * "key" is a valid key.
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dst/gssapi.h b/contrib/bind9/lib/dns/include/dst/gssapi.h
index 1d74656..e30fb0c 100644
--- a/contrib/bind9/lib/dns/include/dst/gssapi.h
+++ b/contrib/bind9/lib/dns/include/dst/gssapi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: gssapi.h,v 1.1.4.1 2004/12/09 04:07:20 marka Exp $ */
+/* $Id: gssapi.h,v 1.1.6.3 2005/04/29 00:16:28 marka Exp $ */
#ifndef DST_GSSAPI_H
#define DST_GSSAPI_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/types.h>
diff --git a/contrib/bind9/lib/dns/include/dst/lib.h b/contrib/bind9/lib/dns/include/dst/lib.h
index 7a8e73e..bd71261 100644
--- a/contrib/bind9/lib/dns/include/dst/lib.h
+++ b/contrib/bind9/lib/dns/include/dst/lib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.h,v 1.1.4.1 2004/12/09 04:07:20 marka Exp $ */
+/* $Id: lib.h,v 1.1.6.3 2005/04/29 00:16:29 marka Exp $ */
#ifndef DST_LIB_H
#define DST_LIB_H 1
+/*! \file */
+
#include <isc/types.h>
#include <isc/lang.h>
diff --git a/contrib/bind9/lib/dns/include/dst/result.h b/contrib/bind9/lib/dns/include/dst/result.h
index 015e086..aa03b73 100644
--- a/contrib/bind9/lib/dns/include/dst/result.h
+++ b/contrib/bind9/lib/dns/include/dst/result.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.1.4.1 2004/12/09 04:07:20 marka Exp $ */
+/* $Id: result.h,v 1.1.6.3 2005/04/29 00:16:29 marka Exp $ */
#ifndef DST_RESULT_H
#define DST_RESULT_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/resultclass.h>
OpenPOWER on IntegriCloud