dnssectool.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004, 2007-2012, 2014, 2015  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 2000, 2001, 2003  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
00019 
00020 #ifndef DNSSECTOOL_H
00021 #define DNSSECTOOL_H 1
00022 
00023 #include <isc/log.h>
00024 #include <isc/stdtime.h>
00025 #include <dns/rdatastruct.h>
00026 #include <dst/dst.h>
00027 
00028 #define check_dns_dbiterator_current(result) \
00029         check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
00030                      "dns_dbiterator_current()")
00031 
00032 
00033 typedef void (fatalcallback_t)(void);
00034 
00035 ISC_PLATFORM_NORETURN_PRE void
00036 fatal(const char *format, ...)
00037 ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
00038 
00039 void
00040 setfatalcallback(fatalcallback_t *callback);
00041 
00042 void
00043 check_result(isc_result_t result, const char *message);
00044 
00045 void
00046 vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
00047 
00048 void
00049 version(const char *program);
00050 
00051 void
00052 type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
00053 #define TYPE_FORMATSIZE 20
00054 
00055 void
00056 sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
00057 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
00058 
00059 void
00060 setup_logging(isc_mem_t *mctx, isc_log_t **logp);
00061 
00062 void
00063 cleanup_logging(isc_log_t **logp);
00064 
00065 void
00066 setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
00067 
00068 void
00069 cleanup_entropy(isc_entropy_t **ectx);
00070 
00071 dns_ttl_t strtottl(const char *str);
00072 
00073 isc_stdtime_t
00074 strtotime(const char *str, isc_int64_t now, isc_int64_t base,
00075           isc_boolean_t *setp);
00076 
00077 dns_rdataclass_t
00078 strtoclass(const char *str);
00079 
00080 isc_result_t
00081 try_dir(const char *dirname);
00082 
00083 void
00084 check_keyversion(dst_key_t *key, char *keystr);
00085 
00086 void
00087 set_keyversion(dst_key_t *key);
00088 
00089 isc_boolean_t
00090 key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
00091               isc_mem_t *mctx, isc_boolean_t *exact);
00092 
00093 isc_boolean_t
00094 is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
00095                       dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp);
00096 
00097 void
00098 verifyzone(dns_db_t *db, dns_dbversion_t *ver,
00099                    dns_name_t *origin, isc_mem_t *mctx,
00100                    isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
00101 #endif /* DNSSEC_DNSSECTOOL_H */

Generated on Tue Apr 28 17:40:53 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha