masterdump.c File Reference

#include <config.h>
#include <stdlib.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/time.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/events.h>
#include <dns/fixedname.h>
#include <dns/lib.h>
#include <dns/log.h>
#include <dns/master.h>
#include <dns/masterdump.h>
#include <dns/ncache.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/time.h>
#include <dns/ttl.h>

Go to the source code of this file.

Data Structures

struct  dns_master_style
struct  dns_totext_ctx
 Context structure for a masterfile dump in progress. More...
struct  dns_dumpctx

Defines

#define DNS_DCTX_MAGIC   ISC_MAGIC('D', 'c', 't', 'x')
#define DNS_DCTX_VALID(d)   ISC_MAGIC_VALID(d, DNS_DCTX_MAGIC)
#define RETERR(x)
#define CHECK(x)
#define DNS_TOTEXT_LINEBREAK_MAXLEN   100
 The maximum length of the newline+indentation that is output when inserting a line break in an RR. This effectively puts an upper limits on the value of "rdata_column", because if it is very large, the tabs and spaces needed to reach it will not fit.
#define N_SPACES   10
#define N_TABS   10
#define NXDOMAIN(x)   (((x)->attributes & DNS_RDATASETATTR_NXDOMAIN) != 0)
#define INDENT_TO(col)
#define KEYDATA   "KEYDATA"
#define MAXSORT   64

Typedefs

typedef struct dns_totext_ctx dns_totext_ctx_t

Functions

static isc_result_t indent (unsigned int *current, unsigned int to, int tabwidth, isc_buffer_t *target)
 Output tabs and spaces to go from column '*current' to column 'to', and update '*current' to reflect the new current column.
static isc_result_t totext_ctx_init (const dns_master_style_t *style, dns_totext_ctx_t *ctx)
static isc_result_t str_totext (const char *source, isc_buffer_t *target)
static isc_result_t ncache_summary (dns_rdataset_t *rdataset, isc_boolean_t omit_final_dot, isc_buffer_t *target)
static isc_result_t rdataset_totext (dns_rdataset_t *rdataset, dns_name_t *owner_name, dns_totext_ctx_t *ctx, isc_boolean_t omit_final_dot, isc_buffer_t *target)
static isc_result_t question_totext (dns_rdataset_t *rdataset, dns_name_t *owner_name, dns_totext_ctx_t *ctx, isc_boolean_t omit_final_dot, isc_buffer_t *target)
isc_result_t dns_rdataset_totext (dns_rdataset_t *rdataset, dns_name_t *owner_name, isc_boolean_t omit_final_dot, isc_boolean_t question, isc_buffer_t *target)
 Convert 'rdataset' to text format, storing the result in 'target'.
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'.
isc_result_t dns_master_questiontotext (dns_name_t *owner_name, dns_rdataset_t *rdataset, const dns_master_style_t *style, isc_buffer_t *target)
static isc_result_t dump_rdataset (isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset, dns_totext_ctx_t *ctx, isc_buffer_t *buffer, FILE *f)
static int dump_order (const dns_rdataset_t *rds)
static int dump_order_compare (const void *a, const void *b)
static isc_result_t dump_rdatasets_text (isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx, isc_buffer_t *buffer, FILE *f)
static isc_result_t dump_rdataset_raw (isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset, isc_buffer_t *buffer, FILE *f)
static isc_result_t dump_rdatasets_raw (isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx, isc_buffer_t *buffer, FILE *f)
static isc_result_t dump_rdatasets_map (isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx, isc_buffer_t *buffer, FILE *f)
static isc_result_t dumptostreaminc (dns_dumpctx_t *dctx)
static void dumpctx_destroy (dns_dumpctx_t *dctx)
void dns_dumpctx_attach (dns_dumpctx_t *source, dns_dumpctx_t **target)
 Attach to a dump context.
void dns_dumpctx_detach (dns_dumpctx_t **dctxp)
 Detach from a dump context.
dns_dbversion_tdns_dumpctx_version (dns_dumpctx_t *dctx)
 Return the version handle (if any) of the database being dumped.
dns_db_tdns_dumpctx_db (dns_dumpctx_t *dctx)
 Return the database being dumped.
void dns_dumpctx_cancel (dns_dumpctx_t *dctx)
 Cancel a in progress dump.
static isc_result_t flushandsync (FILE *f, isc_result_t result, const char *temp)
static isc_result_t closeandrename (FILE *f, isc_result_t result, const char *temp, const char *file)
static void dump_quantum (isc_task_t *task, isc_event_t *event)
static isc_result_t task_send (dns_dumpctx_t *dctx)
static isc_result_t dumpctx_create (isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, const dns_master_style_t *style, FILE *f, dns_dumpctx_t **dctxp, dns_masterformat_t format, dns_masterrawheader_t *header)
static isc_result_t writeheader (dns_dumpctx_t *dctx)
isc_result_t dns_master_dumptostreaminc (isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, const dns_master_style_t *style, FILE *f, isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg, dns_dumpctx_t **dctxp)
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)
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)
isc_result_t dns_master_dumptostream3 (isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, const dns_master_style_t *style, dns_masterformat_t format, dns_masterrawheader_t *header, 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).
static isc_result_t opentmp (isc_mem_t *mctx, dns_masterformat_t format, const char *file, char **tempp, FILE **fp)
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, isc_task_t *task, dns_dumpdonefunc_t done, void *done_arg, 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_dumpinc3 (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, dns_masterrawheader_t *header)
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)
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)
isc_result_t dns_master_dump3 (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, dns_masterrawheader_t *header)
 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).
