bind9/bin/tests/system/dyndb/driver/instance.h
Evan Hunt f5898cf348 [v9_11] fix dyndb issues; isc_errno_toresult()
4445.	[cleanup]	isc_errno_toresult() can now be used to call the
			formerly private function isc__errno2result().
			[RT #43050]

4444.	[bug]		Fixed some issues related to dyndb: A bug caused
			braces to be omitted when passing configuration text
			from named.conf to a dyndb driver, and there was a
			use-after-free in the sample dyndb driver. [RT #43050]

Patch for dyndb driver submitted by Petr Spacek at Red Hat.

(cherry picked from commit 3390d74e33)
2016-08-17 11:39:42 -07:00

47 lines
987 B
C

/**
* Driver instance object.
*
* Copyright (C) 2009-2015 Red Hat ; see COPYRIGHT for license
*/
#ifndef _LD_INSTANCE_H_
#define _LD_INSTANCE_H_
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/types.h>
struct sample_instance {
isc_mem_t *mctx;
char *db_name;
dns_dbimplementation_t *db_imp;
/* These are needed for zone creation. */
dns_view_t *view;
dns_zonemgr_t *zmgr;
isc_task_t *task;
isc_boolean_t exiting;
dns_zone_t *zone1;
dns_fixedname_t zone1_fn;
dns_name_t *zone1_name;
dns_zone_t *zone2;
dns_fixedname_t zone2_fn;
dns_name_t *zone2_name;
};
typedef struct sample_instance sample_instance_t;
isc_result_t
new_sample_instance(isc_mem_t *mctx, const char *db_name,
int argc, char **argv, const dns_dyndbctx_t *dctx,
sample_instance_t **sample_instp);
isc_result_t
load_sample_instance_zones(sample_instance_t *inst);
void
destroy_sample_instance(sample_instance_t **sample_instp);
#endif /* !_LD_INSTANCE_H_ */