xref: /netbsd-src/external/mpl/bind/dist/lib/dns/qpcache_p.h (revision bcda20f65a8566e103791ec395f7f499ef322704)
1*bcda20f6Schristos /*	$NetBSD: qpcache_p.h,v 1.2 2025/01/26 16:25:24 christos Exp $	*/
29689912eSchristos 
39689912eSchristos /*
49689912eSchristos  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
59689912eSchristos  *
69689912eSchristos  * SPDX-License-Identifier: MPL-2.0
79689912eSchristos  *
89689912eSchristos  * This Source Code Form is subject to the terms of the Mozilla Public
99689912eSchristos  * License, v. 2.0. If a copy of the MPL was not distributed with this
109689912eSchristos  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
119689912eSchristos  *
129689912eSchristos  * See the COPYRIGHT file distributed with this work for additional
139689912eSchristos  * information regarding copyright ownership.
149689912eSchristos  */
159689912eSchristos 
169689912eSchristos #pragma once
179689912eSchristos 
189689912eSchristos #include <isc/heap.h>
199689912eSchristos #include <isc/lang.h>
209689912eSchristos #include <isc/urcu.h>
219689912eSchristos 
229689912eSchristos #include <dns/nsec3.h>
239689912eSchristos #include <dns/qp.h>
249689912eSchristos #include <dns/rbt.h>
259689912eSchristos #include <dns/types.h>
269689912eSchristos 
279689912eSchristos /*****
289689912eSchristos ***** Module Info
299689912eSchristos *****/
309689912eSchristos 
319689912eSchristos /*! \file
329689912eSchristos  * \brief
339689912eSchristos  * DNS QPDB Implementation (minimally adapted from RBTDB)
349689912eSchristos  */
359689912eSchristos 
369689912eSchristos ISC_LANG_BEGINDECLS
379689912eSchristos 
389689912eSchristos isc_result_t
399689912eSchristos dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *base, dns_dbtype_t type,
409689912eSchristos 		    dns_rdataclass_t rdclass, unsigned int argc, char *argv[],
419689912eSchristos 		    void *driverarg, dns_db_t **dbp);
429689912eSchristos /*%<
439689912eSchristos  * Create a new database of type "qpcache". Called via dns_db_create();
449689912eSchristos  * see documentation for that function for more details.
459689912eSchristos  *
469689912eSchristos  * If argv[0] is set, it points to a valid memory context to be used for
479689912eSchristos  * allocation of heap memory.  Generally this is used for cache databases
489689912eSchristos  * only.
499689912eSchristos  *
509689912eSchristos  * Requires:
519689912eSchristos  *
529689912eSchristos  * \li argc == 0 or argv[0] is a valid memory context.
539689912eSchristos  */
549689912eSchristos ISC_LANG_ENDDECLS
55