summaryrefslogtreecommitdiffstats
path: root/lib/isccfg
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2008-12-09 19:43:46 +0100
committerMartin Nagy <mnagy@redhat.com>2009-02-11 20:40:41 +0100
commitaad64960a5681975b032c1e4fcd133e8f806c9cb (patch)
treee3099ae4b413a16558c8834d2d4b8f7f003f5b8b /lib/isccfg
parentf50ae72ec3417cae55dd4e085991c01af9fdc5f1 (diff)
downloadbind_dynamic-aad64960a5681975b032c1e4fcd133e8f806c9cb.tar.gz
bind_dynamic-aad64960a5681975b032c1e4fcd133e8f806c9cb.tar.xz
bind_dynamic-aad64960a5681975b032c1e4fcd133e8f806c9cb.zip
Add support for runtime loading of database backends.
Diffstat (limited to 'lib/isccfg')
-rw-r--r--lib/isccfg/namedconf.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
index 0610489..a1dba32 100644
--- a/lib/isccfg/namedconf.c
+++ b/lib/isccfg/namedconf.c
@@ -78,6 +78,7 @@ static cfg_type_t cfg_type_controls;
static cfg_type_t cfg_type_controls_sockaddr;
static cfg_type_t cfg_type_destinationlist;
static cfg_type_t cfg_type_dialuptype;
+static cfg_type_t cfg_type_dynamic_db;
static cfg_type_t cfg_type_ixfrdifftype;
static cfg_type_t cfg_type_key;
static cfg_type_t cfg_type_logfile;
@@ -651,6 +652,7 @@ namedconf_or_view_clauses[] = {
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
/* only 1 DLZ per view allowed */
{ "dlz", &cfg_type_dynamically_loadable_zones, 0 },
+ { "dynamic-db", &cfg_type_dynamic_db, CFG_CLAUSEFLAG_MULTI },
{ "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
{ "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
@@ -1365,6 +1367,40 @@ static cfg_type_t cfg_type_dialuptype = {
&cfg_rep_string, dialup_enums
};
+/*
+ * Dynamic database clauses.
+ */
+
+static cfg_clausedef_t
+dynamic_db_clauses[] = {
+ { "library", &cfg_type_qstring, 0 },
+ { "arg", &cfg_type_qstring, CFG_CLAUSEFLAG_MULTI },
+ { NULL, NULL, 0 }
+};
+
+static cfg_clausedef_t *
+dynamic_db_clausesets[] = {
+ dynamic_db_clauses,
+ NULL
+};
+
+static cfg_type_t cfg_type_dynamic_db_opts = {
+ "dynamically_loadable_zones_opts", cfg_parse_map,
+ cfg_print_map, cfg_doc_map, &cfg_rep_map,
+ dynamic_db_clausesets
+};
+
+static cfg_tuplefielddef_t dynamic_db_fields[] = {
+ { "name", &cfg_type_astring, 0 },
+ { "options", &cfg_type_dynamic_db_opts, 0 },
+ { NULL, NULL, 0 }
+};
+
+static cfg_type_t cfg_type_dynamic_db = {
+ "dynamic_db", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
+ &cfg_rep_tuple, dynamic_db_fields
+};
+
static const char *notify_enums[] = { "explicit", "master-only", NULL };
static isc_result_t
parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {