b60271016957475ef5d675f8a5a116a661b46b82David Lawrence/**
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Driver instance object.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2009-2015 Red Hat ; see COPYRIGHT for license
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews */
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#ifndef _LD_INSTANCE_H_
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#define _LD_INSTANCE_H_
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#include <dns/fixedname.h>
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#include <dns/name.h>
b60271016957475ef5d675f8a5a116a661b46b82David Lawrence#include <dns/types.h>
b60271016957475ef5d675f8a5a116a661b46b82David Lawrence
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencestruct sample_instance {
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews isc_mem_t *mctx;
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews char *db_name;
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews dns_dbimplementation_t *db_imp;
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews /* These are needed for zone creation. */
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews dns_view_t *view;
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews dns_zonemgr_t *zmgr;
7d2b275f7e9238e2c709737601f6260b5a9a4ee1Mark Andrews isc_task_t *task;
7d2b275f7e9238e2c709737601f6260b5a9a4ee1Mark Andrews isc_boolean_t exiting;
1f426f426e76a8f03db45386178e848cd3925adeAutomatic Updater
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_zone_t *zone1;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_fixedname_t zone1_fn;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_name_t *zone1_name;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_zone_t *zone2;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_fixedname_t zone2_fn;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein dns_name_t *zone2_name;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein};
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeintypedef struct sample_instance sample_instance_t;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinisc_result_t
1f426f426e76a8f03db45386178e848cd3925adeAutomatic Updaternew_sample_instance(isc_mem_t *mctx, const char *db_name,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein int argc, char **argv, const dns_dyndbctx_t *dctx,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein sample_instance_t **sample_instp);
1f426f426e76a8f03db45386178e848cd3925adeAutomatic Updater
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinisc_result_t
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinload_sample_instance_zones(sample_instance_t *inst);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinvoid
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeindestroy_sample_instance(sample_instance_t **sample_instp);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#endif /* !_LD_INSTANCE_H_ */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein