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/zonelist.h File Reference

#include "signer/zone.h"
#include <ldns/ldns.h>
#include <stdio.h>
#include <time.h>
Include dependency graph for zonelist.h:

Go to the source code of this file.

Data Structures

struct  zonelist_struct

Typedefs

typedef struct zonelist_struct zonelist_type

Functions

zonelist_typezonelist_create (void)
zonelist_typezonelist_read (const char *zonelistfile, time_t last_modified)
void zonelist_lock (zonelist_type *zonelist)
void zonelist_unlock (zonelist_type *zonelist)
zone_typezonelist_lookup_zone_by_name (zonelist_type *zonelist, const char *name)
zone_typezonelist_add_zone (zonelist_type *zonelist, zone_type *zone)
void zonelist_update (zonelist_type *zl, struct tasklist_struct *tl, const char *cmd, char *buf)
void zonelist_merge (zonelist_type *zl1, zonelist_type *zl2)
void zonelist_cleanup (zonelist_type *zonelist)

Typedef Documentation

Zone list

Definition at line 49 of file zonelist.h.


Function Documentation

zone_type* zonelist_add_zone ( zonelist_type zonelist,
zone_type zone 
)

Add zone to zone list.

Parameters:
[in]zonelistzone list
[in]zonezone to add
Returns:
zone_type* added zone

Add zone.

Definition at line 239 of file zonelist.c.

References zone_struct::just_added, zone_struct::name, se_free(), se_log_assert, se_log_error(), se_log_warning(), zone_cleanup(), and zonelist_struct::zones.

Referenced by parse_zonelist_zones(), and zonelist_merge().

void zonelist_cleanup ( zonelist_type zonelist)

Clean up a zonelist.

Parameters:
[in]zonelistlist to clean up

Clean up a zonelist.

Definition at line 446 of file zonelist.c.

References se_free(), se_log_warning(), se_rbnode_free(), zone_cleanup(), and zonelist_struct::zones.

Referenced by engine_cleanup(), and parse_zonelist_zones().

zonelist_type* zonelist_create ( void  )

Create zone list.

Returns:
zonelist_type* created zone list

Create a new zone list.

Definition at line 76 of file zonelist.c.

References zonelist_struct::last_modified, se_malloc(), and zonelist_struct::zones.

Referenced by parse_zonelist_zones().

void zonelist_lock ( zonelist_type zonelist)

Lock all zones in zone list.

Parameters:
[in]zonelistzone list

Lock all zones in zone list.

Definition at line 131 of file zonelist.c.

References lock_basic_lock, se_log_assert, zone_struct::zone_lock, and zonelist_struct::zones.

Referenced by engine_update_zonelist().

zone_type* zonelist_lookup_zone_by_name ( zonelist_type zonelist,
const char *  name 
)

Lookup zone by name.

Parameters:
[in]zonelistzone list
[in]namezone name
Returns:
zone_type* zone if found

Lookup zone by name.

Definition at line 211 of file zonelist.c.

References zone_struct::name, se_log_assert, se_strcmp(), and zonelist_struct::zones.

void zonelist_merge ( zonelist_type zl1,
zonelist_type zl2 
)

Merge zone lists. /param[in] zl1 base zone list /param[in] zl2 additional zone list

Merge zone lists.

Definition at line 360 of file zonelist.c.

References zonelist_struct::last_modified, lock_basic_lock, zone_struct::name, se_free(), se_log_assert, se_log_debug(), se_log_error(), se_rbnode_free(), zone_struct::tobe_removed, zone_struct::zone_lock, zone_update_zonelist(), zonelist_add_zone(), and zonelist_struct::zones.

Referenced by engine_update_zonelist().

zonelist_type* zonelist_read ( const char *  zonelistfile,
time_t  last_modified 
)

Read zonelist file.

Parameters:
[in]zonelistfilezonelist configuration file
[in]last_modifiedlast modified
Returns:
zonelist_type* zone list if reading was succesful, NULL otherwise

Read a zonelist file.

Definition at line 90 of file zonelist.c.

References zonelist_struct::last_modified, parse_file_check(), parse_zonelist_zones(), se_file_lastmodified(), se_log_assert, se_log_debug(), se_log_error(), and se_log_verbose().

Referenced by engine_update_zonelist().

void zonelist_unlock ( zonelist_type zonelist)

Unlock all zones in zone list.

Parameters:
[in]zonelistzone list

Lock all zones in zone list.

Definition at line 153 of file zonelist.c.

References lock_basic_unlock, se_log_assert, zone_struct::zone_lock, and zonelist_struct::zones.

Referenced by engine_update_zonelist().

void zonelist_update ( zonelist_type zl,
struct tasklist_struct tl,
const char *  cmd,
char *  buf 
)

Update zone list. /param[in] zl zone list /param[in] tl task list /param[in] cmd notify command /param[in] buf feedback message

Update zone list.

Definition at line 298 of file zonelist.c.

References zone_struct::just_added, zone_struct::just_updated, lock_basic_unlock, zone_struct::name, zone_struct::notify_ns, se_log_debug(), set_notify_ns(), zone_struct::task, task_cleanup(), tasklist_delete_task(), zone_struct::tobe_removed, zone_struct::zone_lock, and zonelist_struct::zones.

Referenced by engine_update_zonelist().