isc_result_t dns_master_dumpnodetostream (isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, dns_name_t *name, const dns_master_style_t *style, FILE *f)
isc_result_t dns_master_dumpnode (isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, dns_name_t *name, const dns_master_style_t *style, const char *filename)
isc_result_t dns_master_stylecreate (dns_master_style_t **stylep, unsigned int flags, unsigned int ttl_column, unsigned int class_column, unsigned int type_column, unsigned int rdata_column, unsigned int line_length, unsigned int tab_width, isc_mem_t *mctx)
isc_result_t dns_master_stylecreate2 (dns_master_style_t **stylep, unsigned int flags, unsigned int ttl_column, unsigned int class_column, unsigned int type_column, unsigned int rdata_column, unsigned int line_length, unsigned int tab_width, unsigned int split_width, isc_mem_t *mctx)
void dns_master_styledestroy (dns_master_style_t **stylep, isc_mem_t *mctx)

Variables

LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_keyzone
 The style used for dumping "key" zones.
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_default
 The default master file style.
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_full
 A master file style that dumps zones to a very generic format easily imported/checked with external tools.
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_explicitttl
 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.
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_cache
 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 const
dns_master_style_t 
dns_master_style_simple
 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 by perl scripts and similar applications.
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_debug
 A style suitable for dns_rdataset_totext().
LIBDNS_EXTERNAL_DATA const
dns_master_style_t 
dns_master_style_comment
 Similar, but with each line commented out.
static char spaces [N_SPACES+1] = " "
static char tabs [N_TABS+1] = "\t\t\t\t\t\t\t\t\t\t"
static const int initial_buffer_length = 1200


Detailed Description

Definition in file masterdump.c.


Define Documentation

#define DNS_DCTX_MAGIC   ISC_MAGIC('D', 'c', 't', 'x')

Definition at line 55 of file masterdump.c.

Referenced by dumpctx_create().

#define DNS_DCTX_VALID (  )     ISC_MAGIC_VALID(d, DNS_DCTX_MAGIC)

Definition at line 56 of file masterdump.c.

Referenced by dns_dumpctx_attach(), dns_dumpctx_cancel(), dns_dumpctx_db(), dns_dumpctx_detach(), dns_dumpctx_version(), and dump_quantum().

#define RETERR (  ) 

Value:

do { \
        isc_result_t _r = (x); \
        if (_r != ISC_R_SUCCESS) \
                return (_r); \
        } while (0)

Definition at line 58 of file masterdump.c.

#define CHECK (  ) 

Value:

do { \
        if ((x) != ISC_R_SUCCESS) \
                goto cleanup; \
        } while (0)

Definition at line 64 of file masterdump.c.

#define DNS_TOTEXT_LINEBREAK_MAXLEN   100

The maximum length of the newline+indentation that is output when inserting a line break in an RR. This effectively puts an upper limits on the value of "rdata_column", because if it is very large, the tabs and spaces needed to reach it will not fit.

Definition at line 86 of file masterdump.c.

#define N_SPACES   10

Definition at line 190 of file masterdump.c.

Referenced by indent().

#define N_TABS   10

Definition at line 193 of file masterdump.c.

Referenced by indent().

#define NXDOMAIN (  )     (((x)->attributes & DNS_RDATASETATTR_NXDOMAIN) != 0)

Definition at line 225 of file masterdump.c.

#define INDENT_TO ( col   ) 

Value:

do { \
                 if ((result = indent(&column, ctx->style.col, \
                                      ctx->style.tab_width, target)) \
                     != ISC_R_SUCCESS) \
                            return (result); \
        } while (0)

Definition at line 360 of file masterdump.c.

Referenced by question_totext(), and rdataset_totext().

#define KEYDATA   "KEYDATA"

Referenced by rdataset_totext().

#define MAXSORT   64

Definition at line 907 of file masterdump.c.

Referenced by dump_rdatasets_text().


Typedef Documentation

typedef struct dns_totext_ctx dns_totext_ctx_t


Function Documentation

static isc_result_t indent ( unsigned int *  current,
unsigned int  to,
int  tabwidth,
isc_buffer_t target 
) [static]

Output tabs and spaces to go from column '*current' to column 'to', and update '*current' to reflect the new current column.

Definition at line 233 of file masterdump.c.

References isc_region::base, INSIST, isc_buffer_add, isc_buffer_availableregion, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_region::length, N_SPACES, N_TABS, r, spaces, and tabs.

Referenced by print_indent(), and totext_ctx_init().

static isc_result_t totext_ctx_init ( const dns_master_style_t style,
dns_totext_ctx_t ctx 
) [static]

Definition at line 293 of file masterdump.c.

