addns.c File Reference
`#include "config.h"`
`#include "adapter/adapi.h"`
`#include "adapter/adapter.h"`
`#include "adapter/addns.h"`
`#include "adapter/adutil.h"`
`#include "parser/addnsparser.h"`
`#include "parser/confparser.h"`
`#include "duration.h"`
`#include "file.h"`
`#include "log.h"`
`#include "status.h"`
`#include "util.h"`
`#include "signer/zone.h"`
`#include "wire/notify.h"`
`#include "wire/xfrd.h"`
`#include <ldns/ldns.h>`
`#include <stdio.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## Functions

ldns_rr * | addns_read_rr (FILE *fd, char *line, ldns_rdf **orig, ldns_rdf **prev, uint32_t *ttl, ldns_status *status, unsigned int *l)
dnsin_type * | dnsin_create (void)
dnsout_type * | dnsout_create (void)
ods_status | dnsin_update (dnsin_type **addns, const char *filename, time_t *last_mod)
ods_status | dnsout_update (dnsout_type **addns, const char *filename, time_t *last_mod)
ods_status | addns_read (void *zone)
ods_status | addns_write (void *zone)
void | dnsin_cleanup (dnsin_type *addns)
void | dnsout_cleanup (dnsout_type *addns)

## Function Documentation

## addns_read()

ods_status addns_read | ( | void * | zone | ) |

Read zone from DNS Input Adapter.

Definition at line 685 of file addns.c.

References adapi_trans_diff(), ADAPTER_DNS, zone_struct::adinbound, zone_struct::db, zone_struct::name, xfrd_struct::rw_lock, xfrd_struct::serial_disk_acquired, xfrd_struct::serial_lock, xfrd_struct::serial_xfr_acquired, adapter_struct::type, and zone_struct::xfrd.

## addns_read_rr()

ldns_rr* addns_read_rr | ( | FILE * | fd,
|  | char * | line,
|  | ldns_rdf ** | orig,
|  | ldns_rdf ** | prev,
|  | uint32_t * | ttl,
|  | ldns_status * | status,
|  | unsigned int * | l
| ) |  |

Read the next RR from zone file.

Definition at line 62 of file addns.c.

References adutil_readline_frm_file(), adutil_rtrim_line(), and adutil_whitespace_line().

## addns_write()

ods_status addns_write | ( | void * | zone | ) |

Write to DNS Output Adapter.

Definition at line 768 of file addns.c.

References adapi_printaxfr(), adapi_printixfr(), ADAPTER_DNS, zone_struct::adoutbound, zone_struct::db, adapter_struct::error, namedb_struct::is_initialized, zone_struct::ixfr, zone_struct::name, ixfr_struct::part, part_struct::soamin, part_struct::soaplus, and adapter_struct::type.

## dnsin_cleanup()

void dnsin_cleanup | ( | dnsin_type * | addns | ) |

Clean up DNS input adapter.

Definition at line 893 of file addns.c.

References acl_cleanup(), dnsin_struct::allow_notify, dnsin_struct::request_xfr, dnsin_struct::tsig, and tsig_cleanup().

Referenced by adapter_cleanup().

## dnsin_create()

dnsin_type* dnsin_create | ( | void |  | ) |

Create DNS input adapter.

Definition at line 502 of file addns.c.

References dnsin_struct::allow_notify, dnsin_struct::request_xfr, and dnsin_struct::tsig.

## dnsin_update()

ods_status dnsin_update | ( | dnsin_type ** | addns,
|  | const char * | filename,
|  | time_t * | last_mod
| ) |  |

Update DNS input adapter.

Definition at line 568 of file addns.c.

Referenced by adapter_load_config().

## dnsout_cleanup()

void dnsout_cleanup | ( | dnsout_type * | addns | ) |

Clean up DNS output adapter.

Definition at line 910 of file addns.c.

References acl_cleanup(), dnsout_struct::do_notify, dnsout_struct::provide_xfr, dnsout_struct::tsig, and tsig_cleanup().

Referenced by adapter_cleanup().

## dnsout_create()

dnsout_type* dnsout_create | ( | void |  | ) |

Create DNS output adapter.

Definition at line 518 of file addns.c.

References dnsout_struct::do_notify, dnsout_struct::provide_xfr, and dnsout_struct::tsig.

## dnsout_update()

ods_status dnsout_update | ( | dnsout_type ** | addns,
|  | const char * | filename,
|  | time_t * | last_mod
| ) |  |

Update DNS output adapter.

Definition at line 627 of file addns.c.

Referenced by adapter_load_config().