OpenDNSSEC-signer  1.4.8.2
Data Structures | Typedefs | Functions
zonelist.h File Reference
#include "shared/allocator.h"
#include "shared/locks.h"
#include "signer/zone.h"
#include <ldns/ldns.h>
#include <stdio.h>
#include <time.h>
Include dependency graph for zonelist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zonelist_struct
 

Typedefs

typedef struct zonelist_struct zonelist_type
 

Functions

zonelist_typezonelist_create (allocator_type *allocator)
 
zone_typezonelist_lookup_zone_by_name (zonelist_type *zonelist, const char *name, ldns_rr_class klass)
 
zone_typezonelist_lookup_zone_by_dname (zonelist_type *zonelist, ldns_rdf *dname, ldns_rr_class klass)
 
zone_typezonelist_add_zone (zonelist_type *zl, zone_type *zone)
 
zone_typezonelist_del_zone (zonelist_type *zlist, zone_type *zone)
 
ods_status zonelist_update (zonelist_type *zl, const char *zlfile)
 
void zonelist_cleanup (zonelist_type *zl)
 
void zonelist_free (zonelist_type *zl)
 

Typedef Documentation

The zonelist and all. Zone list

Definition at line 47 of file zonelist.h.

Function Documentation

zone_type* zonelist_add_zone ( zonelist_type zlist,
zone_type zone 
)

Add zone.

Parameters
[in]zlzone list
[in]zonezone
Returns
zone_type* added zone

Add zone.

Definition at line 205 of file zonelist.c.

References zonelist_struct::just_added, zone_struct::name, ods_log_error(), ods_log_warning(), zone_struct::zl_status, zone_cleanup(), ZONE_ZL_ADDED, and zonelist_struct::zones.

Referenced by parse_zonelist_zones().

void zonelist_cleanup ( zonelist_type zl)

Clean up zone list.

Parameters
[in]zlzone list

Clean up a zonelist.

Definition at line 446 of file zonelist.c.

References zonelist_struct::allocator, allocator_deallocate(), lock_basic_destroy, ods_log_debug(), zonelist_struct::zl_lock, and zonelist_struct::zones.

Referenced by engine_cleanup().

zonelist_type* zonelist_create ( allocator_type allocator)

Create zone list.

Parameters
[in]allocatormemory allocator
Returns
zonelist_type* created zone list

Create a new zone list.

Definition at line 75 of file zonelist.c.

References zonelist_struct::allocator, allocator_alloc(), allocator_deallocate(), zonelist_struct::last_modified, lock_basic_init, ods_log_error(), zonelist_struct::zl_lock, and zonelist_struct::zones.

Referenced by zonelist_update().

zone_type* zonelist_del_zone ( zonelist_type zlist,
zone_type zone 
)

Delete zone.

Parameters
[in]zlzone list
[in]zonezone
Returns
zone_type* deleted zone

Delete zone.

Definition at line 242 of file zonelist.c.

References zone_struct::name, ods_log_warning(), and zonelist_struct::zones.

Referenced by engine_update_zones().

void zonelist_free ( zonelist_type zl)

Free zone list.

Parameters
[in]zlzone list

Free zonelist.

Definition at line 472 of file zonelist.c.

References zonelist_struct::allocator, allocator_deallocate(), lock_basic_destroy, zonelist_struct::zl_lock, and zonelist_struct::zones.

Referenced by zonelist_update().

zone_type* zonelist_lookup_zone_by_dname ( zonelist_type zonelist,
ldns_rdf *  dname,
ldns_rr_class  klass 
)

Lookup zone by dname and class.

Parameters
[in]zlzone list
[in]dnamezone domain name
[in]klasszone class
Returns
zone_type* found zone

Lookup zone by dname.

Definition at line 186 of file zonelist.c.

References zonelist_lookup_zone_by_name(), and zonelist_struct::zones.

Referenced by query_process().

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

Lookup zone by name and class.

Parameters
[in]zlzone list
[in]namezone name
[in]klasszone class
Returns
zone_type* found zone

Lookup zone by name.

Definition at line 161 of file zonelist.c.

References ods_log_error(), zone_cleanup(), zone_create(), and zonelist_struct::zones.

Referenced by zonelist_lookup_zone_by_dname().

ods_status zonelist_update ( zonelist_type zl,
const char *  zlfile 
)