ixfr_store
if (ixfr_store) {
ixfr_store_addrr(ixfr_store, rr);
int* softfail, struct ixfr_store* ixfr_store)
if(ixfr_store)
ixfr_store_add_newsoa(ixfr_store, ttl, packet, rrlen);
if(ixfr_store)
ixfr_store_add_oldsoa(ixfr_store, ttl, packet, rrlen);
if (ixfr_store) {
ixfr_store_add_newsoa(ixfr_store, ttl, packet, rrlen);
if (ixfr_store && *delete_mode) {
ixfr_store_add_newsoa(ixfr_store, ttl, packet, rrlen);
ixfr_store_finish(ixfr_store, nsd, NULL);
ixfr_store_start(zone, ixfr_store);
ixfr_store_add_oldsoa(ixfr_store, ttl, packet, rrlen);
if(ixfr_store) {
ixfr_store_cancel(ixfr_store);
rrlen, zone, region, softfail, ixfr_store)) {
rrlen, zone, softfail, ixfr_store, &collect_rrs))) {
struct ixfr_store* ixfr_store = NULL, ixfr_store_mem;
ixfr_store = ixfr_store_start(zone, &ixfr_store_mem);
&num_bytes, &softfail, ixfr_store);
if(ixfr_store)
ixfr_store_finish(ixfr_store, nsd, log_buf);
region_type* temp_region, int* softfail, struct ixfr_store* ixfr_store)
if(ixfr_store)
ixfr_store_delrr(ixfr_store, rr);
int* softfail, struct ixfr_store* ixfr_store,
zone, softfail, ixfr_store, &collect_rrs2)) {
struct ixfr_store;
struct ixfr_store* ixfr_store);
int* softfail, struct ixfr_store* ixfr_store,
if(!ixfr_store->data)
soa = ixfr_store->data->newsoa;
soa_len= ixfr_store->data->newsoa_len;
ixfr_store_cancel(ixfr_store);
void ixfr_store_finish_data(struct ixfr_store* ixfr_store)
if(ixfr_store->data_trimmed)
ixfr_store->data_trimmed = 1;
ixfr_put_newsoa(ixfr_store, &ixfr_store->data->del,
&ixfr_store->data->del_len, &ixfr_store->del_capacity);
ixfr_put_newsoa(ixfr_store, &ixfr_store->data->add,
&ixfr_store->data->add_len, &ixfr_store->add_capacity);
if(!ixfr_store->data)
ixfr_trim_capacity(&ixfr_store->data->del,
&ixfr_store->data->del_len, &ixfr_store->del_capacity);
ixfr_trim_capacity(&ixfr_store->data->add,
&ixfr_store->data->add_len, &ixfr_store->add_capacity);
void ixfr_store_finish(struct ixfr_store* ixfr_store, struct nsd* nsd,
if(ixfr_store->cancelled) {
ixfr_store_free(ixfr_store);
ixfr_store_finish_data(ixfr_store);
if(ixfr_store->cancelled) {
ixfr_store_free(ixfr_store);
if(log_buf && !ixfr_store->data->log_str)
ixfr_store->data->log_str = strdup(log_buf);
if(!ixfr_store->zone->ixfr)
ixfr_store->zone->ixfr = zone_ixfr_create(nsd);
zone_ixfr_make_space(ixfr_store->zone->ixfr, ixfr_store->zone,
ixfr_store->data, ixfr_store);
if(ixfr_store->cancelled) {
ixfr_store_free(ixfr_store);
zone_ixfr_add(ixfr_store->zone->ixfr, ixfr_store->data, 1);
ixfr_store->data = NULL;
ixfr_store_free(ixfr_store);
void ixfr_store_add_newsoa(struct ixfr_store* ixfr_store, uint32_t ttl,
if(ixfr_store->cancelled)
if(ixfr_store->data->newsoa) {
free(ixfr_store->data->newsoa);
ixfr_store->data->newsoa = NULL;
ixfr_store->data->newsoa_len = 0;
sz = domain_dname(ixfr_store->zone->apex)->name_size;
ixfr_store_cancel(ixfr_store);
ixfr_store_cancel(ixfr_store);
ixfr_store->data->newserial = serial;
ixfr_store->data->newsoa = xalloc(sz);
ixfr_store->data->newsoa_len = sz;
store_soa(ixfr_store->data->newsoa, ixfr_store->zone, ttl,
void ixfr_store_add_oldsoa(struct ixfr_store* ixfr_store, uint32_t ttl,
if(ixfr_store->cancelled)
if(ixfr_store->data->oldsoa) {
free(ixfr_store->data->oldsoa);
ixfr_store->data->oldsoa = NULL;
ixfr_store->data->oldsoa_len = 0;
zone_ixfr_make_space(ixfr_store->zone->ixfr, ixfr_store->zone,
ixfr_store->data, ixfr_store);
if(ixfr_store->cancelled)
sz = domain_dname(ixfr_store->zone->apex)->name_size;
ixfr_store_cancel(ixfr_store);
ixfr_store_cancel(ixfr_store);
ixfr_store->data->oldserial = serial;
ixfr_store->data->oldsoa = xalloc(sz);
ixfr_store->data->oldsoa_len = sz;
store_soa(ixfr_store->data->oldsoa, ixfr_store->zone, ttl,
void ixfr_store_putrr(struct ixfr_store* ixfr_store, const rr_type* rr,
if(ixfr_store->cancelled)
zone_ixfr_make_space(ixfr_store->zone->ixfr, ixfr_store->zone,
ixfr_store->data, ixfr_store);
if(ixfr_store->cancelled)
ixfr_store_cancel(ixfr_store);
void ixfr_store_delrr(struct ixfr_store* ixfr_store, const rr_type* rr)
if(ixfr_store->cancelled)
ixfr_store_putrr(ixfr_store, rr, &ixfr_store->data->del,
&ixfr_store->data->del_len, &ixfr_store->del_capacity);
void ixfr_store_addrr(struct ixfr_store* ixfr_store, const rr_type* rr)
if(ixfr_store->cancelled)
ixfr_store_putrr(ixfr_store, rr, &ixfr_store->data->add,
&ixfr_store->data->add_len, &ixfr_store->add_capacity);
int ixfr_store_addrr_rdatas(struct ixfr_store* ixfr_store, const rr_type *rr)
if(ixfr_store->cancelled)
if(ixfr_putrr(rr, &ixfr_store->data->add, &ixfr_store->data->add_len,
&ixfr_store->add_capacity) <= 0)
int ixfr_store_add_newsoa_rdatas(struct ixfr_store* ixfr_store,
if(ixfr_store->cancelled)
if(!retrieve_soa_rdata_serial(rr, &ixfr_store->data->newserial))
if(ixfr_putrr(rr, &ixfr_store->data->newsoa,
&ixfr_store->data->newsoa_len, &ixfr_store->add_capacity) <= 0)
ixfr_trim_capacity(&ixfr_store->data->newsoa,
&ixfr_store->data->newsoa_len, &capacity);
int ixfr_store_delrr_uncompressed(struct ixfr_store* ixfr_store,
if(ixfr_store->cancelled)
ttl, rdata, rdata_len, &ixfr_store->data->del,
&ixfr_store->data->del_len, &ixfr_store->del_capacity);
int ixfr_store_oldsoa_uncompressed(struct ixfr_store* ixfr_store,
if(ixfr_store->cancelled)
ttl, rdata, rdata_len, &ixfr_store->data->oldsoa,
&ixfr_store->data->oldsoa_len, &capacity))
ixfr_store->data->oldserial = ntohl(serial);
ixfr_trim_capacity(&ixfr_store->data->oldsoa,
&ixfr_store->data->oldsoa_len, &capacity);
struct ixfr_data* data, struct ixfr_store* ixfr_store)
ixfr_store_cancel(ixfr_store);
ixfr_store_cancel(ixfr_store);
struct ixfr_store* ixfr_store_start(struct zone* zone,
struct ixfr_store* ixfr_store_mem)
struct ixfr_store* ixfr_store = ixfr_store_mem;
memset(ixfr_store, 0, sizeof(*ixfr_store));
ixfr_store->zone = zone;
ixfr_store->data = xalloc_zero(sizeof(*ixfr_store->data));
return ixfr_store;
void ixfr_store_cancel(struct ixfr_store* ixfr_store)
ixfr_store->cancelled = 1;
ixfr_data_free(ixfr_store->data);
ixfr_store->data = NULL;
void ixfr_store_free(struct ixfr_store* ixfr_store)
if(!ixfr_store)
ixfr_data_free(ixfr_store->data);
static void ixfr_put_newsoa(struct ixfr_store* ixfr_store, uint8_t** rrs,
struct ixfr_store* ixfr_store_start(struct zone* zone,
struct ixfr_store* ixfr_store_mem);
void ixfr_store_cancel(struct ixfr_store* ixfr_store);
void ixfr_store_free(struct ixfr_store* ixfr_store);
void ixfr_store_finish(struct ixfr_store* ixfr_store, struct nsd* nsd,
void ixfr_store_finish_data(struct ixfr_store* ixfr_store);
void ixfr_store_add_newsoa(struct ixfr_store* ixfr_store, uint32_t ttl,
void ixfr_store_add_oldsoa(struct ixfr_store* ixfr_store, uint32_t ttl,
void ixfr_store_delrr(struct ixfr_store* ixfr_store,
void ixfr_store_addrr(struct ixfr_store* ixfr_store, const rr_type *rr);
int ixfr_store_addrr_rdatas(struct ixfr_store* ixfr_store, const rr_type *rr);
int ixfr_store_delrr_uncompressed(struct ixfr_store* ixfr_store,
int ixfr_store_add_newsoa_rdatas(struct ixfr_store* ixfr_store,
int ixfr_store_oldsoa_uncompressed(struct ixfr_store* ixfr_store,
struct ixfr_data* data, struct ixfr_store* ixfr_store);
struct ixfr_store store_mem, *store;
static int process_store_oldsoa(struct ixfr_store* store, uint8_t* dname,
struct ixfr_store* store, struct domain* domain,
struct ixfr_store* store, uint8_t* dname, size_t dname_len,
static int process_add_rrset(struct ixfr_store* ixfr_store,
if(!ixfr_store_addrr_rdatas(ixfr_store, rrset->rrs[i])) {
static int process_marktypes(struct ixfr_store* store, struct zone* zone,
struct ixfr_store* store, struct zone* zone, struct domain* domain)
static int process_domain_add_RRs(struct ixfr_store* store, struct zone* zone,
struct ixfr_store* store, FILE* spool, uint8_t* dname,
struct ixfr_store* store)
struct ixfr_store* store, struct domain* domain,
struct ixfr_store* store, struct zone* zone, struct domain* domain,
struct ixfr_store* store, struct spool_dname_iterator* iter)
struct ixfr_store* store, struct zone* zone)
static int ixfr_create_store_newsoa(struct ixfr_store* store,
struct ixfr_store* store_mem, struct ixfr_store** store, FILE** spool)
struct ixfr_store* store, struct zone* zone, int append_mem,