00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #include <config.h>
00022 
00023 #include <isccfg/cfg.h>
00024 #include <isccfg/grammar.h>
00025 
00026 
00027 
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 
00050 
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 
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 };