adapi.h File Reference
`#include "config.h"`
`#include "status.h"`
`#include "signer/zone.h"`
`#include <ldns/ldns.h>`

Go to the source code of this file.

## Functions

uint32_t | adapi_get_serial (zone_type *zone)
void | adapi_set_serial (zone_type *zone, uint32_t serial)
ldns_rdf * | adapi_get_origin (zone_type *zone)
uint32_t | adapi_get_ttl (zone_type *zone)
void | adapi_trans_full (zone_type *zone, unsigned more_coming)
void | adapi_trans_diff (zone_type *zone, unsigned more_coming)
ods_status | adapi_add_rr (zone_type *zone, ldns_rr *rr, int backup)
ods_status | adapi_del_rr (zone_type *zone, ldns_rr *rr, int backup)
ods_status | adapi_printzone (FILE *fd, zone_type *zone)
ods_status | adapi_printaxfr (FILE *fd, zone_type *zone)
ods_status | adapi_printixfr (FILE *fd, zone_type *zone)

## Function Documentation

## adapi_add_rr()

ods_status adapi_add_rr | ( | zone_type * | zone,
|  | ldns_rr * | rr,
|  | int | backup
| ) |  |

extern

Add RR.

Parameters

  [in] | zone | zone
  [in] | rr | RR
  [in] | backup | from backup

Returns
  ods_status status

Add RR.

Definition at line 359 of file adapi.c.

Referenced by backup_read_namedb().

## adapi_del_rr()

ods_status adapi_del_rr | ( | zone_type * | zone,
|  | ldns_rr * | rr,
|  | int | backup
| ) |  |

extern

Delete RR.

Parameters

  [in] | zone | zone
  [in] | rr | RR
  [in] | backup | from backup

Returns
  ods_status status

Delete RR.

Definition at line 370 of file adapi.c.

## adapi_get_origin()

ldns_rdf * adapi_get_origin | ( | zone_type * | zone | ) |

extern

Get origin.

Parameters

  [in] | zone | zone

Returns
  ldns_rdf* origin

Get origin.

Definition at line 78 of file adapi.c.

References zone_struct::apex.

Referenced by backup_read_ixfr(), and backup_read_namedb().

## adapi_get_serial()

uint32_t adapi_get_serial | ( | zone_type * | zone | ) |

Adapter API. Get the inbound serial.

Parameters

  [in] | zone | zone

Returns
  uint32_t inbound serial

Get the inbound serial.

Definition at line 50 of file adapi.c.

References zone_struct::db, and namedb_struct::inbserial.

## adapi_get_ttl()

uint32_t adapi_get_ttl | ( | zone_type * | zone | ) |

extern

Get ttl.

Parameters

  [in] | zone | zone

Returns
  uint32_t ttl

Get ttl.

Definition at line 92 of file adapi.c.

References zone_struct::default_ttl.

## adapi_printaxfr()

ods_status adapi_printaxfr | ( | FILE * | fd,
|  | zone_type * | zone
| ) |  |

extern

Print axfr.

Parameters

  [in] | fd | file descriptor
  [in] | zone | zone

Returns
  ods_status status

Print axfr.

Definition at line 399 of file adapi.c.

References zone_struct::apex, zone_struct::db, namedb_export(), rrset_print(), and zone_lookup_rrset().

Referenced by addns_write().

## adapi_printixfr()

ods_status adapi_printixfr | ( | FILE * | fd,
|  | zone_type * | zone
| ) |  |

extern

Print ixfr.

Parameters

  [in] | fd | file descriptor
  [in] | zone | zone

Returns
  ods_status status

Print ixfr.

Definition at line 423 of file adapi.c.

References zone_struct::adoutbound, zone_struct::apex, zone_struct::db, adapter_struct::error, namedb_struct::is_initialized, zone_struct::ixfr, ixfr_struct::ixfr_lock, ixfr_print(), rrset_print(), and zone_lookup_rrset().

Referenced by addns_write().

## adapi_printzone()

ods_status adapi_printzone | ( | FILE * | fd,
|  | zone_type * | zone
| ) |  |

extern

Print zonefile.

Parameters

  [in] | fd | file descriptor
  [in] | zone | zone

Returns
  ods_status status

Print zone.

Definition at line 381 of file adapi.c.

References zone_struct::db, and namedb_export().

Referenced by adfile_write().

## adapi_set_serial()

void adapi_set_serial | ( | zone_type * | zone,
|  | uint32_t | serial
| ) |  |

Set the inbound serial.

Parameters

  [in] | zone | zone
  [in] | serial | inbound serial

Set the inbound serial.

Definition at line 64 of file adapi.c.

References zone_struct::db, and namedb_struct::inbserial.

## adapi_trans_diff()

void adapi_trans_diff | ( | zone_type * | zone,
|  | unsigned | more_coming
| ) |  |

extern

Definition at line 143 of file adapi.c.

References zone_struct::db, namedb_diff(), namedb_nsecify(), stats_struct::nsec_count, stats_struct::nsec_time, stats_struct::start_time, zone_struct::stats, and stats_struct::stats_lock.

Referenced by addns_read().

## adapi_trans_full()

void adapi_trans_full | ( | zone_type * | zone,
|  | unsigned | more_coming
| ) |  |

extern

Definition at line 106 of file adapi.c.

References zone_struct::db, namedb_diff(), namedb_nsecify(), stats_struct::nsec_count, stats_struct::nsec_time, stats_struct::start_time, zone_struct::stats, and stats_struct::stats_lock.

Referenced by adfile_read().