References isc_region::base, dns_totext_ctx::class_printed, dns_totext_ctx::current_ttl, dns_totext_ctx::current_ttl_valid, dns_fixedname_init, DNS_R_TEXTTOOLONG, DNS_STYLEFLAG_COMMENTDATA, DNS_STYLEFLAG_MULTILINE, dns_master_style::flags, indent(), isc_buffer_add, isc_buffer_availableregion, isc_buffer_init, ISC_FALSE, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_region::length, dns_totext_ctx::linebreak, dns_totext_ctx::linebreak_buf, dns_totext_ctx::neworigin, dns_totext_ctx::origin, dns_totext_ctx::origin_fixname, r, dns_master_style::rdata_column, REQUIRE, dns_totext_ctx::style, and dns_master_style::tab_width.

Referenced by dns_master_dumpnodetostream(), dns_master_questiontotext(), dns_master_rdatasettotext(), dns_rdataset_totext(), and dumpctx_create().

static isc_result_t str_totext ( const char *  source,
isc_buffer_t target 
) [static]

Definition at line 370 of file masterdump.c.

References isc_region::base, isc_buffer_add, isc_buffer_availableregion, ISC_R_NOSPACE, ISC_R_SUCCESS, and isc_region::length.

static isc_result_t ncache_summary ( dns_rdataset_t rdataset,
isc_boolean_t  omit_final_dot,
isc_buffer_t target 
) [static]

Definition at line 386 of file masterdump.c.

References CHECK, cleanup(), dns_rdataset::covers, dns_name_init(), dns_name_totext(), dns_ncache_current(), DNS_RDATA_INIT, dns_rdata_tofmttext(), dns_rdataset_current(), dns_rdataset_disassociate(), dns_rdataset_first(), dns_rdataset_init(), dns_rdataset_isassociated(), dns_rdataset_next(), dns_rdatatype_totext(), dns_rootname, ISC_R_NOMORE, ISC_R_SUCCESS, name, str_totext(), and dns_rdataset::type.

Referenced by rdataset_totext().

static isc_result_t rdataset_totext ( dns_rdataset_t rdataset,
dns_name_t owner_name,
dns_totext_ctx_t ctx,
isc_boolean_t  omit_final_dot,
isc_buffer_t target 
) [static]

Definition at line 439 of file masterdump.c.

References dns_rdataset::attributes, isc_region::base, dns_totext_ctx::class_printed, dns_rdataset::covers, dns_totext_ctx::current_ttl, dns_totext_ctx::current_ttl_valid, dns_fixedname_init, dns_fixedname_name, dns_name_copy(), dns_name_totext(), DNS_RDATA_INIT, dns_rdata_tofmttext(), dns_rdataclass_totext(), dns_rdataset_current(), dns_rdataset_first(), dns_rdataset_getownercase(), dns_rdataset_next(), DNS_RDATASET_VALID, DNS_RDATASETATTR_LOADORDER, DNS_RDATASETATTR_NEGATIVE, dns_rdatatype_totext(), DNS_STYLEFLAG_COMMENTDATA, DNS_STYLEFLAG_KEYDATA, DNS_STYLEFLAG_NO_CLASS, DNS_STYLEFLAG_NO_TTL, DNS_STYLEFLAG_OMIT_CLASS, DNS_STYLEFLAG_OMIT_OWNER, DNS_STYLEFLAG_OMIT_TTL, DNS_STYLEFLAG_TTL, DNS_STYLEFLAG_TTL_UNITS, dns_ttl_totext2(), fixed, dns_master_style::flags, INDENT_TO, INSIST, isc_buffer_add, isc_buffer_availablelength, isc_buffer_availableregion, isc_buffer_putstr, ISC_FALSE, ISC_R_NOMORE, ISC_R_NOSPACE, ISC_R_SUCCESS, ISC_TRUE, KEYDATA, isc_region::length, dns_master_style::line_length, dns_totext_ctx::linebreak, name, ncache_summary(), NXDOMAIN, dns_totext_ctx::origin, r, dns_master_style::rdata_column, dns_rdataset::rdclass, REQUIRE, RETERR, dns_master_style::split_width, str_totext(), dns_totext_ctx::style, dns_rdataset::ttl, dns_rdataset::type, and isc_buffer::used.

Referenced by dns_master_rdatasettotext(), dns_rdataset_totext(), and dump_rdataset().

static isc_result_t question_totext ( dns_rdataset_t rdataset,
dns_name_t owner_name,
dns_totext_ctx_t ctx,
isc_boolean_t  omit_final_dot,
isc_buffer_t target 
) [static]

Definition at line 648 of file masterdump.c.

References isc_region::base, dns_name_totext(), dns_rdataclass_totext(), dns_rdataset_first(), DNS_RDATASET_VALID, dns_rdatatype_totext(), INDENT_TO, isc_buffer_add, isc_buffer_availableregion, ISC_R_NOMORE, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_region::length, r, dns_rdataset::rdclass, REQUIRE, RETERR, dns_rdataset::type, and isc_buffer::used.

Referenced by dns_master_questiontotext(), and dns_rdataset_totext().

