addns.h File Reference
`#include "config.h"`
`#include "status.h"`
`#include "wire/acl.h"`
`#include "wire/tsig.h"`
`#include <ldns/ldns.h>`
`#include <stdio.h>`
`#include <time.h>`

Go to the source code of this file.

## Data Structures

struct | dnsin_struct
struct | dnsout_struct

## Typedefs

typedef struct dnsin_struct | dnsin_type
typedef struct dnsout_struct | dnsout_type

## Functions

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)
ldns_rr * | addns_read_rr (FILE *fd, char *line, ldns_rdf **orig, ldns_rdf **prev, uint32_t *ttl, ldns_status *status, unsigned int *l)
ods_status | addns_read (void *zone)
ods_status | addns_write (void *zone)
void | dnsin_cleanup (dnsin_type *addns)
void | dnsout_cleanup (dnsout_type *addns)

## Typedef Documentation

## dnsin_type

typedef struct dnsin_struct dnsin_type

DNS Adapters. DNS input adapter.

Definition at line 48 of file addns.h.

## dnsout_type

typedef struct dnsout_struct dnsout_type

DNS output adapter.

Definition at line 60 of file addns.h.

## Function Documentation

## addns_read()

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

Read zone from DNS input adapter.

Parameters

  [in] | zone | zone reference

Returns
  ods_status status

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.

Parameters

  [in] | fd | file descriptor
  [in] | line | read line
  [in] | orig | origin
  [in] | prev | previous name
  [in] | ttl | default ttl
  [in] | status | status
  [out] | l | line count

Returns
  ldns_rr* RR

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 zone to DNS output adapter.

Parameters

  [in] | zone | zone reference

Returns
  ods_status status

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.

Parameters

  [in] | addns | DNS input adapter

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.

Returns
  dnsin_type* DNS input adapter

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.

Parameters

  [out] | addns | DNS input adapter
  [in] | filename | filename
  [out] | last_mod | last modified

Returns
  ods_status status

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.

Parameters

  [in] | addns | DNS output adapter

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.

Returns
  dnsout_type* DNS output adapter

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.

Parameters

  [out] | addns | DNS output adapter
  [in] | filename | filename
  [out] | last_mod | last modified

Returns
  ods_status status

Update DNS output adapter.

Definition at line 627 of file addns.c.

Referenced by adapter_load_config().