43 static const char* adapter_str =
"adapter";
57 ods_log_error(
"[%s] unable to create adapter: allocator_create() "
58 "failed", adapter_str);
63 ods_log_error(
"[%s] unable to create adapter: allocator_alloc() "
64 "failed", adapter_str);
76 ods_log_error(
"[%s] unable to create adapter: allocator_strdup() "
77 "failed", adapter_str);
82 switch(adapter->
type) {
90 "dnsin_create() failed", adapter_str);
98 "dnsout_create() failed", adapter_str);
126 switch(adapter->
type) {
137 adapter->
config = (
void*) dnsin;
148 adapter->
config = (
void*) dnsout;
187 ods_log_error(
"[%s] unable to read zone %s from adapter: unknown "
188 "adapter", adapter_str, adzone->
name);
206 ods_log_error(
"[%s] unable to write zone: no output adapter",
216 "adapter %s", adapter_str, adzone->
name,
224 ods_log_error(
"[%s] unable to write zone %s to adapter: unknown "
225 "adapter", adapter_str, adzone->
name);
269 switch(adapter->
type) {
int adapter_compare(adapter_type *a1, adapter_type *a2)
void dnsout_cleanup(dnsout_type *addns)
void * allocator_alloc(allocator_type *allocator, size_t size)
ods_status adapter_read(void *zone)
ods_status adapter_load_config(adapter_type *adapter)
enum ods_enum_status ods_status
void ods_log_error(const char *format,...)
int ods_strcmp(const char *s1, const char *s2)
adapter_type * adoutbound
allocator_type * allocator
ods_status adfile_read(void *zone)
void dnsin_cleanup(dnsin_type *addns)
allocator_type * allocator_create(void *(*allocator)(size_t size), void(*deallocator)(void *))
ods_status adfile_write(void *zone, const char *filename)
time_t config_last_modified
char * allocator_strdup(allocator_type *allocator, const char *string)
adapter_type * adapter_create(const char *str, adapter_mode type, unsigned in)
ods_status addns_read(void *zone)
enum adapter_mode_enum adapter_mode
ods_status dnsout_update(dnsout_type **addns, const char *filename, time_t *last_mod)
void ods_log_verbose(const char *format,...)
void allocator_cleanup(allocator_type *allocator)
void allocator_deallocate(allocator_type *allocator, void *data)
ods_status addns_write(void *zone)
dnsin_type * dnsin_create(void)
ods_status dnsin_update(dnsin_type **addns, const char *filename, time_t *last_mod)
#define ods_log_assert(x)
ods_status adapter_write(void *zone)
void adapter_cleanup(adapter_type *adapter)
dnsout_type * dnsout_create(void)