isc_result_t dns_rdataset_totext ( dns_rdataset_t rdataset,
dns_name_t owner_name,
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:

Requires:

Definition at line 705 of file masterdump.c.

References dns_master_style_debug, dns_name_countlabels(), ISC_R_SUCCESS, ISC_R_UNEXPECTED, question_totext(), rdataset_totext(), totext_ctx_init(), and UNEXPECTED_ERROR.

Referenced by add_callback(), dns_diff_print(), log_rr(), printrdata(), and printsection().

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:

Requires:

Definition at line 738 of file masterdump.c.

References ISC_FALSE, ISC_R_SUCCESS, ISC_R_UNEXPECTED, rdataset_totext(), totext_ctx_init(), and UNEXPECTED_ERROR.

Referenced by ATF_TC_BODY(), dns_message_pseudosectiontotext(), dns_message_sectiontotext(), dumpnode(), and modrdataset().

isc_result_t dns_master_questiontotext ( dns_name_t owner_name,
dns_rdataset_t rdataset,
const dns_master_style_t style,
isc_buffer_t target 
)

Definition at line 757 of file masterdump.c.

References ISC_FALSE, ISC_R_SUCCESS, ISC_R_UNEXPECTED, question_totext(), totext_ctx_init(), and UNEXPECTED_ERROR.

Referenced by dns_message_sectiontotext().

static isc_result_t dump_rdataset ( isc_mem_t mctx,
dns_name_t name,
dns_rdataset_t rdataset,
dns_totext_ctx_t ctx,
isc_buffer_t buffer,
FILE *  f 
) [static]

Definition at line 783 of file masterdump.c.

References isc_buffer::base, isc_region::base, dns_totext_ctx::current_ttl, dns_totext_ctx::current_ttl_valid, DNS_STYLEFLAG_COMMENT, DNS_STYLEFLAG_TTL, dns_ttl_totext(), dns_master_style::flags, INSIST, isc_buffer_clear, isc_buffer_init, isc_buffer_usedregion, ISC_FALSE, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_result_totext(), isc_stdio_write(), ISC_TRUE, isc_region::length, isc_buffer::length, r, rdataset_totext(), REQUIRE, dns_totext_ctx::style, dns_rdataset::ttl, and UNEXPECTED_ERROR.

Referenced by dump_rdatasets_text().

static int dump_order ( const dns_rdataset_t rds  )  [static]

Definition at line 867 of file masterdump.c.

References dns_rdataset::covers, and dns_rdataset::type.

Referenced by dump_order_compare().

static int dump_order_compare ( const void *  a,
const void *  b 
) [static]

Definition at line 892 of file masterdump.c.

References dump_order().

Referenced by dump_rdatasets_text().

static isc_result_t dump_rdatasets_text ( isc_mem_t mctx,
dns_name_t name,
dns_rdatasetiter_t rdsiter,
dns_totext_ctx_t ctx,
isc_buffer_t buffer,
FILE *  f 
) [static]

Definition at line 910 of file masterdump.c.

References dns_rdataset::attributes, isc_region::base, dns_name_totext(), dns_rdataset_disassociate(), dns_rdataset_init(), DNS_RDATASETATTR_NEGATIVE, DNS_RDATASETATTR_RESIGN, dns_rdatasetiter_current(), dns_rdatasetiter_first(), dns_rdatasetiter_next(), DNS_STYLEFLAG_NCACHE, DNS_STYLEFLAG_OMIT_OWNER, DNS_STYLEFLAG_RESIGN, DNS_STYLEFLAG_TRUST, dns_time64_totext(), dns_trust_totext(), dump_order_compare(), dump_rdataset(), dns_master_style::flags, INSIST, isc_buffer_clear, isc_buffer_init, isc_buffer_usedregion, ISC_FALSE, ISC_R_NOMORE, ISC_R_SUCCESS, isc_region::length, MAXSORT, dns_totext_ctx::neworigin, r, dns_rdataset::resign, RUNTIME_CHECK, dns_totext_ctx::style, and dns_rdataset::trust.

Referenced by dns_master_dumpnodetostream(), and dumpctx_create().

static isc_result_t dump_rdataset_raw ( isc_mem_t mctx,
dns_name_t name,
dns_rdataset_t rdataset,
isc_buffer_t buffer,
FILE *  f 
) [static]

Definition at line 993 of file masterdump.c.

References dns_rdataset::attributes, isc_buffer::base, dns_rdataset::covers, dns_name_toregion(), DNS_RDATA_INIT, dns_rdata_toregion(), dns_rdataset_count(), dns_rdataset_current(), dns_rdataset_first(), dns_rdataset_next(), DNS_RDATASET_VALID, DNS_RDATASETATTR_LOADORDER, INSIST, isc_buffer_availablelength, isc_buffer_availableregion, isc_buffer_clear, isc_buffer_copyregion(), isc_buffer_init, isc_buffer_putuint16, isc_buffer_putuint32, isc_buffer_usedlength, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_region::length, isc_buffer::length, r, dns_rdataset::rdclass, REQUIRE, dns_rdataset::ttl, and dns_rdataset::type.

Referenced by dump_rdatasets_raw().

static isc_result_t dump_rdatasets_raw ( isc_mem_t mctx,
dns_name_t name,
dns_rdatasetiter_t rdsiter,
dns_totext_ctx_t ctx,
isc_buffer_t buffer,
FILE *  f 
) [static]

Definition at line 1100 of file masterdump.c.

References dns_rdataset::attributes, dns_rdataset_disassociate(), dns_rdataset_init(), DNS_RDATASETATTR_NEGATIVE, dns_rdatasetiter_current(), dns_rdatasetiter_first(), dns_rdatasetiter_next(), DNS_STYLEFLAG_NCACHE, dump_rdataset_raw(), dns_master_style::flags, ISC_R_NOMORE, ISC_R_SUCCESS, and dns_totext_ctx::style.

Referenced by dumpctx_create().

static isc_result_t dump_rdatasets_map ( isc_mem_t mctx,
dns_name_t name,
dns_rdatasetiter_t rdsiter,
dns_totext_ctx_t ctx,
isc_buffer_t buffer,
FILE *  f 
) [static]

Definition at line 1133 of file masterdump.c.

References ISC_R_NOTIMPLEMENTED, and UNUSED.

Referenced by dumpctx_create().

static isc_result_t dumptostreaminc ( dns_dumpctx_t dctx  )  [static]

Definition at line 1528 of file masterdump.c.

References isc_buffer::base, buffer, CHECK, cleanup(), dns_dumpctx::db, dns_dumpctx::dbiter, dns_db_allrdatasets(), dns_db_detachnode(), dns_db_serialize(), dns_dbiterator_current(), dns_dbiterator_first(), dns_dbiterator_next(), dns_dbiterator_origin(), dns_dbiterator_pause(), dns_fixedname_init, dns_fixedname_name, dns_lctx, DNS_LOGMODULE_MASTERDUMP, dns_masterformat_map, dns_pps, DNS_R_CONTINUE, DNS_R_NEWORIGIN, dns_rdatasetiter_destroy(), DNS_STYLEFLAG_REL_DATA, dns_dumpctx::dumpsets, dns_dumpctx::f, dns_dumpctx::first, dns_master_style::flags, dns_dumpctx::format, isc_buffer_init, ISC_FALSE, ISC_LOG_DEBUG, isc_log_write(), ISC_LOGCATEGORY_GENERAL, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_NOMORE, ISC_R_SUCCESS, isc_time_microdiff(), isc_time_now(), isc_buffer::length, dns_dumpctx::mctx, name, dns_totext_ctx::neworigin, dns_dumpctx::nodes, dns_dumpctx::now, dns_totext_ctx::origin, origin, dns_totext_ctx::origin_fixname, RUNTIME_CHECK, start, dns_totext_ctx::style, dns_dumpctx::tctx, dns_dumpctx::version, and writeheader().

Referenced by dns_master_dump3(), dns_master_dumptostream3(), and dump_quantum().

static void dumpctx_destroy ( dns_dumpctx_t dctx  )  [static]

Definition at line 1163 of file masterdump.c.

References dns_dumpctx::db, dns_dumpctx::dbiter, DESTROYLOCK, dns_db_closeversion(), dns_db_detach(), dns_dbiterator_destroy(), dns_dumpctx::file, ISC_FALSE, isc_mem_free, isc_mem_putanddetach, isc_task_detach(), dns_dumpctx::lock, dns_dumpctx::magic, dns_dumpctx::mctx, dns_dumpctx::task, dns_dumpctx::tmpfile, and dns_dumpctx::version.

Referenced by dns_dumpctx_detach().

void dns_dumpctx_attach ( dns_dumpctx_t source,
dns_dumpctx_t **  target 
)

Attach to a dump context.

Require:

Definition at line 1181 of file masterdump.c.

References DNS_DCTX_VALID, INSIST, dns_dumpctx::lock, LOCK, dns_dumpctx::references, REQUIRE, and UNLOCK.

Referenced by dns_master_dumpinc3(), and dns_master_dumptostreaminc().

void dns_dumpctx_detach ( dns_dumpctx_t **  dctxp  ) 

Detach from a dump context.

Require:

Ensures:

Definition at line 1196 of file masterdump.c.

References DNS_DCTX_VALID, dumpctx_destroy(), INSIST, ISC_FALSE, ISC_TRUE, dns_dumpctx::lock, LOCK, dns_dumpctx::references, REQUIRE, and UNLOCK.

Referenced by dns_master_dump3(), dns_master_dumpinc3(), dns_master_dumptostream3(), dns_master_dumptostreaminc(), dump_done(), dump_quantum(), dumpcontext_destroy(), and dumpdone().

dns_dbversion_t* dns_dumpctx_version ( dns_dumpctx_t dctx  ) 

Return the version handle (if any) of the database being dumped.

Require:

Definition at line 1217 of file masterdump.c.

References DNS_DCTX_VALID, REQUIRE, and dns_dumpctx::version.

Referenced by dump_done().

dns_db_t* dns_dumpctx_db ( dns_dumpctx_t dctx  ) 

Return the database being dumped.

Require:

Definition at line 1223 of file masterdump.c.

References dns_dumpctx::db, DNS_DCTX_VALID, and REQUIRE.

Referenced by dump_done().

void dns_dumpctx_cancel ( dns_dumpctx_t dctx  ) 

Cancel a in progress dump.

Require:

Definition at line 1229 of file masterdump.c.

References dns_dumpctx::canceled, DNS_DCTX_VALID, ISC_TRUE, dns_dumpctx::lock, LOCK, REQUIRE, and UNLOCK.

Referenced by zone_shutdown(), and zone_unload().

static isc_result_t flushandsync ( FILE *  f,
isc_result_t  result,
const char *  temp 
) [static]

Definition at line 1238 of file masterdump.c.

References dns_lctx, DNS_LOGMODULE_MASTERDUMP, ISC_FALSE, ISC_LOG_ERROR, isc_log_write(), ISC_LOGCATEGORY_GENERAL, ISC_R_SUCCESS, isc_result_totext(), isc_stdio_flush(), isc_stdio_sync(), and ISC_TF.

Referenced by closeandrename(), dns_master_dumptostream3(), and dump_quantum().

static isc_result_t closeandrename ( FILE *  f,
isc_result_t  result,
const char *  temp,
const char *  file 
) [static]

Definition at line 1275 of file masterdump.c.

References dns_lctx, DNS_LOGMODULE_MASTERDUMP, flushandsync(), ISC_FALSE, isc_file_remove(), isc_file_rename(), ISC_LOG_ERROR, isc_log_write(), ISC_LOGCATEGORY_GENERAL, ISC_R_SUCCESS, isc_result_totext(), isc_stdio_close(), and ISC_TF.

Referenced by dns_master_dump3(), and dump_quantum().

static void dump_quantum ( isc_task_t task,
isc_event_t event 
) [static]

Definition at line 1308 of file masterdump.c.

References dns_dumpctx::canceled, closeandrename(), DNS_DCTX_VALID, dns_dumpctx_detach(), DNS_R_CONTINUE, dns_dumpctx::done, dns_dumpctx::done_arg, dumptostreaminc(), dns_dumpctx::f, dns_dumpctx::file, flushandsync(), isc_event_free(), ISC_R_CANCELED, ISC_R_SUCCESS, isc_task_send(), REQUIRE, and dns_dumpctx::tmpfile.

Referenced by task_send().

static isc_result_t task_send ( dns_dumpctx_t dctx  )  [static]

Definition at line 1339 of file masterdump.c.

References DNS_EVENT_DUMPQUANTUM, dump_quantum(), isc_event_allocate(), ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_task_send(), dns_dumpctx::mctx, and dns_dumpctx::task.

static isc_result_t dumpctx_create ( isc_mem_t mctx,
dns_db_t db,
dns_dbversion_t version,
const dns_master_style_t style,
FILE *  f,
dns_dumpctx_t **  dctxp,
dns_masterformat_t  format,
dns_masterrawheader_t header 
) [static]

Definition at line 1351 of file masterdump.c.

References dns_dumpctx::canceled, cleanup(), dns_dumpctx::db, dns_dumpctx::dbiter, dns_db_attach(), dns_db_attachversion(), dns_db_createiterator(), dns_db_currentversion(), dns_db_detach(), dns_db_iscache(), DNS_DB_RELATIVENAMES, dns_dbiterator_destroy(), DNS_DCTX_MAGIC, dns_master_initrawheader(), dns_masterformat_map, dns_masterformat_raw, dns_masterformat_text, DNS_STYLEFLAG_REL_OWNER, dns_dumpctx::do_date, dns_dumpctx::done, dns_dumpctx::done_arg, dump_rdatasets_map(), dump_rdatasets_raw(), dump_rdatasets_text(), dns_dumpctx::dumpsets, dns_dumpctx::f, dns_dumpctx::file, dns_dumpctx::first, dns_master_style::flags, dns_dumpctx::format, dns_dumpctx::header, INSIST, ISC_FALSE, isc_mem_attach(), isc_mem_get, isc_mem_put, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_stdtime_get(), ISC_TRUE, dns_dumpctx::lock, dns_dumpctx::magic, dns_dumpctx::mctx, dns_dumpctx::nodes, dns_dumpctx::now, dns_dumpctx::references, dns_totext_ctx::style, dns_dumpctx::task, dns_dumpctx::tctx, dns_dumpctx::tmpfile, totext_ctx_init(), UNEXPECTED_ERROR, and dns_dumpctx::version.

Referenced by dns_master_dump3(), dns_master_dumpinc3(), dns_master_dumptostream3(), and dns_master_dumptostreaminc().

static isc_result_t writeheader ( dns_dumpctx_t dctx  )  [static]

Definition at line 1442 of file masterdump.c.

References isc_buffer::base, isc_region::base, buffer, dns_lctx, DNS_LOGMODULE_MASTERDUMP, dns_masterformat_map, dns_masterformat_raw, dns_masterformat_text, DNS_MASTERRAW_COMPAT, dns_time32_totext(), dns_dumpctx::do_date, dns_dumpctx::f, dns_masterrawheader::flags, dns_dumpctx::format, dns_dumpctx::header, INSIST, isc_buffer_init, isc_buffer_putuint32, isc_buffer_region, isc_buffer_usedlength, isc_buffer_usedregion, ISC_LOG_INFO, isc_log_write(), ISC_LOGCATEGORY_GENERAL, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_stdio_write(), dns_masterrawheader::lastxfrin, isc_buffer::length, isc_region::length, dns_dumpctx::mctx, dns_dumpctx::now, r, rawversion, RUNTIME_CHECK, and dns_masterrawheader::sourceserial.

Referenced by dumptostreaminc().

isc_result_t dns_master_dumptostreaminc ( isc_mem_t mctx,
dns_db_t db,
dns_dbversion_t version,
const dns_master_style_t style,
FILE *  f,
isc_task_t task,
dns_dumpdonefunc_t  done,
void *  done_arg,
dns_dumpctx_t **  dctxp 
)

Definition at line 1655 of file masterdump.c.

References dns_dumpctx_attach(), dns_dumpctx_detach(), dns_masterformat_text, DNS_R_CONTINUE, dns_dumpctx::done, dns_dumpctx::done_arg, dumpctx_create(), ISC_R_SUCCESS, isc_task_attach(), dns_dumpctx::nodes, REQUIRE, dns_dumpctx::task, and task_send().

Referenced by dumpdone().

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 
)

Definition at line 1692 of file masterdump.c.

References dns_master_dumptostream3(), and dns_masterformat_text.

Referenced by dns_view_dumpdbtostream().

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 
)

Definition at line 1702 of file masterdump.c.

References dns_master_dumptostream3().

isc_result_t dns_master_dumptostream3 ( isc_mem_t mctx,
dns_db_t db,
dns_dbversion_t version,
const dns_master_style_t style,
dns_masterformat_t  format,
dns_masterrawheader_t header,
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_dumptostream3(), which always specifies the dns_masterformat_text format. dns_master_dumptostream2() is an old form which always specifies a NULL header.

If 'format' is dns_masterformat_raw, then 'header' can contain information to be written to the file header.

Temporary dynamic memory may be allocated from 'mctx'.

Require:

Returns:

Definition at line 1712 of file masterdump.c.

References dns_dumpctx_detach(), DNS_R_CONTINUE, dumpctx_create(), dumptostreaminc(), flushandsync(), INSIST, and ISC_R_SUCCESS.

Referenced by dns_master_dumptostream(), dns_master_dumptostream2(), dumptostream(), and main().

static isc_result_t opentmp ( isc_mem_t mctx,
dns_masterformat_t  format,
const char *  file,
char **  tempp,
FILE **  fp 
) [static]

Definition at line 1735 of file masterdump.c.

References cleanup(), dns_lctx, DNS_LOGMODULE_MASTERDUMP, dns_masterformat_text, isc_file_bopenunique(), isc_file_mktemplate(), isc_file_openunique(), ISC_LOG_ERROR, isc_log_write(), ISC_LOGCATEGORY_GENERAL, isc_mem_allocate, isc_mem_free, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_result_totext(), and tempname.

Referenced by dns_master_dump3(), and dns_master_dumpinc3().

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,
isc_task_t task,
dns_dumpdonefunc_t  done,
void *  done_arg,
dns_dumpctx_t **  dctxp 
)

