Lines Matching defs:cd
119 b9_add_helper(struct config_data *cd, const char *helper_name, void *ptr);
126 config_data_t *cd = (config_data_t *) dbdata;
132 DE_CONST(zone, cd->zone);
135 cd->log(ISC_LOG_DEBUG(1),
140 nrec = DLZ_LIST_HEAD(cd->rrs_list);
142 cd->record = nrec->name;
151 cd->log(ISC_LOG_DEBUG(2),
156 result = cd->putnamedrr(allnodes, nrec->name, nrec->type,
165 cd->zone = NULL;
175 config_data_t *cd = (config_data_t *) dbdata;
180 cd->log(ISC_LOG_DEBUG(1),
183 if (fnmatch(cd->axfr_pattern, client, FNM_CASEFOLD) == 0)
199 config_data_t *cd = (config_data_t *) dbdata;
207 p = shortest_match(cd->zone_pattern, name);
212 cd->log(ISC_LOG_DEBUG(1),
231 config_data_t *cd = (config_data_t *) dbdata;
243 p = shortest_match(cd->zone_pattern, zone);
247 DE_CONST(name, cd->record);
248 DE_CONST(p, cd->zone);
258 cd->record = namebuf;
261 cd->record = "@";
264 cd->log(ISC_LOG_DEBUG(1),
267 name, zone, cd->record, cd->zone);
270 nrec = DLZ_LIST_HEAD(cd->rrs_list);
273 if (strcmp(cd->record, nrec->name) == 0) {
288 result = cd->putrr(lookup, nrec->type,
302 cd->zone = NULL;
303 cd->record = NULL;
314 config_data_t *cd = (config_data_t *) dbdata;
319 p = shortest_match(cd->zone_pattern, zone);
323 DE_CONST(p, cd->zone);
326 cd->log(ISC_LOG_DEBUG(1),
330 nrec = DLZ_LIST_HEAD(cd->rrs_list);
342 presult = cd->putrr(lookup, nrec->type,
358 cd->zone = NULL;
367 destroy_rrlist(config_data_t *cd) {
370 nrec = DLZ_LIST_HEAD(cd->rrs_list);
394 config_data_t *cd;
405 cd = calloc(1, sizeof(config_data_t));
406 if (cd == NULL)
408 memset(cd, 0, sizeof(config_data_t));
413 b9_add_helper(cd, helper_name, va_arg(ap, void*));
419 cd->log(ISC_LOG_INFO,
425 DLZ_LIST_INIT(cd->rrs_list);
427 cd->zone_pattern = strdup(argv[1]);
428 cd->axfr_pattern = strdup(argv[2]);
429 if (cd->zone_pattern == NULL || cd->axfr_pattern == NULL) {
437 cd->log(ISC_LOG_ERROR, "default TTL invalid, using 3600");
452 DLZ_LIST_APPEND(cd->rrs_list, trec, link);
466 result = build_querylist(argv[i + 3], &cd->zone,
467 &cd->record, &cd->client,
468 &trec->data, 0, cd->log);
471 cd->log(ISC_LOG_ERROR,
478 *dbdata = cd;
483 destroy_rrlist(cd);
486 if (cd->zone_pattern != NULL)
487 free(cd->zone_pattern);
488 if (cd->axfr_pattern != NULL)
489 free(cd->axfr_pattern);
490 free(cd);
497 config_data_t *cd = (config_data_t *) dbdata;
502 cd->log(ISC_LOG_DEBUG(2), "Unloading DLZ_wildcard driver.");
504 destroy_rrlist(cd);
506 free(cd->zone_pattern);
507 free(cd->axfr_pattern);
508 free(cd);
526 b9_add_helper(struct config_data *cd, const char *helper_name, void *ptr) {
528 cd->log = (log_t *)ptr;
530 cd->putrr = (dns_sdlz_putrr_t *)ptr;
532 cd->putnamedrr = (dns_sdlz_putnamedrr_t *)ptr;
534 cd->writeable_zone = (dns_dlz_writeablezone_t *)ptr;