Commit 09f22ac5 authored by David Lawrence's avatar David Lawrence

Redundant header work, mostly removing <dns/result.h> from installed

headers and adding it to source files that need it.
parent 5117e028
......@@ -21,22 +21,20 @@
#include <stdlib.h>
#include <string.h>
#include <isc/types.h>
#include <isc/assertions.h>
#include <isc/commandline.h>
#include <isc/boolean.h>
#include <isc/buffer.h>
#include <isc/error.h>
#include <isc/mem.h>
#include <isc/stdtime.h>
#include <isc/list.h>
#include <isc/util.h>
#include <dns/types.h>
#include <dns/name.h>
#include <dns/fixedname.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/nxt.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
......@@ -44,15 +42,13 @@
#include <dns/rdatastruct.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/dnssec.h>
#include <dns/keyvalues.h>
#include <dns/secalg.h>
#include <dns/nxt.h>
#include <dns/time.h>
#include <dns/types.h>
#include <dns/zone.h>
#include <dns/log.h>
#include <dst/dst.h>
#include <dst/result.h>
/*#define USE_ZONESTATUS*/
......
......@@ -17,15 +17,13 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/event.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/result.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/event.h>
#include <isc/log.h>
#include <isc/util.h>
#include <dns/a6.h>
......@@ -38,13 +36,14 @@
#include <dns/message.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdatatype.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatatype.h>
#include <dns/resolver.h>
#include <dns/view.h>
#include <dns/result.h>
#include <dns/tkey.h>
#include <dns/view.h>
#include <dns/zone.h>
#include <dns/zt.h>
......
......@@ -21,22 +21,20 @@
#include <stdlib.h>
#include <string.h>
#include <isc/types.h>
#include <isc/assertions.h>
#include <isc/commandline.h>
#include <isc/boolean.h>
#include <isc/buffer.h>
#include <isc/error.h>
#include <isc/mem.h>
#include <isc/stdtime.h>
#include <isc/list.h>
#include <isc/util.h>
#include <dns/types.h>
#include <dns/name.h>
#include <dns/fixedname.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/nxt.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
......@@ -44,15 +42,13 @@
#include <dns/rdatastruct.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/dnssec.h>
#include <dns/keyvalues.h>
#include <dns/secalg.h>
#include <dns/nxt.h>
#include <dns/time.h>
#include <dns/types.h>
#include <dns/zone.h>
#include <dns/log.h>
#include <dst/dst.h>
#include <dst/result.h>
/*#define USE_ZONESTATUS*/
......
......@@ -57,6 +57,7 @@
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/types.h>
#include <dns/view.h>
......
......@@ -26,7 +26,6 @@
#include <isc/event.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/result.h>
#include <isc/task.h>
#include <isc/util.h>
......@@ -38,6 +37,7 @@
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/view.h>
/*
......
......@@ -15,14 +15,12 @@
* SOFTWARE.
*/
/* $Id: cache.c,v 1.19 2000/04/28 01:23:49 gson Exp $ */
/* $Id: cache.c,v 1.20 2000/05/02 03:53:51 tale Exp $ */
#include <config.h>
#include <limits.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/mutex.h>
#include <isc/time.h>
#include <isc/util.h>
......@@ -33,6 +31,7 @@
#include <dns/events.h>
#include <dns/log.h>
#include <dns/rdata.h>
#include <dns/result.h>
#include <dns/types.h>
#define CACHE_MAGIC 0x24242424U /* $$$$. */
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: compress.c,v 1.29 2000/04/28 01:09:56 halley Exp $ */
/* $Id: compress.c,v 1.30 2000/05/02 03:53:52 tale Exp $ */
#define DNS_NAME_USEINLINE 1
......@@ -30,6 +30,7 @@
#include <dns/compress.h>
#include <dns/fixedname.h>
#include <dns/rbt.h>
#include <dns/result.h>
#define CCTX_MAGIC 0x43435458U /* CCTX */
#define VALID_CCTX(x) ((x) != NULL && (x)->magic == CCTX_MAGIC)
......
......@@ -15,18 +15,17 @@
* SOFTWARE.
*/
/* $Id: confcache.c,v 1.5 2000/03/28 22:58:14 brister Exp $ */
/* $Id: confcache.c,v 1.6 2000/05/02 03:54:04 tale Exp $ */
#include <config.h>
#include <dns/confcache.h>
#include <dns/result.h>
#include <isc/result.h>
#include "confpvt.h"
isc_result_t
dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgcache)
{
dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgcache) {
(void) mem ; (void) cfgcache; /* lint */
......@@ -35,12 +34,10 @@ dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgcache)
return (ISC_R_SUCCESS);
}
isc_result_t
dns_c_cache_delete(dns_c_cache_t **cfgcache)
{
dns_c_cache_delete(dns_c_cache_t **cfgcache) {
(void) cfgcache ; /* lint */
/* XXX nothin yet */
return (ISC_R_SUCCESS);
......
......@@ -15,20 +15,21 @@
* SOFTWARE.
*/
/* $Id: confresolv.c,v 1.5 2000/03/28 22:58:23 brister Exp $ */
/* $Id: confresolv.c,v 1.6 2000/05/02 03:54:05 tale Exp $ */
#include <config.h>
#include <dns/confresolv.h>
#include <dns/result.h>
#include <isc/result.h>
#include <isc/util.h>
#include <dns/confresolv.h>
#include "confpvt.h"
isc_result_t
dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres)
{
(void) mem; (void) cfgres;
dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres) {
UNUSED(mem);
UNUSED(cfgres);
/* XXX nothing yet */
......@@ -37,9 +38,9 @@ dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres)
isc_result_t
dns_c_resolv_delete(dns_c_resolv_t **cfgres)
{
(void) cfgres;
dns_c_resolv_delete(dns_c_resolv_t **cfgres) {
UNUSED(cfgres);
/* XXX nothin yet */
return (ISC_R_SUCCESS);
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: dbtable.c,v 1.16 2000/04/19 18:49:10 halley Exp $
* $Id: dbtable.c,v 1.17 2000/05/02 03:53:52 tale Exp $
*/
/*
......@@ -25,13 +25,13 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/rwlock.h>
#include <isc/util.h>
#include <dns/dbtable.h>
#include <dns/db.h>
#include <dns/rbt.h>
#include <dns/result.h>
struct dns_dbtable {
/* Unlocked. */
......@@ -123,8 +123,7 @@ dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
static inline void
dbtable_free(dns_dbtable_t *dbtable) {
/*
* Caller must ensure that it is safe to
* call.
* Caller must ensure that it is safe to call.
*/
RWLOCK(&dbtable->tree_lock, isc_rwlocktype_write);
......@@ -216,6 +215,7 @@ dns_dbtable_remove(dns_dbtable_t *dbtable, dns_db_t *db) {
* be verified. With the current rbt.c this is expensive to do,
* because effectively two find operations are being done, but
* deletion is relatively infrequent.
* XXXDCL ... this could be cheaper now with dns_rbt_deletenode.
*/
RWLOCK(&dbtable->tree_lock, isc_rwlocktype_write);
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: dnssec.c,v 1.32 2000/04/28 02:08:26 marka Exp $
* $Id: dnssec.c,v 1.33 2000/05/02 03:53:52 tale Exp $
* Principal Author: Brian Wellington
*/
......@@ -26,26 +26,24 @@
#include <stdlib.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/error.h>
#include <isc/list.h>
#include <isc/net.h>
#include <isc/result.h>
#include <isc/stdtime.h>
#include <isc/types.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dnssec.h>
#include <dns/keyvalues.h>
#include <dns/message.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
#include <dns/dnssec.h>
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
#include <dns/result.h>
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
#include <dst/dst.h>
#include <dst/result.h>
......@@ -68,14 +66,18 @@ typedef struct digestctx {
isc_uint8_t type;
} digestctx_t;
static isc_result_t digest_callback(void *arg, isc_region_t *data);
static isc_result_t keyname_to_name(char *keyname, isc_mem_t *mctx,
dns_name_t *name);
static int rdata_compare_wrapper(const void *rdata1, const void *rdata2);
static isc_result_t rdataset_to_sortedarray(dns_rdataset_t *set,
isc_mem_t *mctx,
dns_rdata_t **rdata, int *nrdata);
static isc_result_t
digest_callback(void *arg, isc_region_t *data);
static isc_result_t
keyname_to_name(char *keyname, isc_mem_t *mctx, dns_name_t *name);
static int
rdata_compare_wrapper(const void *rdata1, const void *rdata2);
static isc_result_t
rdataset_to_sortedarray(dns_rdataset_t *set, isc_mem_t *mctx,
dns_rdata_t **rdata, int *nrdata);
static isc_result_t
digest_callback(void *arg, isc_region_t *data) {
......
......@@ -23,7 +23,6 @@
#include <isc/stdtime.h>
#include <isc/bitstring.h>
#include <isc/net.h>
#include <isc/result.h>
#include <dns/types.h>
......
......@@ -22,7 +22,6 @@
***** Module Info
*****/
/*
* DNS Address Database
*
......@@ -80,7 +79,6 @@
#include <isc/list.h>
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/result.h>
#include <isc/sockaddr.h>
#include <isc/stdtime.h>
#include <isc/task.h>
......
......@@ -52,7 +52,6 @@
#include <isc/netaddr.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
......
......@@ -55,7 +55,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
......
......@@ -63,7 +63,6 @@
#include <isc/int.h>
#include <isc/lang.h>
#include <isc/net.h>
#include <isc/result.h>
#include <isc/sockaddr.h>
#include <isc/types.h>
......
......@@ -62,7 +62,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/callbacks.h>
......
......@@ -65,7 +65,6 @@
#include <isc/lang.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
......
......@@ -47,7 +47,6 @@
#include <isc/lang.h>
#include <isc/mem.h>
#include <dns/result.h>
#include <dns/types.h>
#define DNS_DBTABLEFIND_NOEXACT 0x01
......
......@@ -56,7 +56,6 @@
#include <isc/socket.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
......
......@@ -54,7 +54,6 @@
#include <dns/types.h>
#include <dns/name.h>
#include <dns/result.h>
/*****
***** Types
......
......@@ -33,7 +33,6 @@
#include <isc/lang.h>
#include <isc/types.h>
#include <dns/result.h>
#include <dns/types.h>
#include <dns/name.h>
#include <dns/rdata.h>
......
......@@ -42,10 +42,8 @@
#include <isc/types.h>
#include <isc/lang.h>
#include <isc/result.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dst/dst.h>
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: log.h,v 1.16 2000/05/01 17:59:09 tale Exp $ */
/* $Id: log.h,v 1.17 2000/05/02 03:54:08 tale Exp $ */
/* Principal Authors: DCL */
......@@ -25,8 +25,6 @@
#include <isc/lang.h>
#include <isc/log.h>
#include <dns/result.h>
extern isc_log_t *dns_lctx;
extern isc_logcategory_t dns_categories[];
extern isc_logmodule_t dns_modules[];
......
......@@ -27,7 +27,6 @@
#include <isc/lex.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/rdataset.h>
#include <dns/callbacks.h>
......@@ -38,40 +37,43 @@ ISC_LANG_BEGINDECLS
*** Function
***/
isc_result_t dns_master_loadfile(const char *master_file,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t
dns_master_loadfile(const char *master_file,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t dns_master_loadstream(FILE *stream,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t
dns_master_loadstream(FILE *stream,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t dns_master_loadbuffer(isc_buffer_t *buffer,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t
dns_master_loadbuffer(isc_buffer_t *buffer,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
isc_boolean_t age_ttl,
int *soacount,
int *nscount,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
/*
* Loads a RFC 1305 master file from a file, stream, or buffer 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
* 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 abort if callbacks->commit returns
* any value other than ISC_R_SUCCESS.
*
......
......@@ -28,7 +28,6 @@
#include <isc/mem.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/rdataset.h>
......
......@@ -29,7 +29,6 @@
#include <isc/mem.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
......
......@@ -76,7 +76,6 @@
#include <isc/lang.h>
#include <dns/types.h>
#include <dns/result.h>
#include <stdio.h>
......
......@@ -49,7 +49,6 @@
#include <isc/buffer.h>
#include <dns/types.h>