OpenDNSSEC-signer 1.2.1
Data Structures | Typedefs | Functions

/build/buildd-opendnssec_1.2.1.dfsg-1-mips-p9AT07/opendnssec-1.2.1.dfsg/signer/src/signer/zone.h File Reference

#include "config.h"
#include "adapter/adapter.h"
#include "scheduler/locks.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:

Go to the source code of this file.

Data Structures

struct  zone_struct

Typedefs

typedef struct zone_struct zone_type

Functions

zone_typezone_create (const char *name, ldns_rr_class klass)
void zone_update_zonelist (zone_type *z1, zone_type *z2)
int zone_update_signconf (zone_type *zone, struct tasklist_struct *tl, char *buf)
int zone_update_zonedata (zone_type *zone)
int zone_add_dnskeys (zone_type *zone)
int zone_add_rr (zone_type *zone, ldns_rr *rr, int recover)
int zone_del_rr (zone_type *zone, ldns_rr *rr)
int zone_nsecify (zone_type *zone)
int zone_sign (zone_type *zone)
int zone_backup_state (zone_type *zone)
void zone_recover_from_backup (zone_type *zone, struct tasklist_struct *tl)
void zone_cleanup (zone_type *zone)
void zone_print (FILE *fd, zone_type *zone)

Typedef Documentation

typedef struct zone_struct zone_type

Zone.

Definition at line 54 of file zone.h.


Function Documentation

int zone_add_dnskeys ( zone_type zone)

Add DNSKEY and NSEC3PARAM records to the zone.

Parameters:
[in]zonecorresponding zone
Returns:
int 0 on success, 1 on error

Publish DNSKEY and NSEC3PARAM records to the zone.

Definition at line 455 of file zone.c.

References zone_struct::name, signconf_struct::nsec_type, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_error(), se_log_warning(), zone_struct::signconf, and zone_struct::zonedata.

Referenced by tools_add_dnskeys().

int zone_add_rr ( zone_type zone,
ldns_rr *  rr,
int  recover 
)

Add a RR to the zone.

Parameters:
[in]zonezone structure
[in]rrRR
[in]recovertrue if we are recovering from backup
Returns:
int 0 on success, 1 on error

Add a RR to the zone.

Definition at line 504 of file zone.c.

References zone_struct::dname, signconf_struct::dnskey_ttl, duration2time(), zone_struct::name, se_log_assert, se_log_error(), se_log_verbose(), se_log_warning(), SE_SOA_RDATA_MINIMUM, zone_struct::signconf, signconf_struct::soa_min, signconf_struct::soa_ttl, zone_struct::zonedata, zonedata_add_rr(), and zonedata_recover_rr_from_backup().

int zone_backup_state ( zone_type zone)

Backup zone state.

Parameters:
[in]zonecorresponding zone
Returns:
int 0 on success, 1 on error

Backup zone data.

Parameters:
[in]zonecorresponding zone
Returns:
int 0 on success, 1 on error

Definition at line 697 of file zone.c.

References zonedata_struct::default_ttl, zone_struct::fetch, zonedata_struct::inbound_serial, zonedata_struct::internal_serial, zone_struct::klass, zone_struct::name, zonedata_struct::outbound_serial, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_error(), zone_struct::signconf, and zone_struct::zonedata.

Referenced by tools_add_dnskeys(), tools_read_input(), tools_sign(), tools_update(), and tools_write_output().

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

Delete a RR from the zone.

Parameters:
[in]zonezone structure
[in]rrRR
Returns:
int 0 on success, 1 on error

Delete a RR from the zone.

Definition at line 571 of file zone.c.

References se_log_assert, zone_struct::zonedata, and zonedata_del_rr().

int zone_nsecify ( zone_type zone)
void zone_print ( FILE *  out,
zone_type zone 
)

Print a zone.

Parameters:
[in]outfile descriptor
[in]zonezone to print

Print zone.

Definition at line 1111 of file zone.c.

References se_log_assert, zone_struct::zonedata, and zonedata_print().

Referenced by adfile_write().

void zone_recover_from_backup ( zone_type zone,
struct tasklist_struct tl 
)
int zone_sign ( zone_type zone)
int zone_update_signconf ( zone_type zone,
struct tasklist_struct tl,
char *  buf 
)
int zone_update_zonedata ( zone_type zone)

Update zone data.

Parameters:
[in]zonecorresponding zone
Returns:
int 0 on success, 1 on error

Update zone with pending changes.

Definition at line 427 of file zone.c.

References ADAPTER_FILE, zone_struct::dname, zone_struct::inbound_adapter, zone_struct::name, se_log_assert, se_log_debug(), se_log_error(), zone_struct::signconf, adapter_struct::type, zone_struct::zonedata, zonedata_cancel_update(), zonedata_examine(), and zonedata_update().

Referenced by tools_update().

void zone_update_zonelist ( zone_type z1,
zone_type z2 
)

Update zone configuration settings from zone list.

Parameters:
[in]z1zone to be updated
[in]z2update

Update zone configuration settings from zone list.

Definition at line 95 of file zone.c.

References adapter_cleanup(), adapter_compare(), adapter_create(), adapter_struct::filename, adapter_struct::inbound, zone_struct::inbound_adapter, zone_struct::just_updated, zone_struct::outbound_adapter, zone_struct::policy_name, se_free(), se_log_assert, se_strcmp(), se_strdup(), zone_struct::signconf_filename, adapter_struct::type, and zone_cleanup().

Referenced by zonelist_merge().