Lines Matching defs:diff
33 #include <dns/diff.h>
122 dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff) {
123 diff->mctx = mctx;
124 diff->resign = 0;
125 ISC_LIST_INIT(diff->tuples);
126 diff->magic = DNS_DIFF_MAGIC;
130 dns_diff_clear(dns_diff_t *diff) {
132 REQUIRE(DNS_DIFF_VALID(diff));
133 while ((t = ISC_LIST_HEAD(diff->tuples)) != NULL) {
134 ISC_LIST_UNLINK(diff->tuples, t, link);
137 ENSURE(ISC_LIST_EMPTY(diff->tuples));
141 dns_diff_append(dns_diff_t *diff, dns_difftuple_t **tuplep)
143 ISC_LIST_APPEND(diff->tuples, *tuplep, link);
150 dns_diff_appendminimal(dns_diff_t *diff, dns_difftuple_t **tuplep)
154 REQUIRE(DNS_DIFF_VALID(diff));
169 for (ot = ISC_LIST_HEAD(diff->tuples); ot != NULL;
177 ISC_LIST_UNLINK(diff->tuples, ot, link);
180 "unexpected non-minimal diff");
190 ISC_LIST_APPEND(diff->tuples, *tuplep, link);
232 diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
242 REQUIRE(DNS_DIFF_VALID(diff));
245 t = ISC_LIST_HEAD(diff->tuples);
254 * This will cause an empty node to be created if the diff
282 * diff into "rdatalist". This uses the rdata link
283 * field, not the diff link field, so the structure
284 * of the diff itself is not affected.
373 diff->resign);
415 dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver) {
416 return (diff_apply(diff, db, ver, ISC_TRUE));
420 dns_diff_applysilently(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver) {
421 return (diff_apply(diff, db, ver, ISC_FALSE));
427 dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc,
433 REQUIRE(DNS_DIFF_VALID(diff));
435 t = ISC_LIST_HEAD(diff->tuples);
498 dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
503 REQUIRE(DNS_DIFF_VALID(diff));
505 for (p = ISC_LIST_HEAD(diff->tuples);
511 v = isc_mem_get(diff->mctx, length * sizeof(dns_difftuple_t *));
515 p = ISC_LIST_HEAD(diff->tuples);
517 ISC_LIST_UNLINK(diff->tuples, p, link);
519 INSIST(ISC_LIST_HEAD(diff->tuples) == NULL);
522 ISC_LIST_APPEND(diff->tuples, v[i], link);
524 isc_mem_put(diff->mctx, v, length * sizeof(dns_difftuple_t *));
556 dns_diff_print(dns_diff_t *diff, FILE *file) {
563 REQUIRE(DNS_DIFF_VALID(diff));
565 mem = isc_mem_get(diff->mctx, size);
569 for (t = ISC_LIST_HEAD(diff->tuples); t != NULL;
593 isc_mem_put(diff->mctx, mem, size);
595 mem = isc_mem_get(diff->mctx, size);
631 isc_mem_put(diff->mctx, mem, size);