Data Structures | Typedefs | Functions

/build/buildd-opendnssec_1.3.2-1~bpo60+1-powerpc-mjESd6/opendnssec-1.3.2/signer/src/signer/zone.h File Reference

#include "config.h"
#include "adapter/adapter.h"
#include "scheduler/task.h"
#include "shared/allocator.h"
#include "shared/locks.h"
#include "shared/status.h"
#include "signer/nsec3params.h"
#include "signer/signconf.h"
#include "signer/stats.h"
#include "signer/zonedata.h"
#include <ldns/ldns.h>
Include dependency graph for zone.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zone_struct

Typedefs

typedef struct zone_struct zone_type

Functions

zone_typezone_create (char *name, ldns_rr_class klass)
ods_status zone_add_rr (zone_type *zone, ldns_rr *rr, int do_stats)
ods_status zone_del_rr (zone_type *zone, ldns_rr *rr, int do_stats)
ods_status zone_load_signconf (zone_type *zone, task_id *tbs)
ods_status zone_publish_dnskeys (zone_type *zone, int recover)
ods_status zone_prepare_nsec3 (zone_type *zone, int recover)
ods_status zone_backup (zone_type *zone)
ods_status zone_recover (zone_type *zone)
void zone_merge (zone_type *z1, zone_type *z2)
ods_status zone_update_serial (zone_type *zone)
ods_status zone_print (FILE *fd, zone_type *zone)
ods_status zone_examine (zone_type *zone)
void zone_cleanup (zone_type *zone)

Typedef Documentation

typedef struct zone_struct zone_type

Zone.

Definition at line 56 of file zone.h.


Function Documentation

ods_status zone_add_rr ( zone_type zone,
ldns_rr *  rr,
int  do_stats 
)

Add RR.

Parameters:
[in] zone zone
[in] rr rr
[in] do_stats true if we need to maintain statistics
Returns:
ods_status status: ODS_STATUS_OK: rr to be added to zone ODS_STATUS_UNCHANGED: rr not added to zone, rr already exists other: rr not added to zone, error occurred

Add RR.

Definition at line 143 of file zone.c.

References domain_struct::dname, zone_struct::dname, signconf_struct::dnskey_ttl, domain_add_rrset(), domain_create(), domain_lookup_rrset(), domain_struct::dstatus, duration2time(), zone_struct::name, ods_log_assert, ods_log_error(), ods_log_verbose(), ods_log_warning(), rrset_add_rr(), rrset_create(), SE_SOA_RDATA_MINIMUM, zone_struct::signconf, signconf_struct::soa_min, signconf_struct::soa_ttl, stats_struct::sort_count, zone_struct::stats, zone_struct::zonedata, zonedata_add_domain(), and zonedata_lookup_domain().

Referenced by adapi_add_rr(), zone_prepare_nsec3(), and zone_publish_dnskeys().

ods_status zone_backup ( zone_type zone  ) 
void zone_cleanup ( zone_type zone  ) 
zone_type* zone_create ( char *  name,
ldns_rr_class  klass 
)
ods_status zone_del_rr ( zone_type zone,
ldns_rr *  rr,
int  do_stats 
)

Delete RR.

Parameters:
[in] zone zone
[in] rr rr
[in] do_stats true if we need to maintain statistics
Returns:
ods_status status ODS_STATUS_OK: rr to be removed from zone ODS_STATUS_UNCHANGED: rr not removed from zone, rr does not exist other: rr not removed from zone, error occurred

Delete RR.

Definition at line 270 of file zone.c.

References domain_lookup_rrset(), ods_log_assert, ods_log_error(), ods_log_warning(), rrset_del_rr(), stats_struct::sort_count, zone_struct::stats, zone_struct::zonedata, and zonedata_lookup_domain().

Referenced by adapi_del_rr().

ods_status zone_examine ( zone_type zone  ) 

Examine zone.

Parameters:
[in] zone zone
Returns:
ods_status status

Examine zone.

Definition at line 1214 of file zone.c.

