OpenDNSSEC-enforcer
2.1.9
|
Go to the source code of this file.
Copy the content of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | zone_copy | a zone_db_t pointer. |
Definition at line 365 of file zone_db.c.
References zone_db::associated_policy_id, DB_ERROR_UNKNOWN, DB_OK, db_value_copy(), zone_db::id, zone_db::input_adapter_type, zone_db::input_adapter_uri, zone_db::key_data_list, key_data_list_free(), key_data_list_new_copy(), zone_db::key_dependency_list, key_dependency_list_free(), key_dependency_list_new_copy(), zone_db::name, zone_db::next_change, zone_db::next_csk_roll, zone_db::next_ksk_roll, zone_db::next_zsk_roll, zone_db::output_adapter_type, zone_db::output_adapter_uri, policy_free(), zone_db::policy_id, policy_new_copy(), zone_db::private_policy_id, zone_db::rev, zone_db::roll_csk_now, zone_db::roll_ksk_now, zone_db::roll_zsk_now, zone_db::signconf_needs_writing, zone_db::signconf_path, zone_db::ttl_end_dk, zone_db::ttl_end_ds, and zone_db::ttl_end_rs.
Referenced by key_data_get_zone(), and zone_db_new_copy().
int zone_db_count | ( | zone_db_t * | zone, |
db_clause_list_t * | clause_list, | ||
size_t * | count | ||
) |
Count the number of zone objects in the database, if a selection of objects should be counted then it can be limited by a database clause list otherwise all objects are counted.
[in] | zone | a zone_db_t pointer. |
[in] | clause_list | a db_clause_list_t pointer or NULL if all objects. |
[out] | count | a size_t pointer to where the count should be stored. should be counted. |
int zone_db_create | ( | zone_db_t * | zone | ) |
int zone_db_delete | ( | zone_db_t * | zone | ) |
void zone_db_free | ( | zone_db_t * | zone | ) |
Delete a zone object, this does not delete it from the database.
[in] | zone | a zone_db_t pointer. |
Definition at line 325 of file zone_db.c.
References db_object_free(), db_value_reset(), zone_db::dbo, zone_db::id, zone_db::input_adapter_type, zone_db::input_adapter_uri, zone_db::key_data_list, key_data_list_free(), zone_db::key_dependency_list, key_dependency_list_free(), zone_db::name, zone_db::output_adapter_type, zone_db::output_adapter_uri, policy_free(), zone_db::policy_id, zone_db::private_policy_id, zone_db::rev, and zone_db::signconf_path.
Referenced by key_data_copy(), key_data_free(), key_data_get_zone(), key_dependency_copy(), key_dependency_free(), signconf_export_zone(), zone_db_new_copy(), zone_list_db_copy(), zone_list_db_free(), and zone_list_db_get().
int zone_db_from_result | ( | zone_db_t * | zone, |
const db_result_t * | result | ||
) |
int zone_db_get_by_id | ( | zone_db_t * | zone, |
const db_value_t * | id | ||
) |
Get a zone object from the database by a id specified in id
.
[in] | zone | a zone_db_t pointer. |
[in] | id | a db_value_t pointer. |
Definition at line 1466 of file zone_db.c.
Referenced by key_data_get_zone().
int zone_db_get_by_name | ( | zone_db_t * | zone, |
const char * | name | ||
) |
Get the policy_id object related to a zone object. The caller will be given ownership of this object and is responsible for freeing it.
[in] | zone | a zone_db_t pointer. |
Definition at line 744 of file zone_db.c.
References zone_db::associated_policy_id, db_object_connection(), db_value_not_empty(), zone_db::dbo, policy_copy(), policy_free(), policy_get_by_id(), policy_id(), zone_db::policy_id, policy_new(), and zone_db::private_policy_id.
Referenced by signconf_export_zone().
const db_value_t* zone_db_id | ( | const zone_db_t * | zone | ) |
Get the id of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 728 of file zone_db.c.
References zone_db::id.
const char* zone_db_input_adapter_type | ( | const zone_db_t * | zone | ) |
Get the input_adapter_type of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 862 of file zone_db.c.
References zone_db::input_adapter_type.
const char* zone_db_input_adapter_uri | ( | const zone_db_t * | zone | ) |
Get the input_adapter_uri of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 870 of file zone_db.c.
References zone_db::input_adapter_uri.
const char* zone_db_name | ( | const zone_db_t * | zone | ) |
Get the name of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 782 of file zone_db.c.
References zone_db::name.
zone_db_t* zone_db_new | ( | const db_connection_t * | connection | ) |
Create a new zone object.
[in] | connection | a db_connection_t pointer. |
Definition at line 287 of file zone_db.c.
Referenced by key_data_get_zone(), and zone_db_new_copy().
Create a new zone object that is a copy of another zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 306 of file zone_db.c.
References db_object_connection(), zone_db::dbo, zone_db_copy(), zone_db_free(), and zone_db_new().
Referenced by key_data_copy(), key_dependency_copy(), removeDeadKeysNow(), and zone_list_db_copy().
zone_db_t* zone_db_new_get_by_name | ( | const db_connection_t * | connection, |
const char * | name | ||
) |
Get a new zone object from the database by a name specified in name
.
[in] | connection | a db_connection_t pointer. |
[in] | name | a character pointer. |
Definition at line 1569 of file zone_db.c.
Referenced by signconf_export_zone().
int zone_db_next_change | ( | const zone_db_t * | zone | ) |
Get the next_change of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 806 of file zone_db.c.
References zone_db::next_change.
unsigned int zone_db_next_csk_roll | ( | const zone_db_t * | zone | ) |
Get the next_csk_roll of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 910 of file zone_db.c.
References zone_db::next_csk_roll.
unsigned int zone_db_next_ksk_roll | ( | const zone_db_t * | zone | ) |
Get the next_ksk_roll of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 894 of file zone_db.c.
References zone_db::next_ksk_roll.
unsigned int zone_db_next_zsk_roll | ( | const zone_db_t * | zone | ) |
Get the next_zsk_roll of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 902 of file zone_db.c.
References zone_db::next_zsk_roll.
const char* zone_db_output_adapter_type | ( | const zone_db_t * | zone | ) |
Get the output_adapter_type of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 878 of file zone_db.c.
References zone_db::output_adapter_type.
const char* zone_db_output_adapter_uri | ( | const zone_db_t * | zone | ) |
Get the output_adapter_uri of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 886 of file zone_db.c.
References zone_db::output_adapter_uri.
const db_value_t* zone_db_policy_id | ( | const zone_db_t * | zone | ) |
Get the policy_id of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 736 of file zone_db.c.
References zone_db::policy_id.
db_clause_t* zone_db_policy_id_clause | ( | db_clause_list_t * | clause_list, |
const db_value_t * | policy_id | ||
) |
Create a clause for policy_id of a zone object and add it to a database clause list. The clause operator is set to DB_CLAUSE_OPERATOR_AND and the clause type is set to DB_CLAUSE_EQUAL, if you want to change these you can do it with the returned db_clause_t pointer.
[in] | clause_list | db_clause_list_t pointer. |
[in] | policy_id | a db_value_t pointer. |
unsigned int zone_db_roll_csk_now | ( | const zone_db_t * | zone | ) |
Get the roll_csk_now of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 854 of file zone_db.c.
References zone_db::roll_csk_now.
unsigned int zone_db_roll_ksk_now | ( | const zone_db_t * | zone | ) |
Get the roll_ksk_now of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 838 of file zone_db.c.
References zone_db::roll_ksk_now.
unsigned int zone_db_roll_zsk_now | ( | const zone_db_t * | zone | ) |
Get the roll_zsk_now of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 846 of file zone_db.c.
References zone_db::roll_zsk_now.
int zone_db_set_input_adapter_type | ( | zone_db_t * | zone, |
const char * | input_adapter_type_text | ||
) |
Set the input_adapter_type of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | input_adapter_type_text | a character pointer. |
Definition at line 1061 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::input_adapter_type.
int zone_db_set_input_adapter_uri | ( | zone_db_t * | zone, |
const char * | input_adapter_uri_text | ||
) |
Set the input_adapter_uri of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | input_adapter_uri_text | a character pointer. |
Definition at line 1083 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::input_adapter_uri.
int zone_db_set_name | ( | zone_db_t * | zone, |
const char * | name_text | ||
) |
Set the name of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | name_text | a character pointer. |
Definition at line 937 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::name.
int zone_db_set_next_change | ( | zone_db_t * | zone, |
int | next_change | ||
) |
Set the next_change of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | next_change | an integer. |
Definition at line 991 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::next_change.
int zone_db_set_next_csk_roll | ( | zone_db_t * | zone, |
unsigned int | next_csk_roll | ||
) |
Set the next_csk_roll of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | next_csk_roll | an unsigned integer. |
Definition at line 1169 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::next_csk_roll.
int zone_db_set_next_ksk_roll | ( | zone_db_t * | zone, |
unsigned int | next_ksk_roll | ||
) |
Set the next_ksk_roll of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | next_ksk_roll | an unsigned integer. |
Definition at line 1149 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::next_ksk_roll.
int zone_db_set_next_zsk_roll | ( | zone_db_t * | zone, |
unsigned int | next_zsk_roll | ||
) |
Set the next_zsk_roll of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | next_zsk_roll | an unsigned integer. |
Definition at line 1159 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::next_zsk_roll.
int zone_db_set_output_adapter_type | ( | zone_db_t * | zone, |
const char * | output_adapter_type_text | ||
) |
Set the output_adapter_type of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | output_adapter_type_text | a character pointer. |
Definition at line 1105 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::output_adapter_type.
int zone_db_set_output_adapter_uri | ( | zone_db_t * | zone, |
const char * | output_adapter_uri_text | ||
) |
Set the output_adapter_uri of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | output_adapter_uri_text | a character pointer. |
Definition at line 1127 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::output_adapter_uri.
int zone_db_set_policy_id | ( | zone_db_t * | zone, |
const db_value_t * | policy_id | ||
) |
Set the policy_id of a zone object. If this fails the original value may have been lost.
[in] | zone | a zone_db_t pointer. |
[in] | policy_id | a db_value_t pointer. |
Definition at line 918 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, db_value_copy(), db_value_not_empty(), db_value_reset(), policy_id(), and zone_db::policy_id.
int zone_db_set_roll_csk_now | ( | zone_db_t * | zone, |
unsigned int | roll_csk_now | ||
) |
Set the roll_csk_now of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | roll_csk_now | an unsigned integer. |
Definition at line 1051 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::roll_csk_now.
int zone_db_set_roll_ksk_now | ( | zone_db_t * | zone, |
unsigned int | roll_ksk_now | ||
) |
Set the roll_ksk_now of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | roll_ksk_now | an unsigned integer. |
Definition at line 1031 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::roll_ksk_now.
int zone_db_set_roll_zsk_now | ( | zone_db_t * | zone, |
unsigned int | roll_zsk_now | ||
) |
Set the roll_zsk_now of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | roll_zsk_now | an unsigned integer. |
Definition at line 1041 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::roll_zsk_now.
int zone_db_set_signconf_needs_writing | ( | zone_db_t * | zone, |
unsigned int | signconf_needs_writing | ||
) |
Set the signconf_needs_writing of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | signconf_needs_writing | an unsigned integer. |
Definition at line 959 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::signconf_needs_writing.
int zone_db_set_signconf_path | ( | zone_db_t * | zone, |
const char * | signconf_path_text | ||
) |
Set the signconf_path of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | signconf_path_text | a character pointer. |
Definition at line 969 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::signconf_path.
int zone_db_set_ttl_end_dk | ( | zone_db_t * | zone, |
unsigned int | ttl_end_dk | ||
) |
Set the ttl_end_dk of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | ttl_end_dk | an unsigned integer. |
Definition at line 1011 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::ttl_end_dk.
int zone_db_set_ttl_end_ds | ( | zone_db_t * | zone, |
unsigned int | ttl_end_ds | ||
) |
Set the ttl_end_ds of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | ttl_end_ds | an unsigned integer. |
Definition at line 1001 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::ttl_end_ds.
int zone_db_set_ttl_end_rs | ( | zone_db_t * | zone, |
unsigned int | ttl_end_rs | ||
) |
Set the ttl_end_rs of a zone object.
[in] | zone | a zone_db_t pointer. |
[in] | ttl_end_rs | an unsigned integer. |
Definition at line 1021 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_db::ttl_end_rs.
unsigned int zone_db_signconf_needs_writing | ( | const zone_db_t * | zone | ) |
Get the signconf_needs_writing of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 790 of file zone_db.c.
References zone_db::signconf_needs_writing.
const char* zone_db_signconf_path | ( | const zone_db_t * | zone | ) |
Get the signconf_path of a zone object.
[in] | zone | a zone_db_t pointer. |
Definition at line 798 of file zone_db.c.
References zone_db::signconf_path.
unsigned int zone_db_ttl_end_dk | ( | const zone_db_t * | zone | ) |
Get the ttl_end_dk of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 822 of file zone_db.c.
References zone_db::ttl_end_dk.
unsigned int zone_db_ttl_end_ds | ( | const zone_db_t * | zone | ) |
Get the ttl_end_ds of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 814 of file zone_db.c.
References zone_db::ttl_end_ds.
unsigned int zone_db_ttl_end_rs | ( | const zone_db_t * | zone | ) |
Get the ttl_end_rs of a zone object. Undefined behavior if zone
is NULL.
[in] | zone | a zone_db_t pointer. |
Definition at line 830 of file zone_db.c.
References zone_db::ttl_end_rs.
int zone_db_update | ( | zone_db_t * | zone | ) |
const zone_db_t* zone_list_db_begin | ( | zone_list_db_t * | zone_list_db | ) |
Get the first zone object in a zone object list and reset the position of the list.
[in] | zone_list_db | a zone_list_db_t pointer. |
int zone_list_db_copy | ( | zone_list_db_t * | zone_list_db, |
const zone_list_db_t * | from_zone_list_db | ||
) |
Copy the content of another zone object list.
[in] | zone_list_db | a zone_list_db_t pointer. |
[in] | from_zone_list_db | a zone_list_db_t pointer. |
Definition at line 2017 of file zone_db.c.
References zone_list_db::associated_fetch, DB_ERROR_UNKNOWN, DB_OK, db_result_list_free(), db_result_list_new_copy(), zone_list_db::object_list, zone_list_db::object_list_first, zone_list_db::object_list_position, zone_list_db::object_list_size, zone_list_db::object_store, zone_list_db::policy_id_list, policy_list_new_copy(), zone_list_db::result_list, zone_db_free(), and zone_db_new_copy().
Referenced by zone_list_db_new_copy().
void zone_list_db_free | ( | zone_list_db_t * | zone_list_db | ) |
Delete a zone object list.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 1989 of file zone_db.c.
References db_object_free(), db_result_list_free(), zone_list_db::dbo, zone_list_db::object_list, zone_list_db::object_list_size, zone_list_db::policy_id_list, policy_list_free(), zone_list_db::result_list, zone_list_db::zone, and zone_db_free().
Referenced by key_data_list_free(), key_dependency_list_free(), policy_copy(), policy_free(), and zone_list_db_new_copy().
int zone_list_db_get | ( | zone_list_db_t * | zone_list_db | ) |
Get all zone objects.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 2363 of file zone_db.c.
References zone_list_db::associated_fetch, DB_ERROR_UNKNOWN, db_object_read(), db_result_list_fetch_all(), db_result_list_free(), zone_list_db::dbo, zone_list_db::object_list, zone_list_db::object_list_first, zone_list_db::object_list_size, zone_list_db::result_list, and zone_db_free().
int zone_list_db_get_by_clauses | ( | zone_list_db_t * | zone_list_db, |
const db_clause_list_t * | clause_list | ||
) |
Get zone objects from the database by a clause list.
[in] | zone_list_db | a zone_list_db_t pointer. |
[in] | clause_list | a db_clause_list_t pointer. |
int zone_list_db_get_by_policy_id | ( | zone_list_db_t * | zone_list_db, |
const db_value_t * | policy_id | ||
) |
Get zone objects from the database by a policy_id specified in policy_id
.
[in] | zone_list_db | a zone_list_db_t pointer. |
[in] | policy_id | a db_value_t pointer. |
zone_db_t* zone_list_db_get_next | ( | zone_list_db_t * | zone_list_db | ) |
Get the next zone object in a zone object list. The caller will be given ownership of this object and is responsible for freeing it.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 2669 of file zone_db.c.
Referenced by removeDeadKeysNow().
zone_list_db_t* zone_list_db_new | ( | const db_connection_t * | connection | ) |
Create a new zone object list.
[in] | connection | a db_connection_t pointer. |
Definition at line 1946 of file zone_db.c.
Referenced by zone_list_db_new_copy().
zone_list_db_t* zone_list_db_new_copy | ( | const zone_list_db_t * | zone_copy | ) |
Create a new zone object list that is a copy of another.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 1960 of file zone_db.c.
References db_object_connection(), zone_list_db::dbo, zone_list_db_copy(), zone_list_db_free(), and zone_list_db_new().
Referenced by key_data_list_copy(), key_dependency_list_copy(), and policy_copy().
zone_list_db_t* zone_list_db_new_get | ( | const db_connection_t * | connection | ) |
zone_list_db_t* zone_list_db_new_get_by_policy_id | ( | const db_connection_t * | connection, |
const db_value_t * | policy_id | ||
) |
const zone_db_t* zone_list_db_next | ( | zone_list_db_t * | zone_list_db | ) |
Get the next zone object in a zone object list. Ownership of this object is retained within the list and the object is only valid until the next call to this function.
[in] | zone_list_db | a zone_list_db_t pointer. |
int zone_list_db_object_store | ( | zone_list_db_t * | zone_list_db | ) |
Specify that objects should be stored within the list as they are fetch, this is optimal if the list is to be iterated over more then once.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 1979 of file zone_db.c.
References DB_ERROR_UNKNOWN, DB_OK, and zone_list_db::object_store.
size_t zone_list_db_size | ( | zone_list_db_t * | zone_list_db | ) |
Get the size of a zone object list.
[in] | zone_list_db | a zone_list_db_t pointer. |
Definition at line 2705 of file zone_db.c.
References db_result_list_size(), zone_list_db::object_list, zone_list_db::object_list_size, zone_list_db::object_store, and zone_list_db::result_list.
Referenced by removeDeadKeysNow().