Definition at line 1772 of file masterdump.c.

References dns_master_dumpinc3(), and dns_masterformat_text.

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 
)

Definition at line 1783 of file masterdump.c.

References dns_master_dumpinc3().

isc_result_t dns_master_dumpinc3 ( 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,
dns_masterrawheader_t header 
)

Definition at line 1793 of file masterdump.c.

References cleanup(), dns_dumpctx_attach(), dns_dumpctx_detach(), DNS_R_CONTINUE, dns_dumpctx::done, dns_dumpctx::done_arg, dumpctx_create(), dns_dumpctx::file, isc_file_remove(), isc_mem_free, isc_mem_strdup, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_stdio_close(), isc_task_attach(), dns_dumpctx::nodes, opentmp(), dns_dumpctx::task, task_send(), tempname, and dns_dumpctx::tmpfile.

Referenced by dns_master_dumpinc(), dns_master_dumpinc2(), and zone_gotwritehandle().

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 
)

Definition at line 1847 of file masterdump.c.

References dns_master_dump3(), and dns_masterformat_text.

Referenced by dns_cache_dump(), and writeset().

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 
)

Definition at line 1855 of file masterdump.c.

References dns_master_dump3().

Referenced by ATF_TC_BODY(), and dump().

isc_result_t dns_master_dump3 ( 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,
dns_masterrawheader_t header 
)

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 _dumpinc3() and _dump3(), respectively, which always specify the dns_masterformat_text format. dns_master_dumpinc2() and dns_master_dump2() are old forms which always specify a NULL header.