References zone_struct::adinbound, zone_struct::dname, adapter_struct::type, zone_struct::zonedata, and zonedata_examine().

Referenced by adfile_read().

ods_status zone_load_signconf ( zone_type zone,
task_id tbs 
)

Load signer configuration for zone.

Parameters:
[in] zone zone
[out] tbs task to be scheduled
Returns:
ods_status status ODS_STATUS_OK: new signer configuration loaded ODS_STATUS_UNCHANGED: signer configuration has not changed other: signer configuration not loaded, error occurred

Load signer configuration for zone.

Definition at line 348 of file zone.c.

References zonedata_struct::default_ttl, duration2time(), signconf_struct::last_modified, zone_struct::name, zone_struct::nsec3params, nsec3params_cleanup(), ods_log_assert, ods_log_debug(), ods_log_error(), ods_log_verbose(), ods_log_warning(), ods_status2str(), ODS_STATUS_OK, ODS_STATUS_UNCHANGED, zone_struct::signconf, signconf_cleanup(), signconf_compare_denial(), signconf_compare_keys(), zone_struct::signconf_filename, signconf_log(), signconf_update(), signconf_struct::soa_min, TASK_NONE, TASK_NSECIFY, TASK_READ, task_what2str(), time_datestamp(), zone_struct::zonedata, zonedata_cleanup_chain(), zonedata_init_denial(), zonedata_rollback(), and zonedata_wipe_denial().

void zone_merge ( zone_type z1,
zone_type z2 
)

Merge zones. Values that are merged:

  • policy name
  • signconf filename
  • input and output adater
Parameters:
[in] z1 zone
[in] z2 zone with new values

Merge zones.

Definition at line 1052 of file zone.c.

References adapter_compare(), zone_struct::adinbound, zone_struct::adoutbound, zone_struct::just_updated, zone_struct::name, ods_log_error(), ods_strcmp(), zone_struct::policy_name, and zone_struct::signconf_filename.

ods_status zone_prepare_nsec3 ( zone_type zone,
int  recover 
)
ods_status zone_print ( FILE *  fd,
zone_type zone 
)

Print zone.

Parameters:
[in] zone zone
Returns:
ods_status status

Print zone.

Definition at line 1200 of file zone.c.

References zone_struct::zonedata, and zonedata_print().

Referenced by adfile_write().

ods_status zone_publish_dnskeys ( zone_type zone,
int  recover 
)
ods_status zone_recover ( zone_type zone  ) 

Recover zone from backup.

Parameters:
[in] zone corresponding zone

Recover zone from backup.

Definition at line 743 of file zone.c.

References adbackup_read(), zone_struct::allocator, signconf_struct::allocator, allocator_strdup(), signconf_struct::audit, backup_read_check_str(), backup_read_duration(), backup_read_int(), backup_read_rr_type(), backup_read_str(), backup_read_time_t(), backup_read_uint32_t(), zonedata_struct::default_ttl, signconf_struct::dnskey_ttl, zonedata_struct::inbound_serial, zonedata_struct::initialized, zonedata_struct::internal_serial, key_recover(), keylist_create(), keylist_push(), signconf_struct::keys, zone_struct::klass, lock_basic_lock, lock_basic_unlock, zone_struct::name, signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, nsec3params_cleanup(), nsec3params_create(), signconf_struct::nsec_type, ods_build_path(), ods_fclose(), ods_fopen(), ods_log_assert, ods_log_error(), ODS_STATUS_OK, ods_strcmp(), zonedata_struct::outbound_serial, zone_struct::prepared, nsec3params_struct::rr, signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, zone_struct::signconf, signconf_cleanup(), signconf_create(), signconf_struct::soa_min, signconf_struct::soa_serial, signconf_struct::soa_ttl, zone_struct::stats, stats_clear(), stats_struct::stats_lock, task_cleanup(), task_create(), zone_prepare_nsec3(), zone_publish_dnskeys(), zone_struct::zonedata, zonedata_cleanup(), zonedata_commit(), zonedata_create(), zonedata_entize(), and zonedata_recover().

ods_status zone_update_serial ( zone_type zone  )