}
void
-dns_hooktable_free(isc_mem_t *mctx, void **tablep) {
+dns_hooktable_free(isc_mem_t *mctx, dns_hooktable_t **tablep) {
dns_hooktable_t *table = NULL;
int i = 0;
typedef ISC_LIST(dns_hook_t) dns_hooklist_t;
typedef dns_hooklist_t dns_hooktable_t[DNS_HOOKPOINTS_COUNT];
+typedef void (*dns_hooktable_free_t)(isc_mem_t *, dns_hooktable_t **);
+
/*%
* dns__hook_table is a global hook table, which is used if view->hooktable
* is NULL. It's intended only for use by unit tests.
*/
void
-dns_hooktable_free(isc_mem_t *mctx, void **tablep);
+dns_hooktable_free(isc_mem_t *mctx, dns_hooktable_t **tablep);
/*%<
* Free a hook table.
*/
#include <dns/clientinfo.h>
#include <dns/dnstap.h>
#include <dns/fixedname.h>
+#include <dns/hooks.h>
#include <dns/nta.h>
#include <dns/rdatastruct.h>
#include <dns/rpz.h>
void (*plugins_free)(isc_mem_t *, void **);
/* Hook table */
- void *hooktable; /* dns_hooktable */
- void (*hooktable_free)(isc_mem_t *, void **);
+ dns_hooktable_t *hooktable;
+ dns_hooktable_free_t hooktable_free;
};
#define DNS_VIEW_MAGIC ISC_MAGIC('V', 'i', 'e', 'w')
#include <dns/catz.h>
#include <dns/diff.h>
+#include <dns/hooks.h>
#include <dns/master.h>
#include <dns/masterdump.h>
#include <dns/rdatastruct.h>
* initialized.
*/
-void *
+dns_hooktable_t *
dns_zone_gethooktable(dns_zone_t *zone);
/**<
* Returns the zone hooktable
void
dns_zone_sethooktable(dns_zone_t *zone, void *hooktable,
- void (*hooktable_free)(isc_mem_t *, void **));
+ dns_hooktable_free_t hooktable_free);
/**<
* Initialize zone hooktable and free callback
*
*/
void *plugins;
void (*plugins_free)(isc_mem_t *, void **);
- void *hooktable;
- void (*hooktable_free)(isc_mem_t *, void **);
+ dns_hooktable_t *hooktable;
+ dns_hooktable_free_t hooktable_free;
/* Configuration text */
char *cfg;
rcu_read_unlock();
}
-void *
+dns_hooktable_t *
dns_zone_gethooktable(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return zone->hooktable;
void
dns_zone_sethooktable(dns_zone_t *zone, void *hooktable,
- void (*hooktable_free)(isc_mem_t *, void **)) {
+ dns_hooktable_free_t hooktable_free) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(zone->hooktable == NULL);
REQUIRE(zone->hooktable_free == NULL);
ns_query_start(client, client->inner.handle);
dns__hook_table = saved_hook_table;
- dns_hooktable_free(isc_g_mctx, (void **)&query_hooks);
+ dns_hooktable_free(isc_g_mctx, &query_hooks);
isc_nmhandle_detach(&client->inner.reqhandle);