dnsconf.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
00003  *
00004  * Permission to use, copy, modify, and/or distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00009  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00010  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00011  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00012  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00013  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00014  * PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 
00017 /* $Id: dnsconf.c,v 1.4 2009/09/02 23:48:03 tbox Exp $ */
00018 
00019 /*! \file */
00020 
00021 #include <config.h>
00022 
00023 #include <isccfg/cfg.h>
00024 #include <isccfg/grammar.h>
00025 
00026 /*%
00027  * A trusted key, as used in the "trusted-keys" statement.
00028  */
00029 static cfg_tuplefielddef_t trustedkey_fields[] = {
00030         { "name", &cfg_type_astring, 0 },
00031         { "flags", &cfg_type_uint32, 0 },
00032         { "protocol", &cfg_type_uint32, 0 },
00033         { "algorithm", &cfg_type_uint32, 0 },
00034         { "key", &cfg_type_qstring, 0 },
00035         { NULL, NULL, 0 }
00036 };
00037 
00038 static cfg_type_t cfg_type_trustedkey = {
00039         "trustedkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
00040         &cfg_rep_tuple, trustedkey_fields
00041 };
00042 
00043 static cfg_type_t cfg_type_trustedkeys = {
00044         "trusted-keys", cfg_parse_bracketed_list, cfg_print_bracketed_list,
00045         cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_trustedkey
00046 };
00047 
00048 /*%
00049  * Clauses that can be found within the top level of the dns.conf
00050  * file only.
00051  */
00052 static cfg_clausedef_t
00053 dnsconf_clauses[] = {
00054         { "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI },
00055         { NULL, NULL, 0 }
00056 };
00057 
00058 /*% The top-level dns.conf syntax. */
00059 
00060 static cfg_clausedef_t *
00061 dnsconf_clausesets[] = {
00062         dnsconf_clauses,
00063         NULL
00064 };
00065 
00066 LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_dnsconf = {
00067         "dnsconf", cfg_parse_mapbody, cfg_print_mapbody, cfg_doc_mapbody,
00068         &cfg_rep_map, dnsconf_clausesets
00069 };

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