Lines Matching refs:node

207 	dns_ecdbnode_t *node = (dns_ecdbnode_t *)source;
210 REQUIRE(VALID_ECDBNODE(node));
213 LOCK(&node->lock);
214 INSIST(node->references > 0);
215 node->references++;
216 INSIST(node->references != 0); /* Catch overflow. */
217 UNLOCK(&node->lock);
219 *targetp = node;
223 destroynode(dns_ecdbnode_t *node) {
225 dns_ecdb_t *ecdb = node->ecdb;
232 ISC_LIST_UNLINK(ecdb->nodes, node, link);
237 dns_name_free(&node->name, mctx);
239 while ((header = ISC_LIST_HEAD(node->rdatasets)) != NULL) {
242 ISC_LIST_UNLINK(node->rdatasets, header, link);
249 DESTROYLOCK(&node->lock);
251 node->magic = 0;
252 isc_mem_put(mctx, node, sizeof(*node));
261 dns_ecdbnode_t *node;
266 node = (dns_ecdbnode_t *)*nodep;
267 REQUIRE(VALID_ECDBNODE(node));
271 LOCK(&node->lock);
272 INSIST(node->references > 0);
273 node->references--;
274 if (node->references == 0)
276 UNLOCK(&node->lock);
279 destroynode(node);
334 dns_ecdbnode_t *node;
343 /* an 'ephemeral' node is never reused. */
348 node = isc_mem_get(mctx, sizeof(*node));
349 if (node == NULL)
352 result = isc_mutex_init(&node->lock);
357 isc_mem_put(mctx, node, sizeof(*node));
361 dns_name_init(&node->name, NULL);
362 result = dns_name_dup(name, mctx, &node->name);
364 DESTROYLOCK(&node->lock);
365 isc_mem_put(mctx, node, sizeof(*node));
368 node->ecdb= ecdb;
369 node->references = 1;
370 ISC_LIST_INIT(node->rdatasets);
372 ISC_LINK_INIT(node, link);
375 ISC_LIST_APPEND(ecdb->nodes, node, link);
378 node->magic = ECDBNODE_MAGIC;
380 *nodep = node;
386 bind_rdataset(dns_ecdb_t *ecdb, dns_ecdbnode_t *node,
392 * Caller must be holding the node lock.
409 rdataset->private2 = node;
420 INSIST(node->references > 0);
421 node->references++;
425 addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
433 dns_ecdbnode_t *ecdbnode = (dns_ecdbnode_t *)node;
487 deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
491 UNUSED(node);
511 allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
515 dns_ecdbnode_t *ecdbnode = (dns_ecdbnode_t *)node;
531 iterator->common.node = NULL;
532 attachnode(db, node, &iterator->common.node);
651 dns_dbnode_t *node = rdataset->private2;
653 dns_db_detachnode(db, &node);
736 dns_dbnode_t *node = source->private2;
739 attachnode(db, node, &cloned_node);
788 &u.ecdbiterator->common.node);
798 dns_ecdbnode_t *ecdbnode = (dns_ecdbnode_t *)iterator->node;
829 bind_rdataset(ecdb, iterator->node, ecdbiterator->current, rdataset);