OpenDNSSEC-enforcer  2.1.7
Functions
zone_db_ext.c File Reference
#include "zone_db.h"
#include "db_error.h"
#include "log.h"
#include "policy.h"
#include <string.h>

Go to the source code of this file.

Functions

char * zone_db_ext_zonename_from_id (const db_connection_t *connection, const db_value_t *id)
 
key_data_list_tzone_db_get_keys (const zone_db_t *zone)
 
key_dependency_list_tzone_db_get_key_dependencies (const zone_db_t *zone)
 
int zone_db_create_from_xml (zone_db_t *zone, xmlNodePtr zone_node)
 
int zone_db_update_from_xml (zone_db_t *zone, xmlNodePtr zone_node, int *updated)
 

Function Documentation

◆ zone_db_create_from_xml()

int zone_db_create_from_xml ( zone_db_t zone,
xmlNodePtr  zone_node 
)

Create a zone object from XML.

Parameters
[in]zonea zone_db_t object being created.
[in]zone_nodea xmlNodePtr to the XML for the zone.
Returns
DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 532 of file zone_db_ext.c.

References DB_ERROR_UNKNOWN.

◆ zone_db_ext_zonename_from_id()

char* zone_db_ext_zonename_from_id ( const db_connection_t connection,
const db_value_t id 
)

Convert zone ID to name, caller must free resulting string. return NULL on error

Definition at line 39 of file zone_db_ext.c.

◆ zone_db_get_key_dependencies()

key_dependency_list_t* zone_db_get_key_dependencies ( const zone_db_t zone)

Get a list of key dependencies for an enforcer zone object.

Parameters
[in]zonean zone_db_t pointer.
Returns
a key_dependency_list_t pointer or NULL on error.

Definition at line 76 of file zone_db_ext.c.

References db_object_connection(), db_value_not_empty(), zone_db::dbo, zone_db::id, and key_dependency_list_new_get_by_zone_id().

Referenced by removeDeadKeysNow().

◆ zone_db_get_keys()

key_data_list_t* zone_db_get_keys ( const zone_db_t zone)

Get a list of keys for an enforcer zone object.

Parameters
[in]zonean zone_db_t pointer.
Returns
a key_data_list_t pointer or NULL on error.

Definition at line 56 of file zone_db_ext.c.

References db_object_connection(), db_value_not_empty(), zone_db::dbo, zone_db::id, and key_data_list_new_get_by_zone_id().

◆ zone_db_update_from_xml()

int zone_db_update_from_xml ( zone_db_t zone,
xmlNodePtr  zone_node,
int *  updated 
)

Update a zone object from XML.

Parameters
[in]zonea zone_db_t object being updated.
[in]zone_nodea xmlNodePtr to the XML for the zone.
[out]updatedan integer pointer that will be set to non-zero if any values in the zone was updated.
Returns
DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 543 of file zone_db_ext.c.

References DB_ERROR_UNKNOWN.