If 'format' is dns_masterformat_raw, then 'header' can contain information to be written to the file header.

Temporary dynamic memory may be allocated from 'mctx'.

Returns:

Definition at line 1864 of file masterdump.c.

References cleanup(), closeandrename(), dns_dumpctx_detach(), DNS_R_CONTINUE, dumpctx_create(), dumptostreaminc(), INSIST, isc_mem_free, ISC_R_SUCCESS, opentmp(), and tempname.

Referenced by ATF_TC_BODY(), dns_master_dump(), dns_master_dump2(), and zone_dump().

isc_result_t dns_master_dumpnodetostream ( isc_mem_t mctx,
dns_db_t db,
dns_dbversion_t version,
dns_dbnode_t node,
dns_name_t name,
const dns_master_style_t style,
FILE *  f 
)

Definition at line 1898 of file masterdump.c.

References isc_buffer::base, buffer, dns_db_allrdatasets(), dns_rdatasetiter_destroy(), dump_rdatasets_text(), isc_buffer_init, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_R_UNEXPECTED, isc_stdtime_get(), isc_buffer::length, now, totext_ctx_init(), and UNEXPECTED_ERROR.

Referenced by dns_master_dumpnode(), and dumpnode().

isc_result_t dns_master_dumpnode ( isc_mem_t mctx,
dns_db_t db,
dns_dbversion_t version,
dns_dbnode_t node,
dns_name_t name,
const dns_master_style_t style,
const char *  filename 
)

Definition at line 1942 of file masterdump.c.

References dns_lctx, DNS_LOGMODULE_MASTERDUMP, dns_master_dumpnodetostream(), ISC_LOG_ERROR, isc_log_write(), ISC_LOGCATEGORY_GENERAL, ISC_R_SUCCESS, ISC_R_UNEXPECTED, isc_result_totext(), isc_stdio_close(), and isc_stdio_open().

isc_result_t dns_master_stylecreate ( dns_master_style_t **  stylep,
unsigned int  flags,
unsigned int  ttl_column,
unsigned int  class_column,
unsigned int  type_column,
unsigned int  rdata_column,
unsigned int  line_length,
unsigned int  tab_width,
isc_mem_t mctx 
)

Definition at line 1982 of file masterdump.c.

References dns_master_stylecreate2().

Referenced by main(), and modrdataset().

isc_result_t dns_master_stylecreate2 ( dns_master_style_t **  stylep,
unsigned int  flags,
unsigned int  ttl_column,
unsigned int  class_column,
unsigned int  type_column,
unsigned int  rdata_column,
unsigned int  line_length,
unsigned int  tab_width,
unsigned int  split_width,
isc_mem_t mctx 
)

Definition at line 1995 of file masterdump.c.

References dns_master_style::class_column, dns_master_style::flags, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, dns_master_style::line_length, dns_master_style::rdata_column, REQUIRE, dns_master_style::split_width, style, dns_master_style::tab_width, dns_master_style::ttl_column, and dns_master_style::type_column.

Referenced by dns_master_stylecreate(), and printmessage().

void dns_master_styledestroy ( dns_master_style_t **  stylep,
isc_mem_t mctx 
)

Definition at line 2022 of file masterdump.c.

References isc_mem_put, REQUIRE, and style.

Referenced by main(), modrdataset(), and printmessage().


Variable Documentation

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_keyzone

Initial value:

The style used for dumping "key" zones.

Definition at line 104 of file masterdump.c.

Referenced by zone_dump(), and zone_gotwritehandle().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_default

Initial value:

The default master file style.

This uses $TTL directives to avoid the need to dedicate a tab stop for the TTL. The class is only printed for the first rrset in the file and shares a tab stop with the RR type.

Definition at line 119 of file masterdump.c.

Referenced by ATF_TC_BODY(), dns_zone_dumptostream(), dns_zone_setfile(), dns_zone_setfile2(), dump(), main(), ns_zone_configure(), zone_dump(), and zone_gotwritehandle().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_full

Initial value:

 {
        DNS_STYLEFLAG_COMMENT |
        DNS_STYLEFLAG_RESIGN,
        46, 46, 46, 64, 120, 8, UINT_MAX
}
A master file style that dumps zones to a very generic format easily imported/checked with external tools.

Definition at line 133 of file masterdump.c.

Referenced by dns_zone_fulldumptostream(), dumpdone(), main(), and ns_zone_configure().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_explicitttl

Initial value:

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.

Definition at line 140 of file masterdump.c.

Referenced by main().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_cache

Initial value:

A master style format designed for cache files. It prints explicit TTL values on each record line and never uses $ORIGIN or relative names.

Definition at line 152 of file masterdump.c.

Referenced by dns_cache_dump(), dns_view_dumpdbtostream(), and dumpdone().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_simple

Initial value:

 {
        0,
        24, 32, 32, 40, 80, 8, UINT_MAX
}
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 by perl scripts and similar applications.

Definition at line 163 of file masterdump.c.

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_debug

Initial value:

 {
        DNS_STYLEFLAG_REL_OWNER,
        24, 32, 40, 48, 80, 8, UINT_MAX
}
A style suitable for dns_rdataset_totext().

The style used for debugging, "dig" output, etc.

Definition at line 172 of file masterdump.c.

Referenced by _dns_tkey_dumpmessage(), ATF_TC_BODY(), dns_message_logpacket(), dns_message_logpacket2(), dns_rdataset_totext(), main(), and ns_client_dumpmessage().

LIBDNS_EXTERNAL_DATA const dns_master_style_t dns_master_style_comment

Initial value:

Similar, but with each line commented out.

Similar to dns_master_style_debug but data is prepended with ";".

Definition at line 181 of file masterdump.c.

Referenced by resquery_response(), and resquery_send().

char spaces[N_SPACES+1] = " " [static]

Definition at line 191 of file masterdump.c.

Referenced by indent(), isccc_alist_prettyprint(), and validator_logv().

char tabs[N_TABS+1] = "\t\t\t\t\t\t\t\t\t\t" [static]

Definition at line 194 of file masterdump.c.

Referenced by indent().

const int initial_buffer_length = 1200 [static]

Definition at line 1157 of file masterdump.c.


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