2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

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

headers and adding it to source files that need it.
This commit is contained in:
David Lawrence 2000-05-02 03:54:17 +00:00
parent 5117e028b6
commit 09f22ac5b0
61 changed files with 540 additions and 467 deletions

View File

@ -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*/

View File

@ -17,15 +17,13 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/buffer.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/mem.h>
#include <isc/mutex.h>
#include <isc/task.h>
#include <isc/timer.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>

View File

@ -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*/

View File

@ -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>

View File

@ -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>
/*

View File

@ -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 /* $$$$. */

View File

@ -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)

View File

@ -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,10 +34,8 @@ 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 */

View File

@ -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);

View File

@ -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);

View File

@ -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,25 +26,23 @@
#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/result.h>
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
#include <dst/dst.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) {

View File

@ -23,7 +23,6 @@
#include <isc/stdtime.h>
#include <isc/bitstring.h>
#include <isc/net.h>
#include <isc/result.h>
#include <dns/types.h>

View File

@ -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>

View File

@ -52,7 +52,6 @@
#include <isc/netaddr.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -55,7 +55,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -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>

View File

@ -62,7 +62,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/callbacks.h>

View File

@ -65,7 +65,6 @@
#include <isc/lang.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -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

View File

@ -56,7 +56,6 @@
#include <isc/socket.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -54,7 +54,6 @@
#include <dns/types.h>
#include <dns/name.h>
#include <dns/result.h>
/*****
***** Types

View File

@ -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>

View File

@ -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>

View File

@ -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[];

View File

@ -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,7 +37,8 @@ ISC_LANG_BEGINDECLS
*** Function
***/
isc_result_t dns_master_loadfile(const char *master_file,
isc_result_t
dns_master_loadfile(const char *master_file,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
@ -48,7 +48,8 @@ isc_result_t dns_master_loadfile(const char *master_file,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t dns_master_loadstream(FILE *stream,
isc_result_t
dns_master_loadstream(FILE *stream,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
@ -58,7 +59,8 @@ isc_result_t dns_master_loadstream(FILE *stream,
dns_rdatacallbacks_t *callbacks,
isc_mem_t *mctx);
isc_result_t dns_master_loadbuffer(isc_buffer_t *buffer,
isc_result_t
dns_master_loadbuffer(isc_buffer_t *buffer,
dns_name_t *top,
dns_name_t *origin,
dns_rdataclass_t zclass,
@ -70,8 +72,8 @@ isc_result_t dns_master_loadbuffer(isc_buffer_t *buffer,
/*
* 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.
*

View File

@ -28,7 +28,6 @@
#include <isc/mem.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/rdataset.h>

View File

@ -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>

View File

@ -76,7 +76,6 @@
#include <isc/lang.h>
#include <dns/types.h>
#include <dns/result.h>
#include <stdio.h>

View File

@ -49,7 +49,6 @@
#include <isc/buffer.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -20,12 +20,10 @@
#include <isc/lang.h>
#include <dns/result.h>
#define DNS_NXT_BUFFERSIZE (256 + 16)
ISC_LANG_BEGINDECLS
#define DNS_NXT_BUFFERSIZE (256 + 16)
isc_result_t
dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
dns_dbnode_t *node, dns_name_t *target,

View File

@ -19,7 +19,6 @@
#define DNS_RBT_H 1
#include <isc/lang.h>
#include <isc/result.h>
#include <isc/mem.h>
#include <dns/types.h>

View File

@ -46,9 +46,6 @@
#include <isc/lang.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
/*
* Clients may use this type directly.
@ -62,6 +59,8 @@ struct dns_rdatalist {
ISC_LINK(dns_rdatalist_t) link;
};
ISC_LANG_BEGINDECLS
void
dns_rdatalist_init(dns_rdatalist_t *rdatalist);
/*

View File

@ -56,7 +56,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -66,7 +66,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -44,7 +44,6 @@
#include <isc/event.h>
#include <dns/types.h>
#include <dns/result.h>
#define DNS_REQUESTOPT_TCP 0x00000001U

View File

@ -53,7 +53,6 @@
#include <dns/types.h>
#include <dns/name.h>
#include <dns/fixedname.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
@ -310,7 +309,6 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
* Many other values are possible, all of which indicate failure.
*/
void
dns_resolver_cancelfetch(dns_fetch_t *fetch);
/*
@ -343,9 +341,15 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp);
* *fetchp == NULL.
*/
dns_dispatch_t * dns_resolver_dispatchv4(dns_resolver_t *resolver);
dns_dispatch_t * dns_resolver_dispatchv6(dns_resolver_t *resolver);
isc_socketmgr_t * dns_resolver_socketmgr(dns_resolver_t *resolver);
dns_dispatch_t *
dns_resolver_dispatchv4(dns_resolver_t *resolver);
dns_dispatch_t *
dns_resolver_dispatchv6(dns_resolver_t *resolver);
isc_socketmgr_t *
dns_resolver_socketmgr(dns_resolver_t *resolver);
ISC_LANG_ENDDECLS
#endif /* DNS_RESOLVER_H */

View File

@ -19,12 +19,17 @@
#define DNS_RESULT_H 1
#include <isc/lang.h>
#include <isc/result.h>
#include <isc/resultclass.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
/*
* Nothing in this file truly depends on <isc/result.h>, but the
* DNS result codes are considered to be publicly derived from
* the ISC result codes, so including this file buys you the ISC_R_
* namespace too.
*/
#include <isc/result.h>
/*
* DNS library result codes
@ -115,9 +120,16 @@ ISC_LANG_BEGINDECLS
#define DNS_RESULT_ISRCODE(result) \
(ISC_RESULTCLASS_INCLASS(ISC_RESULTCLASS_DNSRCODE, (result)))
char * dns_result_totext(isc_result_t);
void dns_result_register(void);
dns_rcode_t dns_result_torcode(isc_result_t result);
ISC_LANG_BEGINDECLS
char *
dns_result_totext(isc_result_t);
void
dns_result_register(void);
dns_rcode_t
dns_result_torcode(isc_result_t result);
ISC_LANG_ENDDECLS

View File

@ -19,14 +19,13 @@
#define DNS_ROOTNS_H 1
#include <isc/lang.h>
#include <isc/types.h>
#include <isc/result.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
isc_result_t dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
isc_result_t
dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
const char *filename, dns_db_t **target);
ISC_LANG_ENDDECLS

View File

@ -45,14 +45,10 @@
* Drafts: <TBS>
*/
#include <isc/types.h>
#include <isc/lang.h>
#include <isc/event.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS
/*
* A dns_validatorevent_t is sent when a 'validation' completes.
@ -72,6 +68,8 @@ typedef struct dns_validatorevent {
dns_message_t * message;
} dns_validatorevent_t;
ISC_LANG_BEGINDECLS
isc_result_t
dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,

View File

@ -59,7 +59,6 @@
* Standards:
* None. */
#include <isc/types.h>
#include <isc/lang.h>
#include <isc/event.h>
#include <isc/mutex.h>
@ -67,7 +66,6 @@
#include <isc/stdtime.h>
#include <dns/types.h>
#include <dns/result.h>
ISC_LANG_BEGINDECLS

View File

@ -25,15 +25,13 @@
#include <isc/lang.h>
#include <isc/rwlock.h>
#include <isc/sockaddr.h>
#include <isc/types.h>
#include <dns/adb.h>
#include <dns/types.h>
#include <dns/result.h>
#include <dns/name.h>
#include <dns/fixedname.h>
#include <dns/rdataset.h>
#include <dns/callbacks.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataset.h>
#include <dns/types.h>
typedef enum {
dns_zone_none,
@ -57,8 +55,8 @@ ISC_LANG_BEGINDECLS
*** Functions
***/
isc_result_t dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx);
isc_result_t
dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx);
/*
* Creates a new empty zone and attach to it.
*
@ -75,7 +73,8 @@ isc_result_t dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx);
* ISC_R_UNEXPECTED
*/
void dns_zone_setclass(dns_zone_t *zone, dns_rdataclass_t rdclass);
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.
@ -87,7 +86,8 @@ void dns_zone_setclass(dns_zone_t *zone, dns_rdataclass_t rdclass);
* 'rdclass' != dns_rdataclass_none.
*/
dns_rdataclass_t dns_zone_getclass(dns_zone_t *zone);
dns_rdataclass_t
dns_zone_getclass(dns_zone_t *zone);
/*
* Returns the current zone class.
*
@ -95,7 +95,8 @@ dns_rdataclass_t dns_zone_getclass(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_settype(dns_zone_t *zone, dns_zonetype_t type);
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.
@ -107,7 +108,8 @@ void dns_zone_settype(dns_zone_t *zone, dns_zonetype_t type);
* 'type' != dns_zone_none
*/
void dns_zone_setview(dns_zone_t *zone, dns_view_t *view);
void
dns_zone_setview(dns_zone_t *zone, dns_view_t *view);
/*
* Associate the zone with a view.
*
@ -115,7 +117,8 @@ void dns_zone_setview(dns_zone_t *zone, dns_view_t *view);
* 'zone' to be a valid initalised zone.
*/
dns_view_t *dns_zone_getview(dns_zone_t *zone);
dns_view_t *
dns_zone_getview(dns_zone_t *zone);
/*
* Returns the zone's associated view.
*
@ -123,7 +126,8 @@ dns_view_t *dns_zone_getview(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin);
isc_result_t
dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin);
/*
* Sets the zones origin to 'origin'.
*
@ -136,7 +140,8 @@ isc_result_t dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin);
* ISC_R_NOMEMORY
*/
dns_name_t * dns_zone_getorigin(dns_zone_t *zone);
dns_name_t *
dns_zone_getorigin(dns_zone_t *zone);
/*
* Returns the value of the origin.
*
@ -144,7 +149,8 @@ dns_name_t * dns_zone_getorigin(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_setdatabase(dns_zone_t *zone, const char *database);
isc_result_t
dns_zone_setdatabase(dns_zone_t *zone, const char *database);
/*
* Sets the name of the database to be loaded.
* For databases loaded from MASTER files this corresponds to the
@ -159,7 +165,8 @@ isc_result_t dns_zone_setdatabase(dns_zone_t *zone, const char *database);
* ISC_R_SUCCESS
*/
isc_result_t dns_zone_load(dns_zone_t *zone);
isc_result_t
dns_zone_load(dns_zone_t *zone);
/*
* Cause the database to be loaded from its backing store.
* Confirm that the mimimum requirements for the zone type are
@ -175,7 +182,8 @@ isc_result_t dns_zone_load(dns_zone_t *zone);
* Any result value from dns_db_load().
*/
void dns_zone_checkservers(dns_zone_t *zone);
void
dns_zone_checkservers(dns_zone_t *zone);
/*
* Initiate a consistancy check of the zones servers.
* XXX MPA to be implemented.
@ -184,7 +192,8 @@ void dns_zone_checkservers(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_checkparents(dns_zone_t *zone);
void
dns_zone_checkparents(dns_zone_t *zone);
/*
* Initiate a consistancy check of the zone and the parent zone servers.
* XXX MPA to be implemented.
@ -193,7 +202,8 @@ void dns_zone_checkparents(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_checkchildren(dns_zone_t *zone);
void
dns_zone_checkchildren(dns_zone_t *zone);
/*
* Initiate a consistancy check of the child delegations from this zone.
* XXX MPA to be implemented.
@ -202,7 +212,8 @@ void dns_zone_checkchildren(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_checkglue(dns_zone_t *zone);
void
dns_zone_checkglue(dns_zone_t *zone);
/*
* Initiate a consistancy check of the glue records in this zone.
* XXX MPA to be implemented.
@ -211,7 +222,8 @@ void dns_zone_checkglue(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_attach(dns_zone_t *source, dns_zone_t **target);
void
dns_zone_attach(dns_zone_t *source, dns_zone_t **target);
/*
* Attach 'zone' to 'target' incrementing its external
* reference count.
@ -221,7 +233,8 @@ void dns_zone_attach(dns_zone_t *source, dns_zone_t **target);
* 'target' to be non NULL and '*target' to be NULL.
*/
void dns_zone_detach(dns_zone_t **zonep);
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
@ -231,7 +244,8 @@ void dns_zone_detach(dns_zone_t **zonep);
* 'zonep' to point to a valid initalised zone.
*/
void dns_zone_iattach(dns_zone_t *source, dns_zone_t **target);
void
dns_zone_iattach(dns_zone_t *source, dns_zone_t **target);
/*
* Attach 'zone' to 'target' incrementing its internal
* reference count. This is intended for use by operations
@ -243,7 +257,8 @@ void dns_zone_iattach(dns_zone_t *source, dns_zone_t **target);
* 'target' to be non NULL and '*target' to be NULL.
*/
void dns_zone_idetach(dns_zone_t **zonep);
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
@ -253,8 +268,8 @@ void dns_zone_idetach(dns_zone_t **zonep);
* 'zonep' to point to a valid initalised zone.
*/
void dns_zone_setflag(dns_zone_t *zone, unsigned int flags,
isc_boolean_t value);
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_*.
@ -263,7 +278,8 @@ void dns_zone_setflag(dns_zone_t *zone, unsigned int flags,
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_adddbarg(dns_zone_t *zone, char *arg);
isc_result_t
dns_zone_adddbarg(dns_zone_t *zone, char *arg);
/*
* Add 'arg' to the end of the list of database arguements.
* No attempt in made to validate the arguements.
@ -277,7 +293,8 @@ isc_result_t dns_zone_adddbarg(dns_zone_t *zone, char *arg);
* ISC_R_SUCCESS
*/
void dns_zone_cleardbargs(dns_zone_t *zone);
void
dns_zone_cleardbargs(dns_zone_t *zone);
/*
* Clear all database arguements.
*
@ -285,7 +302,8 @@ void dns_zone_cleardbargs(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_getdb(dns_zone_t *zone, dns_db_t **dbp);
isc_result_t
dns_zone_getdb(dns_zone_t *zone, dns_db_t **dbp);
/*
* Attach the database to '*dbp' if it exists otherwise
* return DNS_R_NOTLOADED.
@ -299,7 +317,8 @@ isc_result_t dns_zone_getdb(dns_zone_t *zone, dns_db_t **dbp);
* DNS_R_NOTLOADED
*/
isc_result_t dns_zone_setdbtype(dns_zone_t *zone, char *db_type);
isc_result_t
dns_zone_setdbtype(dns_zone_t *zone, char *db_type);
/*
* Sets the database type. Current database types are: "rbt", "rbt64".
* 'db_type' is not checked to see if it is a valid database type.
@ -313,11 +332,12 @@ isc_result_t dns_zone_setdbtype(dns_zone_t *zone, char *db_type);
* ISC_R_SUCCESS
*/
void dns_zone_validate(dns_zone_t *zone);
void
dns_zone_validate(dns_zone_t *zone);
/* XXX MPA */
/* XXX MPA */
void dns_zone_expire(dns_zone_t *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
@ -327,7 +347,8 @@ void dns_zone_expire(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_refresh(dns_zone_t *zone);
void
dns_zone_refresh(dns_zone_t *zone);
/*
* Initiate zone up to date checks. The zone must already be being
* managed.
@ -336,7 +357,8 @@ void dns_zone_refresh(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_dump(dns_zone_t *zone);
isc_result_t
dns_zone_dump(dns_zone_t *zone);
/*
* Write the zone to database.
*
@ -344,7 +366,8 @@ isc_result_t dns_zone_dump(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_dumptostream(dns_zone_t *zone, FILE *fd);
isc_result_t
dns_zone_dumptostream(dns_zone_t *zone, FILE *fd);
/*
* Write the zone to stream 'fd'.
*
@ -353,7 +376,8 @@ isc_result_t dns_zone_dumptostream(dns_zone_t *zone, FILE *fd);
* 'fd' to be a stream open for writing.
*/
void dns_zone_maintenance(dns_zone_t *zone);
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.
@ -362,7 +386,8 @@ void dns_zone_maintenance(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
isc_result_t dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
isc_result_t
dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
isc_uint32_t count);
/*
* Add a master server to the end of the set of master servers for
@ -380,7 +405,8 @@ isc_result_t dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
* ISC_R_NOMEMORY
*/
isc_result_t dns_zone_setnotifyalso(dns_zone_t *zone, isc_sockaddr_t *notify,
isc_result_t
dns_zone_setnotifyalso(dns_zone_t *zone, isc_sockaddr_t *notify,
isc_uint32_t count);
/*
* Add a server to the end of the list of additional servers to be
@ -398,10 +424,12 @@ isc_result_t dns_zone_setnotifyalso(dns_zone_t *zone, isc_sockaddr_t *notify,
* ISC_R_NOMEMORY
*/
void dns_zone_unmount(dns_zone_t *zone);
void
dns_zone_unmount(dns_zone_t *zone);
/* XXX MPA */
void dns_zone_unload(dns_zone_t *zone);
void
dns_zone_unload(dns_zone_t *zone);
/*
* detach the database from the zone structure.
*
@ -409,8 +437,8 @@ void dns_zone_unload(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_setoption(dns_zone_t *zone, unsigned int option,
isc_boolean_t value);
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).
@ -419,7 +447,8 @@ void dns_zone_setoption(dns_zone_t *zone, unsigned int option,
* 'zone' to be a valid initalised zone.
*/
void dns_zone_clearoption(dns_zone_t *zone, unsigned int option);
void
dns_zone_clearoption(dns_zone_t *zone, unsigned int option);
/*
* Clear the given options from the zone and allow system wide value
* to be used.
@ -428,7 +457,8 @@ void dns_zone_clearoption(dns_zone_t *zone, unsigned int option);
* 'zone' to be a valid initalised zone.
*/
unsigned int dns_zone_getoptions(dns_zone_t *zone);
unsigned int
dns_zone_getoptions(dns_zone_t *zone);
/*
* Return which options a set.
*
@ -436,7 +466,8 @@ unsigned int dns_zone_getoptions(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_setrefresh(dns_zone_t *zone, isc_uint32_t refresh,
void
dns_zone_setrefresh(dns_zone_t *zone, isc_uint32_t refresh,
isc_uint32_t retry);
/*
* Set the refresh and retry values. Normally this are set as a
@ -492,7 +523,8 @@ dns_zone_getxfrsource6(dns_zone_t *zone);
* 'zone' to be a valid initalised zone.
*/
void dns_zone_setqueryacl(dns_zone_t *zone, dns_acl_t *acl);
void
dns_zone_setqueryacl(dns_zone_t *zone, dns_acl_t *acl);
/*
* Sets the query acl list for the zone.
*
@ -501,7 +533,8 @@ void dns_zone_setqueryacl(dns_zone_t *zone, dns_acl_t *acl);
* 'acl' to be initalised.
*/
void dns_zone_setupdateacl(dns_zone_t *zone, dns_acl_t *acl);
void
dns_zone_setupdateacl(dns_zone_t *zone, dns_acl_t *acl);
/*
* Sets the update acl list for the zone.
*
@ -510,7 +543,8 @@ void dns_zone_setupdateacl(dns_zone_t *zone, dns_acl_t *acl);
* 'acl' to be initalised.
*/
void dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl);
void
dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl);
/*
* Sets the transfer acl list for the zone.
*
@ -519,7 +553,8 @@ void dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl);
* 'acl' to be initalised.
*/
dns_acl_t * dns_zone_getqueryacl(dns_zone_t *zone);
dns_acl_t *
dns_zone_getqueryacl(dns_zone_t *zone);
/*
* Returns the current query acl or NULL.
*
@ -531,7 +566,8 @@ dns_acl_t * dns_zone_getqueryacl(dns_zone_t *zone);
* NULL
*/
dns_acl_t * dns_zone_getupdateacl(dns_zone_t *zone);
dns_acl_t *
dns_zone_getupdateacl(dns_zone_t *zone);
/*
* Returns the current update acl or NULL.
*
@ -543,7 +579,8 @@ dns_acl_t * dns_zone_getupdateacl(dns_zone_t *zone);
* NULL
*/
dns_acl_t * dns_zone_getxfracl(dns_zone_t *zone);
dns_acl_t *
dns_zone_getxfracl(dns_zone_t *zone);
/*
* Returns the current transfer acl or NULL.
*
@ -555,7 +592,8 @@ dns_acl_t * dns_zone_getxfracl(dns_zone_t *zone);
* NULL
*/
void dns_zone_clearupdateacl(dns_zone_t *zone);
void
dns_zone_clearupdateacl(dns_zone_t *zone);
/*
* Clear the current update acl.
*
@ -563,7 +601,8 @@ void dns_zone_clearupdateacl(dns_zone_t *zone);
* 'zone' to be initalised.
*/
void dns_zone_clearqueryacl(dns_zone_t *zone);
void
dns_zone_clearqueryacl(dns_zone_t *zone);
/*
* Clear the current query acl.
*
@ -571,7 +610,8 @@ void dns_zone_clearqueryacl(dns_zone_t *zone);
* 'zone' to be initalised.
*/
void dns_zone_clearxfracl(dns_zone_t *zone);
void
dns_zone_clearxfracl(dns_zone_t *zone);
/*
* Clear the current transfer acl.
*
@ -579,7 +619,8 @@ void dns_zone_clearxfracl(dns_zone_t *zone);
* 'zone' to be initalised.
*/
void dns_zone_setchecknames(dns_zone_t *zone, dns_severity_t severity);
void
dns_zone_setchecknames(dns_zone_t *zone, dns_severity_t severity);
/*
* Set the severity of name checking when loading a zone.
*
@ -587,7 +628,8 @@ void dns_zone_setchecknames(dns_zone_t *zone, dns_severity_t severity);
* 'zone' to be initalised.
*/
dns_severity_t dns_zone_getchecknames(dns_zone_t *zone);
dns_severity_t
dns_zone_getchecknames(dns_zone_t *zone);
/*
* Return the current severity of name checking.
*
@ -595,15 +637,23 @@ dns_severity_t dns_zone_getchecknames(dns_zone_t *zone);
* 'zone' to be initalised.
*/
void dns_zone_setjournalsize(dns_zone_t *zone, isc_int32_t size);
isc_int32_t dns_zone_getjournalsize(dns_zone_t *zone);
void
dns_zone_setjournalsize(dns_zone_t *zone, isc_int32_t size);
void dns_zone_setresolver(dns_zone_t *zone, dns_resolver_t *resolver);
void dns_zone_setrequestmgr(dns_zone_t *zone, dns_requestmgr_t *requestmgr);
void dns_zone_setadb(dns_zone_t *zone, dns_adb_t *adb);
isc_int32_t
dns_zone_getjournalsize(dns_zone_t *zone);
void
dns_zone_setresolver(dns_zone_t *zone, dns_resolver_t *resolver);
isc_result_t dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
void
dns_zone_setrequestmgr(dns_zone_t *zone, dns_requestmgr_t *requestmgr);
void
dns_zone_setadb(dns_zone_t *zone, dns_adb_t *adb);
isc_result_t
dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
dns_message_t *msg);
void
@ -617,7 +667,8 @@ dns_zone_setmaxxfrin(dns_zone_t *zone, isc_uint32_t maxxfrin);
* 'xfrtime' to be non zero.
*/
isc_uint32_t dns_zone_getmaxxfrin(dns_zone_t *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
@ -638,7 +689,8 @@ dns_zone_setmaxxfrout(dns_zone_t *zone, isc_uint32_t maxxfrout);
* 'xfrtime' to be non zero.
*/
isc_uint32_t dns_zone_getmaxxfrout(dns_zone_t *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
@ -648,8 +700,8 @@ isc_uint32_t dns_zone_getmaxxfrout(dns_zone_t *zone);
* 'zone' to be valid initialised zone.
*/
isc_result_t dns_zone_setjournal(dns_zone_t *zone, const char *journal);
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_setdatabase() to be
@ -664,8 +716,8 @@ isc_result_t dns_zone_setjournal(dns_zone_t *zone, const char *journal);
* ISC_R_NOMEMORY
*/
char * dns_zone_getjournal(dns_zone_t *zone);
char *
dns_zone_getjournal(dns_zone_t *zone);
/*
* Returns the journal name associated with this zone.
* If not journal has been set this will be NULL.
@ -674,7 +726,8 @@ char * dns_zone_getjournal(dns_zone_t *zone);
* 'zone' to be valid initialised zone.
*/
dns_zonetype_t dns_zone_gettype(dns_zone_t *zone);
dns_zonetype_t
dns_zone_gettype(dns_zone_t *zone);
/*
* Returns the type of the zone (master/slave/etc.)
*
@ -703,7 +756,8 @@ dns_zone_gettask(dns_zone_t *zone, isc_task_t **target);
* 'target' to be != NULL && '*target' == NULL.
*/
const char *dns_zone_getdatabase(dns_zone_t *zone);
const char *
dns_zone_getdatabase(dns_zone_t *zone);
/*
* Gets the name of the database. For databases loaded from
* master files, this corresponds to the file name of the master file.
@ -712,7 +766,8 @@ const char *dns_zone_getdatabase(dns_zone_t *zone);
* 'zone' to be valid initialised zone.
*/
void dns_zone_notify(dns_zone_t *zone);
void
dns_zone_notify(dns_zone_t *zone);
/*
* Generate notify events for this zone.
*
@ -721,8 +776,7 @@ void dns_zone_notify(dns_zone_t *zone);
*/
isc_result_t
dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db,
isc_boolean_t dump);
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".
*
@ -742,7 +796,6 @@ dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db,
isc_boolean_t
dns_zone_equal(dns_zone_t *oldzone, dns_zone_t *newzone);
/*
* Tests whether the configuration of two zones is equal.
* Zone contents and state information is not tested.
@ -809,7 +862,8 @@ dns_zone_getmctx(dns_zone_t *zone);
* Get the memory context of a zone.
*/
dns_zonemgr_t *dns_zone_getmgr(dns_zone_t *zone);
dns_zonemgr_t *
dns_zone_getmgr(dns_zone_t *zone);
isc_result_t
dns_zonemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,

View File

@ -20,17 +20,16 @@
#include <stddef.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/magic.h>
#include <isc/rwlock.h>
#include <isc/result.h>
#include <isc/util.h>
#include <dns/keytable.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rbt.h>
#include <dns/result.h>
#include <dst/dst.h>

View File

@ -24,22 +24,22 @@
#include <stddef.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/boolean.h>
#include <isc/region.h>
#include <isc/types.h>
#include <isc/util.h>
#include <dns/message.h>
#include <dns/rdataset.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/rdatalist.h>
#include <dns/compress.h>
#include <dns/tsig.h>
#include <dns/dnssec.h>
#include <dns/keyvalues.h>
#include <dns/message.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/tsig.h>
#include <dns/view.h>
#define DNS_MESSAGE_OPCODE_MASK 0x7800U

View File

@ -19,18 +19,18 @@
#include <string.h>
#include <isc/assertions.h>
#include <isc/util.h>
#include <dns/types.h>
#include <dns/name.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/name.h>
#include <dns/nxt.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatalist.h>
#include <dns/nxt.h>
#include <dns/result.h>
#include <dns/types.h>
#define check_result(op, msg) \
do { result = (op); \

View File

@ -25,24 +25,23 @@
#include <string.h>
#include <limits.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/mutex.h>
#include <isc/rwlock.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/rbt.h>
#include <dns/fixedname.h>
#include <dns/master.h>
#include <dns/rdataslab.h>
#include <dns/masterdump.h>
#include <dns/name.h>
#include <dns/rbt.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/masterdump.h>
#include <dns/rdataslab.h>
#include <dns/result.h>
#include <dns/types.h>
#ifdef DNS_RBTDB_VERSION64
#include "rbtdb64.h"

View File

@ -17,7 +17,6 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/event.h>
#include <isc/net.h>
@ -32,6 +31,7 @@
#include <dns/events.h>
#include <dns/message.h>
#include <dns/request.h>
#include <dns/result.h>
#define REQUESTMGR_MAGIC 0x5271754dU /* RquM */
#define VALID_REQUESTMGR(mgr) ((mgr) != NULL && \

View File

@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: bsafe_link.c,v 1.14 2000/04/28 01:10:41 halley Exp $
* $Id: bsafe_link.c,v 1.15 2000/05/02 03:54:14 tale Exp $
*/
#include <config.h>
@ -37,6 +37,8 @@
#include <dns/keyvalues.h>
#include <dst/result.h>
#include "dst_internal.h"
#include "dst_parse.h"

View File

@ -26,7 +26,6 @@
#include "../rename.h"
#include <dst/dst.h>
#include <dst/result.h>
ISC_LANG_BEGINDECLS
@ -86,7 +85,9 @@ struct dst_func {
extern dst_func *dst_t_func[DST_MAX_ALGS];
/* suffixes for key file names */
/*
* Suffixes for key file names.
*/
#define PRIVATE_KEY "private"
#define PUBLIC_KEY "key"
@ -94,32 +95,42 @@ extern dst_func *dst_t_func[DST_MAX_ALGS];
#define DST_HASH_SIZE 20 /* RIPEMD160 & SHA-1 are 20 bytes, MD5 is 16 */
#endif
void dst_s_hmacmd5_init(void);
void dst_s_bsafersa_init(void);
void dst_s_openssldsa_init(void);
void dst_s_openssldh_init(void);
void
dst_s_hmacmd5_init(void);
void
dst_s_bsafersa_init(void);
void
dst_s_openssldsa_init(void);
void
dst_s_openssldh_init(void);
/* support functions */
/*
* Support functions.
*/
int
dst_s_calculate_bits(const unsigned char *str, const int max_bits);
isc_uint16_t
dst_s_id_calc(const unsigned char *key, const int keysize);
int
dst_s_build_filename(char *filename, const char *name, isc_uint16_t id,
int alg, const char *suffix, size_t filename_length);
int dst_s_calculate_bits(const unsigned char *str, const int max_bits);
isc_uint16_t dst_s_id_calc(const unsigned char *key, const int keysize);
int dst_s_build_filename(char *filename, const char *name,
isc_uint16_t id, int alg,
const char *suffix,
size_t filename_length);
/* digest functions */
isc_result_t dst_s_md5(const unsigned int mode, void **context,
isc_region_t *data, isc_buffer_t *digest,
isc_mem_t *mctx);
/* memory allocators using the DST memory pool */
void * dst_mem_alloc(size_t size);
void dst_mem_free(void *ptr);
void * dst_mem_realloc(void *ptr, size_t size);
/*
* Digest functions.
*/
isc_result_t
dst_s_md5(const unsigned int mode, void **context, isc_region_t *data,
isc_buffer_t *digest, isc_mem_t *mctx);
/*
* Memory allocators using the DST memory pool.
*/
void *
dst_mem_alloc(size_t size);
void
dst_mem_free(void *ptr);
void *
dst_mem_realloc(void *ptr, size_t size);
ISC_LANG_ENDDECLS

View File

@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.21 2000/04/28 01:10:46 halley Exp $
* $Id: hmac_link.c,v 1.22 2000/05/02 03:54:15 tale Exp $
*/
#include <config.h>
@ -34,6 +34,8 @@
#include <isc/region.h>
#include <isc/util.h>
#include <dst/result.h>
#include "dst_internal.h"
#include "dst_parse.h"
@ -55,36 +57,45 @@ typedef struct hmackey {
static struct dst_func hmacmd5_functions;
static isc_result_t dst_hmacmd5_sign(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
static isc_result_t dst_hmacmd5_verify(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t dst_hmacmd5_compare(const dst_key_t *key1,
const dst_key_t *key2);
static isc_result_t dst_hmacmd5_generate(dst_key_t *key, int exp,
isc_mem_t *mctx);
static isc_boolean_t dst_hmacmd5_isprivate(const dst_key_t *key);
static void dst_hmacmd5_destroy(void *key, isc_mem_t *mctx);
static isc_result_t dst_hmacmd5_to_dns(const dst_key_t *in_key,
isc_buffer_t *data);
static isc_result_t dst_hmacmd5_from_dns(dst_key_t *key, isc_buffer_t *data,
isc_mem_t *mctx);
static isc_result_t dst_hmacmd5_to_file(const dst_key_t *key);
static isc_result_t dst_hmacmd5_from_file(dst_key_t *key,
const isc_uint16_t id,
static isc_result_t
dst_hmacmd5_sign(const unsigned int mode, dst_key_t *key,
void **context, isc_region_t *data, isc_buffer_t *sig,
isc_mem_t *mctx);
static isc_result_t
dst_hmacmd5_verify(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t
dst_hmacmd5_compare(const dst_key_t *key1, const dst_key_t *key2);
static isc_result_t
dst_hmacmd5_generate(dst_key_t *key, int exp, isc_mem_t *mctx);
static isc_boolean_t
dst_hmacmd5_isprivate(const dst_key_t *key);
static void
dst_hmacmd5_destroy(void *key, isc_mem_t *mctx);
static isc_result_t
dst_hmacmd5_to_dns(const dst_key_t *in_key, isc_buffer_t *data);
static isc_result_t
dst_hmacmd5_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx);
static isc_result_t
dst_hmacmd5_to_file(const dst_key_t *key);
static isc_result_t
dst_hmacmd5_from_file(dst_key_t *key, const isc_uint16_t id, isc_mem_t *mctx);
/*
* dst_s_hmacmd5_init()
* Sets up function pointers for HMAC-MD5 related functions
*/
void
dst_s_hmacmd5_init()
{
dst_s_hmacmd5_init() {
REQUIRE(dst_t_func[DST_ALG_HMACMD5] == NULL);
dst_t_func[DST_ALG_HMACMD5] = &hmacmd5_functions;
memset(&hmacmd5_functions, 0, sizeof(struct dst_func));
@ -243,12 +254,11 @@ dst_hmacmd5_verify(const unsigned int mode, dst_key_t *key, void **context,
*/
static isc_boolean_t
dst_hmacmd5_isprivate(const dst_key_t *key) {
key = key; /* suppress warning */
UNUSED(key);
return (ISC_TRUE);
}
/*
* dst_hmacmd5_to_dns
* Converts key from HMAC to DNS rdata (raw bytes)
@ -259,7 +269,6 @@ dst_hmacmd5_isprivate(const dst_key_t *key) {
* ISC_R_SUCCESS Success
* !ISC_R_SUCCESS Failure
*/
static isc_result_t
dst_hmacmd5_to_dns(const dst_key_t *key, isc_buffer_t *data) {
HMAC_Key *hkey;
@ -284,7 +293,6 @@ dst_hmacmd5_to_dns(const dst_key_t *key, isc_buffer_t *data) {
return (ISC_R_SUCCESS);
}
/*
* dst_hmacmd5_from_dns
* Converts from a DNS KEY RR format to an HMAC-MD5 KEY.
@ -329,7 +337,9 @@ dst_hmacmd5_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx) {
keylen = r.length;
}
/* XOR key with ipad and opad values */
/*
* XOR key with ipad and opad values.
*/
for (i = 0; i < HMAC_LEN; i++) {
hkey->ipad[i] ^= HMAC_IPAD;
hkey->opad[i] ^= HMAC_OPAD;
@ -387,7 +397,6 @@ dst_hmacmd5_to_file(const dst_key_t *key) {
* ISC_R_SUCCESS Success
* !ISC_R_SUCCESS Failure
*/
static isc_result_t
dst_hmacmd5_from_file(dst_key_t *key, const isc_uint16_t id, isc_mem_t *mctx) {
dst_private_t priv;
@ -432,7 +441,6 @@ dst_hmacmd5_destroy(void *key, isc_mem_t *mctx) {
isc_mem_put(mctx, hkey, sizeof(HMAC_Key));
}
/*
* dst_hmacmd5_generate
* Creates an HMAC-MD5 key. If the specified size is more than 512
@ -445,7 +453,6 @@ dst_hmacmd5_destroy(void *key, isc_mem_t *mctx) {
* ISC_R_SUCCESS Success
* !ISC_R_SUCCESS Failure
*/
static isc_result_t
dst_hmacmd5_generate(dst_key_t *key, int unused, isc_mem_t *mctx) {
isc_buffer_t b;
@ -453,7 +460,7 @@ dst_hmacmd5_generate(dst_key_t *key, int unused, isc_mem_t *mctx) {
int bytes;
unsigned char data[HMAC_LEN];
unused = unused; /* make the compiler happy */
UNUSED(unused);
bytes = (key->key_size + 7) / 8;
if (bytes > 64) {
@ -473,7 +480,6 @@ dst_hmacmd5_generate(dst_key_t *key, int unused, isc_mem_t *mctx) {
return (ret);
}
/**************************************************************************
* dst_hmacmd5_compare
* Compare two keys for equality.
@ -485,8 +491,8 @@ static isc_boolean_t
dst_hmacmd5_compare(const dst_key_t *key1, const dst_key_t *key2) {
HMAC_Key *hkey1, *hkey2;
hkey1 = (HMAC_Key *) key1->opaque;
hkey2 = (HMAC_Key *) key2->opaque;
hkey1 = (HMAC_Key *)key1->opaque;
hkey2 = (HMAC_Key *)key2->opaque;
if (hkey1 == NULL && hkey2 == NULL)
return (ISC_TRUE);

View File

@ -8,8 +8,6 @@
#include <isc/mem.h>
#include <isc/region.h>
#include <dst/result.h>
ISC_LANG_BEGINDECLS
/***
@ -59,13 +57,17 @@ typedef void * dst_context_t;
*** Functions
***/
isc_boolean_t
dst_supported_algorithm(const int alg);
/*
* Check that a given algorithm is supported
*/
isc_boolean_t
dst_supported_algorithm(const int alg);
/* Sign a block of data.
isc_result_t
dst_sign(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_buffer_t *sig);
/*
* Sign a block of data.
*
* Requires:
* "mode" is some combination of DST_SIGMODE_INIT, DST_SIGMODE_UPDATE,
@ -79,11 +81,12 @@ dst_supported_algorithm(const int alg);
* All allocated memory will be freed after the FINAL call. "sig"
* will contain a signature if all operations completed successfully.
*/
isc_result_t
dst_sign(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_buffer_t *sig);
/* Verify a signature on a block of data.
isc_result_t
dst_verify(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_region_t *sig);
/*
* Verify a signature on a block of data.
*
* Requires:
* "mode" is some combination of DST_SIGMODE_INIT, DST_SIGMODE_UPDATE,
@ -96,11 +99,12 @@ dst_sign(const unsigned int mode, dst_key_t *key, dst_context_t *context,
* Ensures:
* All allocated memory will be freed after the FINAL call.
*/
isc_result_t
dst_verify(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_region_t *sig);
/* Digest a block of data.
isc_result_t
dst_digest(const unsigned int mode, const unsigned int alg,
dst_context_t *context, isc_region_t *data, isc_buffer_t *digest);
/*
* Digest a block of data.
*
* Requires:
* "mode" is some combination of DST_SIGMODE_INIT, DST_SIGMODE_UPDATE,
@ -114,12 +118,11 @@ dst_verify(const unsigned int mode, dst_key_t *key, dst_context_t *context,
* All allocated memory will be freed after the FINAL call. "digest"
* will contain a digest if all operations completed successfully.
*/
isc_result_t
dst_digest(const unsigned int mode, const unsigned int alg,
dst_context_t *context, isc_region_t *data, isc_buffer_t *digest);
isc_result_t
dst_computesecret(const dst_key_t *pub, const dst_key_t *priv,
isc_buffer_t *secret);
/*
* dst_computesecret
* A function to compute a shared secret from two (Diffie-Hellman) keys.
*
* Requires:
@ -130,11 +133,12 @@ dst_digest(const unsigned int mode, const unsigned int alg,
* Ensures:
* If successful, secret will contain the derived shared secret.
*/
isc_result_t
dst_computesecret(const dst_key_t *pub, const dst_key_t *priv,
isc_buffer_t *secret);
/* Reads a key from permanent storage.
isc_result_t
dst_key_fromfile(const char *name, const isc_uint16_t id, const int alg,
const int type, isc_mem_t *mctx, dst_key_t **keyp);
/*
* Reads a key from permanent storage.
*
* Requires:
* "name" is not NULL.
@ -147,20 +151,22 @@ dst_computesecret(const dst_key_t *pub, const dst_key_t *priv,
* Ensures:
* If successful, *keyp will contain a valid key.
*/
isc_result_t
dst_key_fromfile(const char *name, const isc_uint16_t id, const int alg,
const int type, isc_mem_t *mctx, dst_key_t **keyp);
/* Writes a key to permanent storage.
isc_result_t
dst_key_tofile(const dst_key_t *key, const int type);
/*
* Writes a key to permanent storage.
*
* Requires:
* "key" is a valid key.
* "type" is either DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or both.
*/
isc_result_t
dst_key_tofile(const dst_key_t *key, const int type);
/* Converts a DNS KEY record into a DST key.
isc_result_t
dst_key_fromdns(const char *name, isc_buffer_t *source, isc_mem_t *mctx,
dst_key_t **keyp);
/*
* Converts a DNS KEY record into a DST key.
*
* Requires:
* "name" is not NULL.
@ -172,11 +178,11 @@ dst_key_tofile(const dst_key_t *key, const int type);
* If successful, *keyp will contain a valid key, and the consumed
* pointer in data will be advanced.
*/
isc_result_t
dst_key_fromdns(const char *name, isc_buffer_t *source, isc_mem_t *mctx,
dst_key_t **keyp);
/* Converts a DST key into a DNS KEY record.
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.
@ -185,10 +191,13 @@ dst_key_fromdns(const char *name, isc_buffer_t *source, isc_mem_t *mctx,
* Ensures:
* If successful, the used pointer in 'target' is advanced by at least 4.
*/
isc_result_t
dst_key_todns(const dst_key_t *key, isc_buffer_t *target);
/* Converts a buffer containing DNS KEY RDATA into a DST key.
isc_result_t
dst_key_frombuffer(const char *name, const int alg, const int flags,
const int protocol, 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 not NULL.
@ -201,12 +210,11 @@ dst_key_todns(const dst_key_t *key, isc_buffer_t *target);
* If successful, *keyp will contain a valid key, and the consumed
* pointer in source will be advanced.
*/
isc_result_t
dst_key_frombuffer(const char *name, const int alg, const int flags,
const int protocol, isc_buffer_t *source, isc_mem_t *mctx,
dst_key_t **keyp);
/* Converts a DST key into DNS KEY RDATA format.
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.
@ -215,10 +223,13 @@ dst_key_frombuffer(const char *name, const int alg, const int flags,
* Ensures:
* If successful, the used pointer in 'target' is advanced.
*/
isc_result_t
dst_key_tobuffer(const dst_key_t *key, isc_buffer_t *target);
/* Generate a DST key (or keypair)
isc_result_t
dst_key_generate(const char *name, const int alg, const int bits,
const int param, const int flags, const int protocol,
isc_mem_t *mctx, dst_key_t **keyp);
/*
* Generate a DST key (or keypair)
*
* Requires:
* "name" is not NULL
@ -229,30 +240,31 @@ dst_key_tobuffer(const dst_key_t *key, isc_buffer_t *target);
* Ensures:
* If successful, *keyp will contain a valid key.
*/
isc_result_t
dst_key_generate(const char *name, const int alg, const int bits,
const int param, const int flags, const int protocol,
isc_mem_t *mctx, dst_key_t **keyp);
/* Compares two DST keys.
*
* Requires:
* "key1" is a valid key.
* "key2" is a valid key.
*/
isc_boolean_t
dst_key_compare(const dst_key_t *key1, const dst_key_t *key2);
/* Compares the parameters of two DST keys.
/*
* Compares two DST keys.
*
* Requires:
* "key1" is a valid key.
* "key2" is a valid key.
*/
isc_boolean_t
dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2);
/*
* Compares the parameters of two DST keys.
*
* Requires:
* "key1" is a valid key.
* "key2" is a valid key.
*/
/* Free a DST key.
void
dst_key_free(dst_key_t *key);
/*
* Free a DST key.
*
* Requires:
* "key" is a valid key.
@ -260,10 +272,9 @@ dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2);
* Ensures:
* All memory associated with "key" will be freed.
*/
void
dst_key_free(dst_key_t *key);
/* Accessor functions to obtain key fields.
/*
* Accessor functions to obtain key fields.
*
* Require:
* "key" is a valid key.
@ -295,20 +306,10 @@ dst_key_iszonekey(const dst_key_t *key);
isc_boolean_t
dst_key_isnullkey(const dst_key_t *key);
/* Computes the size of a signature generated by the given key.
*
* Requires:
* "key" is a valid key.
* "n" is not NULL
*
* Returns:
* ISC_R_SUCCESS
* DST_R_UNSUPPORTEDALG
*/
isc_result_t
dst_sig_size(const dst_key_t *key, unsigned int *n);
/* Computes the size of a shared secret generated by the given key.
/*
* Computes the size of a signature generated by the given key.
*
* Requires:
* "key" is a valid key.
@ -318,10 +319,25 @@ dst_sig_size(const dst_key_t *key, unsigned int *n);
* ISC_R_SUCCESS
* DST_R_UNSUPPORTEDALG
*/
isc_result_t
dst_secret_size(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
*
* Returns:
* ISC_R_SUCCESS
* DST_R_UNSUPPORTEDALG
*/
/* Generate random data.
isc_result_t
dst_random_get(const unsigned int wanted, isc_buffer_t *data);
/*
* Generate random data.
*
* Requires:
* "data" is a valid buffer, with at least "wanted" bytes available.
@ -330,8 +346,6 @@ dst_secret_size(const dst_key_t *key, unsigned int *n);
* <= wanted bytes will be written to "data", and the used pointer will
* be advanced.
*/
isc_result_t
dst_random_get(const unsigned int wanted, isc_buffer_t *data);
ISC_LANG_ENDDECLS

View File

@ -19,10 +19,15 @@
#define DST_RESULT_H 1
#include <isc/lang.h>
#include <isc/result.h>
#include <isc/resultclass.h>
ISC_LANG_BEGINDECLS
/*
* Nothing in this file truly depends on <isc/result.h>, but the
* DST result codes are considered to be publicly derived from
* the ISC result codes, so including this file buys you the ISC_R_
* namespace too.
*/
#include <isc/result.h>
#define DST_R_UNSUPPORTEDALG (ISC_RESULTCLASS_DST + 0)
#define DST_R_UNSUPPORTEDTYPE (ISC_RESULTCLASS_DST + 1)
@ -47,9 +52,13 @@ ISC_LANG_BEGINDECLS
#define DST_R_NRESULTS 20 /* Number of results */
ISC_LANG_BEGINDECLS
char * dst_result_totext(isc_result_t);
void dst_result_register(void);
char *
dst_result_totext(isc_result_t);
void
dst_result_register(void);
ISC_LANG_ENDDECLS

View File

@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: openssl_link.c,v 1.17 2000/04/28 01:10:48 halley Exp $
* $Id: openssl_link.c,v 1.18 2000/05/02 03:54:15 tale Exp $
*/
#include <config.h>
@ -36,6 +36,8 @@
#include <isc/region.h>
#include <isc/util.h>
#include <dst/result.h>
#include "dst_internal.h"
#include "dst_parse.h"
@ -46,32 +48,40 @@
static struct dst_func openssl_functions;
static isc_result_t dst_openssl_sign(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
static isc_result_t dst_openssl_verify(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t dst_openssl_compare(const dst_key_t *key1,
const dst_key_t *key2);
static isc_result_t dst_openssl_generate(dst_key_t *key, int unused,
isc_mem_t *mctx);
static isc_boolean_t dst_openssl_isprivate(const dst_key_t *key);
static void dst_openssl_destroy(void *key, isc_mem_t *mctx);
static isc_result_t dst_openssl_to_dns(const dst_key_t *in_key,
isc_buffer_t *data);
static isc_result_t dst_openssl_from_dns(dst_key_t *key, isc_buffer_t *data,
isc_mem_t *mctx);
static isc_result_t dst_openssl_to_file(const dst_key_t *key);
static isc_result_t dst_openssl_from_file(dst_key_t *key,
const isc_uint16_t id,
isc_mem_t *mctx);
static isc_result_t
dst_openssl_sign(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_buffer_t *sig, isc_mem_t *mctx);
static int BN_bn2bin_fixed(BIGNUM *bn, unsigned char *buf,
int size);
static isc_result_t
dst_openssl_verify(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t
dst_openssl_compare(const dst_key_t *key1, const dst_key_t *key2);
static isc_result_t
dst_openssl_generate(dst_key_t *key, int unused, isc_mem_t *mctx);
static isc_boolean_t
dst_openssl_isprivate(const dst_key_t *key);
static void
dst_openssl_destroy(void *key, isc_mem_t *mctx);
static isc_result_t
dst_openssl_to_dns(const dst_key_t *in_key, isc_buffer_t *data);
static isc_result_t
dst_openssl_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx);
static isc_result_t
dst_openssl_to_file(const dst_key_t *key);
static isc_result_t
dst_openssl_from_file(dst_key_t *key, const isc_uint16_t id, isc_mem_t *mctx);
static int
BN_bn2bin_fixed(BIGNUM *bn, unsigned char *buf, int size);
/*
* dst_s_openssldsa_init()
@ -620,4 +630,4 @@ BN_bn2bin_fixed(BIGNUM *bn, unsigned char *buf, int size) {
return (size);
}
#endif
#endif /* OPENSSL */

View File

@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: openssldh_link.c,v 1.10 2000/04/28 01:10:49 halley Exp $
* $Id: openssldh_link.c,v 1.11 2000/05/02 03:54:16 tale Exp $
*/
#include <config.h>
@ -38,6 +38,8 @@
#include <isc/region.h>
#include <isc/util.h>
#include <dst/result.h>
#include "dst_internal.h"
#include "dst_parse.h"
@ -687,4 +689,4 @@ BN_fromhex(BIGNUM *b, const char *str) {
RUNTIME_CHECK(out != NULL);
}
#endif
#endif /* OPENSSL */

View File

@ -16,24 +16,19 @@
*/
/*
* $Id: tkey.c,v 1.31 2000/04/28 02:08:29 marka Exp $
* $Id: tkey.c,v 1.32 2000/05/02 03:53:57 tale Exp $
* Principal Author: Brian Wellington
*/
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/error.h>
#include <isc/list.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/result.h>
#include <isc/rwlock.h>
#include <isc/stdtime.h>
#include <isc/types.h>
@ -47,6 +42,7 @@
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
#include <dns/result.h>
#include <dns/tkey.h>
#include <dns/tsig.h>

View File

@ -16,35 +16,31 @@
*/
/*
* $Id: tsig.c,v 1.53 2000/04/28 01:10:22 halley Exp $
* $Id: tsig.c,v 1.54 2000/05/02 03:53:58 tale Exp $
* Principal Author: Brian Wellington
*/
#include <config.h>
#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/once.h>
#include <isc/result.h>
#include <isc/rwlock.h>
#include <isc/stdtime.h>
#include <isc/types.h>
#include <isc/util.h>
#include <dns/keyvalues.h>
#include <dns/name.h>
#include <dns/message.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
#include <dns/result.h>
#include <dns/tsig.h>
#include <dst/dst.h>

View File

@ -17,17 +17,14 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/buffer.h>
#include <isc/magic.h>
#include <isc/print.h>
#include <isc/region.h>
#include <isc/result.h>
#include <isc/stdtime.h>
#include <isc/task.h>
#include <isc/util.h>
#include <dns/validator.h>
#include <dns/db.h>
#include <dns/dnssec.h>
#include <dns/events.h>
@ -38,9 +35,11 @@
#include <dns/name.h>
#include <dns/nxt.h>
#include <dns/rdata.h>
#include <dns/rdatatype.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/validator.h>
#include <dns/view.h>
#include <dst/dst.h>

View File

@ -19,28 +19,25 @@
#include <string.h>
#include <isc/types.h>
#include <isc/result.h>
#include <isc/mem.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/util.h>
#include <dns/types.h>
#include <dns/acl.h>
#include <dns/adb.h>
#include <dns/cache.h>
#include <dns/dbtable.h>
#include <dns/db.h>
#include <dns/dbtable.h>
#include <dns/events.h>
#include <dns/fixedname.h>
#include <dns/keytable.h>
#include <dns/peer.h>
#include <dns/rbt.h>
#include <dns/rdataset.h>
#include <dns/resolver.h>
#include <dns/request.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/tsig.h>
#include <dns/types.h>
#include <dns/view.h>
#include <dns/zone.h>
#include <dns/zt.h>

View File

@ -15,24 +15,22 @@
* SOFTWARE.
*/
/* $Id: zone.c,v 1.104 2000/04/28 17:18:19 marka Exp $ */
/* $Id: zone.c,v 1.105 2000/05/02 03:54:01 tale Exp $ */
#include <config.h>
#include <string.h>
#include <stdarg.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/file.h>
#include <isc/magic.h>
#include <isc/print.h>
#include <isc/quota.h>
#include <isc/ratelimiter.h>
#include <isc/rwlock.h>
#include <isc/quota.h>
#include <isc/serial.h>
#include <isc/taskpool.h>
#include <isc/timer.h>
#include <isc/file.h>
#include <isc/util.h>
#include <dns/acl.h>
@ -51,8 +49,9 @@
#include <dns/rdatalist.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#include <dns/resolver.h>
#include <dns/request.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/ssu.h>
#include <dns/xfrin.h>
#include <dns/zone.h>

View File

@ -17,13 +17,12 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/magic.h>
#include <isc/rwlock.h>
#include <isc/result.h>
#include <isc/util.h>
#include <dns/rbt.h>
#include <dns/result.h>
#include <dns/zone.h>
#include <dns/zt.h>

View File

@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: auth.c,v 1.4 2000/04/28 02:08:15 tale Exp $ */
/* $Id: auth.c,v 1.5 2000/05/02 03:54:17 tale Exp $ */
/* Principal Author: DCL */
@ -44,6 +44,8 @@
#include <isc/error.h>
#include <isc/once.h>
#include <dst/result.h>
#include <omapi/private.h>
typedef struct auth auth_t;

View File

@ -25,8 +25,9 @@
#include <stdlib.h> /* random */
#include <string.h> /* memset */
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/util.h>
#include <dst/result.h>
#include <omapi/private.h>