Lines Matching defs:table

37 #define VALID_SSUTABLE(table) ISC_MAGIC_VALID(table, SSUTABLEMAGIC)
40 #define VALID_SSURULE(table) ISC_MAGIC_VALID(table, SSURULEMAGIC)
65 dns_ssutable_t *table;
70 table = isc_mem_get(mctx, sizeof(*table));
71 isc_refcount_init(&table->references, 1);
72 table->mctx = NULL;
73 isc_mem_attach(mctx, &table->mctx);
74 ISC_LIST_INIT(table->rules);
75 table->magic = SSUTABLEMAGIC;
76 *tablep = table;
80 destroy(dns_ssutable_t *table) {
83 REQUIRE(VALID_SSUTABLE(table));
85 mctx = table->mctx;
86 while (!ISC_LIST_EMPTY(table->rules)) {
87 dns_ssurule_t *rule = ISC_LIST_HEAD(table->rules);
101 ISC_LIST_UNLINK(table->rules, rule, link);
105 isc_refcount_destroy(&table->references);
106 table->magic = 0;
107 isc_mem_putanddetach(&table->mctx, table, sizeof(dns_ssutable_t));
122 dns_ssutable_t *table;
125 table = *tablep;
127 REQUIRE(VALID_SSUTABLE(table));
129 if (isc_refcount_decrement(&table->references) == 1) {
130 destroy(table);
135 dns_ssutable_addrule(dns_ssutable_t *table, bool grant,
142 REQUIRE(VALID_SSUTABLE(table));
153 mctx = table->mctx;
181 ISC_LIST_INITANDAPPEND(table->rules, rule, link);
280 dns_ssutable_checkrules(dns_ssutable_t *table, const dns_name_t *signer,
295 REQUIRE(VALID_SSUTABLE(table));
304 for (rule = ISC_LIST_HEAD(table->rules); rule != NULL;
531 table->mctx))
537 if (!dns_dlz_ssumatch(table->dlzdatabase, signer, name,
627 dns_ssutable_firstrule(const dns_ssutable_t *table, dns_ssurule_t **rule) {
628 REQUIRE(VALID_SSUTABLE(table));
630 *rule = ISC_LIST_HEAD(table->rules);
643 * Create a specialised SSU table that points at an external DLZ database
649 dns_ssutable_t *table = NULL;
653 dns_ssutable_create(mctx, &table);
655 table->dlzdatabase = dlzdatabase;
657 rule = isc_mem_get(table->mctx, sizeof(dns_ssurule_t));
667 ISC_LIST_INITANDAPPEND(table->rules, rule, link);
668 *tablep = table;