Lines Matching defs:zone
13 #include <dns/zone.h>
19 #include "zone.h"
24 * Create a new zone with origin 'name'. The zone stay invisible to clients
62 log_error_r("failed to create new zone '%s'", zone_name);
76 * Add zone to the view defined in inst->view. This will make the zone visible
80 publish_zone(sample_instance_t *inst, dns_zone_t *zone) {
88 REQUIRE(zone != NULL);
90 /* Return success if the zone is already in the view as expected. */
91 result = dns_view_findzone(inst->view, dns_zone_getorigin(zone),
96 view_in_zone = dns_zone_getview(zone);
98 /* Zone has a view set -> view should contain the same zone. */
99 if (zone_in_view == zone) {
104 * Un-published inactive zone will have
105 * inst->view in zone but will not be present
108 dns_zone_log(zone, ISC_LOG_ERROR,
109 "zone->view doesn't "
116 dns_zone_log(zone, ISC_LOG_ERROR,
117 "cannot publish zone: view already "
118 "contains another zone with this name");
128 dns_zone_setview(zone, inst->view);
129 CHECK(dns_view_addzone(inst->view, zone));
142 * @warning Never call this on raw part of in-line secure zone, call it only
143 * on the secure zone!
146 load_zone(dns_zone_t *zone) {
151 result = dns_zone_load(zone);
157 CHECK(dns_zone_getserial2(zone, &serial));
158 dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u", serial);
161 dns_zone_notify(zone);
168 * Add zone to view and call dns_zone_load().
175 * Zone has to be published *before* zone load
176 * otherwise it will race with zone->view != NULL check
177 * in zone_maintenance() in zone.c.
182 "cannot add zone to view: %s",