policy.c File Reference
`#include "policy.h"`
`#include "db_error.h"`
`#include <string.h>`

Go to the source code of this file.

## Functions

policy_t * | policy_new (const db_connection_t *connection)
policy_t * | policy_new_copy (const policy_t *policy)
void | policy_free (policy_t *policy)
int | policy_copy (policy_t *policy, const policy_t *policy_copy)
int | policy_from_result (policy_t *policy, const db_result_t *result)
const db_value_t * | policy_id (const policy_t *policy)
const char * | policy_name (const policy_t *policy)
const char * | policy_description (const policy_t *policy)
unsigned int | policy_signatures_resign (const policy_t *policy)
unsigned int | policy_signatures_refresh (const policy_t *policy)
unsigned int | policy_signatures_jitter (const policy_t *policy)
unsigned int | policy_signatures_inception_offset (const policy_t *policy)
unsigned int | policy_signatures_validity_default (const policy_t *policy)
unsigned int | policy_signatures_validity_denial (const policy_t *policy)
unsigned int | policy_signatures_validity_keyset (const policy_t *policy)
unsigned int | policy_signatures_max_zone_ttl (const policy_t *policy)
policy_denial_type_t | policy_denial_type (const policy_t *policy)
unsigned int | policy_denial_optout (const policy_t *policy)
unsigned int | policy_denial_ttl (const policy_t *policy)
unsigned int | policy_denial_resalt (const policy_t *policy)
unsigned int | policy_denial_algorithm (const policy_t *policy)
unsigned int | policy_denial_iterations (const policy_t *policy)
unsigned int | policy_denial_salt_length (const policy_t *policy)
const char * | policy_denial_salt (const policy_t *policy)
unsigned int | policy_denial_salt_last_change (const policy_t *policy)
unsigned int | policy_keys_ttl (const policy_t *policy)
unsigned int | policy_keys_retire_safety (const policy_t *policy)
unsigned int | policy_keys_publish_safety (const policy_t *policy)
unsigned int | policy_keys_shared (const policy_t *policy)
unsigned int | policy_keys_purge_after (const policy_t *policy)
unsigned int | policy_zone_propagation_delay (const policy_t *policy)
unsigned int | policy_zone_soa_ttl (const policy_t *policy)
unsigned int | policy_zone_soa_minimum (const policy_t *policy)
const char * | policy_zone_soa_serial_text (const policy_t *policy)
unsigned int | policy_parent_registration_delay (const policy_t *policy)
unsigned int | policy_parent_propagation_delay (const policy_t *policy)
unsigned int | policy_parent_ds_ttl (const policy_t *policy)
unsigned int | policy_parent_soa_ttl (const policy_t *policy)
unsigned int | policy_parent_soa_minimum (const policy_t *policy)
unsigned int | policy_passthrough (const policy_t *policy)
zone_list_db_t * | policy_zone_list (policy_t *policy)
int | policy_retrieve_zone_list (policy_t *policy)
int | policy_set_name (policy_t *policy, const char *name_text)
int | policy_set_description (policy_t *policy, const char *description_text)
int | policy_set_signatures_resign (policy_t *policy, unsigned int signatures_resign)
int | policy_set_signatures_refresh (policy_t *policy, unsigned int signatures_refresh)
int | policy_set_signatures_jitter (policy_t *policy, unsigned int signatures_jitter)
int | policy_set_signatures_inception_offset (policy_t *policy, unsigned int signatures_inception_offset)
int | policy_set_signatures_validity_default (policy_t *policy, unsigned int signatures_validity_default)
int | policy_set_signatures_validity_denial (policy_t *policy, unsigned int signatures_validity_denial)
int | policy_set_signatures_validity_keyset (policy_t *policy, unsigned int signatures_validity_keyset)
int | policy_set_signatures_max_zone_ttl (policy_t *policy, unsigned int signatures_max_zone_ttl)
int | policy_set_denial_type (policy_t *policy, policy_denial_type_t denial_type)
int | policy_set_denial_optout (policy_t *policy, unsigned int denial_optout)
int | policy_set_denial_ttl (policy_t *policy, unsigned int denial_ttl)
int | policy_set_denial_resalt (policy_t *policy, unsigned int denial_resalt)
int | policy_set_denial_algorithm (policy_t *policy, unsigned int denial_algorithm)
int | policy_set_denial_iterations (policy_t *policy, unsigned int denial_iterations)
int | policy_set_denial_salt_length (policy_t *policy, unsigned int denial_salt_length)
int | policy_set_denial_salt (policy_t *policy, const char *denial_salt_text)
int | policy_set_denial_salt_last_change (policy_t *policy, unsigned int denial_salt_last_change)
int | policy_set_keys_ttl (policy_t *policy, unsigned int keys_ttl)
int | policy_set_keys_retire_safety (policy_t *policy, unsigned int keys_retire_safety)
int | policy_set_keys_publish_safety (policy_t *policy, unsigned int keys_publish_safety)
int | policy_set_keys_shared (policy_t *policy, unsigned int keys_shared)
int | policy_set_keys_purge_after (policy_t *policy, unsigned int keys_purge_after)
int | policy_set_zone_propagation_delay (policy_t *policy, unsigned int zone_propagation_delay)
int | policy_set_zone_soa_ttl (policy_t *policy, unsigned int zone_soa_ttl)
int | policy_set_zone_soa_minimum (policy_t *policy, unsigned int zone_soa_minimum)
int | policy_set_zone_soa_serial_text (policy_t *policy, const char *zone_soa_serial)
int | policy_set_parent_registration_delay (policy_t *policy, unsigned int parent_registration_delay)
int | policy_set_parent_propagation_delay (policy_t *policy, unsigned int parent_propagation_delay)
int | policy_set_parent_ds_ttl (policy_t *policy, unsigned int parent_ds_ttl)
int | policy_set_parent_soa_ttl (policy_t *policy, unsigned int parent_soa_ttl)
int | policy_set_parent_soa_minimum (policy_t *policy, unsigned int parent_soa_minimum)
int | policy_set_passthrough (policy_t *policy, unsigned int passthrough)
db_clause_t * | policy_denial_type_clause (db_clause_list_t *clause_list, policy_denial_type_t denial_type)
int | policy_create (policy_t *policy)
int | policy_get_by_id (policy_t *policy, const db_value_t *id)
int | policy_get_by_name (policy_t *policy, const char *name)
policy_t * | policy_new_get_by_name (const db_connection_t *connection, const char *name)
int | policy_update (policy_t *policy)
int | policy_delete (policy_t *policy)
policy_list_t * | policy_list_new (const db_connection_t *connection)
policy_list_t * | policy_list_new_copy (const policy_list_t *from_policy_list)
int | policy_list_object_store (policy_list_t *policy_list)
void | policy_list_free (policy_list_t *policy_list)
int | policy_list_copy (policy_list_t *policy_list, const policy_list_t *from_policy_list)
int | policy_list_get (policy_list_t *policy_list)
policy_list_t * | policy_list_new_get (const db_connection_t *connection)
int | policy_list_get_by_clauses (policy_list_t *policy_list, const db_clause_list_t *clause_list)
policy_list_t * | policy_list_new_get_by_clauses (const db_connection_t *connection, const db_clause_list_t *clause_list)
const policy_t * | policy_list_begin (policy_list_t *policy_list)
const policy_t * | policy_list_next (policy_list_t *policy_list)
policy_t * | policy_list_get_next (policy_list_t *policy_list)

## Variables

const db_enum_t | policy_enum_set_denial_type []
const db_enum_t | policy_enum_set_zone_soa_serial []

## Function Documentation

## policy_copy()

int policy_copy | ( | policy_t * | policy,
|  | const policy_t * | policy_copy
| ) |  |

Copy the content of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | policy_copy | a policy_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 547 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, db_value_copy(), policy::denial_algorithm, policy::denial_iterations, policy::denial_optout, policy::denial_resalt, policy::denial_salt, policy::denial_salt_last_change, policy::denial_salt_length, policy::denial_ttl, policy::denial_type, policy::description, policy::hsm_key_list, hsm_key_list_free(), hsm_key_list_new_copy(), policy::id, policy::keys_publish_safety, policy::keys_purge_after, policy::keys_retire_safety, policy::keys_shared, policy::keys_ttl, policy::name, policy::parent_ds_ttl, policy::parent_propagation_delay, policy::parent_registration_delay, policy::parent_soa_minimum, policy::parent_soa_ttl, policy::passthrough, policy::policy_key_list, policy_key_list_free(), policy_key_list_new_copy(), policy::rev, policy::signatures_inception_offset, policy::signatures_jitter, policy::signatures_max_zone_ttl, policy::signatures_refresh, policy::signatures_resign, policy::signatures_validity_default, policy::signatures_validity_denial, policy::signatures_validity_keyset, policy::zone_list, zone_list_db_free(), zone_list_db_new_copy(), policy::zone_propagation_delay, policy::zone_soa_minimum, policy::zone_soa_serial, and policy::zone_soa_ttl.

Referenced by policy_new_copy(), and zone_db_get_policy().

## policy_create()

int policy_create | ( | policy_t * | policy | ) |

Create a policy object in the database.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1561 of file policy.c.

## policy_delete()

int policy_delete | ( | policy_t * | policy | ) |

Delete a policy object from the database.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 2571 of file policy.c.

## policy_denial_algorithm()

unsigned int policy_denial_algorithm | ( | const policy_t * | policy | ) |

Get the denial_algorithm of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 925 of file policy.c.

References policy::denial_algorithm.

## policy_denial_iterations()

unsigned int policy_denial_iterations | ( | const policy_t * | policy | ) |

Get the denial_iterations of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 933 of file policy.c.

References policy::denial_iterations.

## policy_denial_optout()

unsigned int policy_denial_optout | ( | const policy_t * | policy | ) |

Get the denial_optout of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 901 of file policy.c.

References policy::denial_optout.

## policy_denial_resalt()

unsigned int policy_denial_resalt | ( | const policy_t * | policy | ) |

Get the denial_resalt of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 917 of file policy.c.

References policy::denial_resalt.

## policy_denial_salt()

const char* policy_denial_salt | ( | const policy_t * | policy | ) |

Get the denial_salt of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a character pointer or NULL on error or if no denial_salt has been set.

Definition at line 949 of file policy.c.

References policy::denial_salt.

## policy_denial_salt_last_change()

unsigned int policy_denial_salt_last_change | ( | const policy_t * | policy | ) |

Get the denial_salt_last_change of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 957 of file policy.c.

References policy::denial_salt_last_change.

## policy_denial_salt_length()

unsigned int policy_denial_salt_length | ( | const policy_t * | policy | ) |

Get the denial_salt_length of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 941 of file policy.c.

References policy::denial_salt_length.

## policy_denial_ttl()

unsigned int policy_denial_ttl | ( | const policy_t * | policy | ) |

Get the denial_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 909 of file policy.c.

References policy::denial_ttl.

## policy_denial_type()

policy_denial_type_t policy_denial_type | ( | const policy_t * | policy | ) |

Get the denial_type of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a policy_denial_type_t which may be POLICY_DENIAL_TYPE_INVALID on error or if no denial_type has been set.

Definition at line 893 of file policy.c.

References policy::denial_type, and POLICY_DENIAL_TYPE_INVALID.

## policy_denial_type_clause()

db_clause_t* policy_denial_type_clause | ( | db_clause_list_t * | clause_list,
|  | policy_denial_type_t | denial_type
| ) |  |

Create a clause for denial_type of a policy 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.

Parameters

  [in] | clause_list | db_clause_list_t pointer.
  [in] | denial_type | a policy_denial_type_t.

Returns
  a db_clause_t pointer to the added clause or NULL on error.

Definition at line 1540 of file policy.c.

## policy_description()

const char* policy_description | ( | const policy_t * | policy | ) |

Get the description of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a character pointer or NULL on error or if no description has been set.

Definition at line 821 of file policy.c.

References policy::description.

## policy_free()

void policy_free | ( | policy_t * | policy | ) |

Delete a policy object, this does not delete it from the database.

Parameters

  [in] | policy | a policy_t pointer.

Definition at line 518 of file policy.c.

References db_object_free(), db_value_reset(), policy::dbo, policy::denial_salt, policy::description, policy::hsm_key_list, hsm_key_list_free(), policy::id, policy::name, policy::policy_key_list, policy_key_list_free(), policy::rev, policy::zone_list, and zone_list_db_free().

Referenced by hsm_key_copy(), hsm_key_free(), policy_key_copy(), policy_key_free(), policy_key_reset(), policy_list_copy(), policy_list_free(), policy_list_get(), policy_new_copy(), policy_new_get_by_name(), zone_db_copy(), zone_db_free(), and zone_db_get_policy().

## policy_from_result()

int policy_from_result | ( | policy_t * | policy,
|  | const db_result_t * | result
| ) |  |

Set the content of a policy object based on a database result.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | result | a db_result_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 707 of file policy.c.

## policy_get_by_id()

int policy_get_by_id | ( | policy_t * | policy,
|  | const db_value_t * | id
| ) |  |

Get a policy object from the database by a id specified in `id`.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | id | a db_value_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1987 of file policy.c.

Referenced by zone_db_get_policy().

## policy_get_by_name()

int policy_get_by_name | ( | policy_t * | policy,
|  | const char * | name
| ) |  |

Get a policy object from the database by a name specified in `name`.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | name | a character pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 2040 of file policy.c.

Referenced by policy_new_get_by_name().

## policy_id()

const db_value_t* policy_id | ( | const policy_t * | policy | ) |

Get the id of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a db_value_t pointer or NULL on error.

Definition at line 805 of file policy.c.

References policy::id.

Referenced by enforce_task_flush_policy(), and zone_db_get_policy().

## policy_keys_publish_safety()

unsigned int policy_keys_publish_safety | ( | const policy_t * | policy | ) |

Get the keys_publish_safety of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 981 of file policy.c.

References policy::keys_publish_safety.

## policy_keys_purge_after()

unsigned int policy_keys_purge_after | ( | const policy_t * | policy | ) |

Get the keys_purge_after of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 997 of file policy.c.

References policy::keys_purge_after.

## policy_keys_retire_safety()

unsigned int policy_keys_retire_safety | ( | const policy_t * | policy | ) |

Get the keys_retire_safety of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 973 of file policy.c.

References policy::keys_retire_safety.

## policy_keys_shared()

unsigned int policy_keys_shared | ( | const policy_t * | policy | ) |

Get the keys_shared of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 989 of file policy.c.

References policy::keys_shared.

## policy_keys_ttl()

unsigned int policy_keys_ttl | ( | const policy_t * | policy | ) |

Get the keys_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 965 of file policy.c.

References policy::keys_ttl.

## policy_list_begin()

const policy_t* policy_list_begin | ( | policy_list_t * | policy_list | ) |

Get the first policy object in a policy object list and reset the position of the list.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  a policy_t pointer or NULL on error or if there are no policy objects in the policy object list.

Definition at line 3158 of file policy.c.

## policy_list_copy()

int policy_list_copy | ( | policy_list_t * | policy_list,
|  | const policy_list_t * | from_policy_list
| ) |  |

Copy the content of another policy object list.

Parameters

  [in] | policy_list | a policy_list_t pointer.
  [in] | from_policy_list | a policy_list_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 2689 of file policy.c.

References policy_list::associated_fetch, DB_ERROR_UNKNOWN, DB_OK, db_result_list_free(), db_result_list_new_copy(), policy_list::object_list, policy_list::object_list_first, policy_list::object_list_position, policy_list::object_list_size, policy_list::object_store, policy_free(), policy_new_copy(), and policy_list::result_list.

Referenced by policy_list_new_copy().

## policy_list_free()

void policy_list_free | ( | policy_list_t * | policy_list | ) |

Delete a policy object list.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Definition at line 2664 of file policy.c.

References db_object_free(), db_result_list_free(), policy_list::dbo, policy_list::object_list, policy_list::object_list_size, policy_list::policy, policy_free(), and policy_list::result_list.

Referenced by hsm_key_list_free(), policy_key_list_free(), policy_list_new_copy(), policy_list_new_get(), and zone_list_db_free().

## policy_list_get()

int policy_list_get | ( | policy_list_t * | policy_list | ) |

Get all policy objects.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 3040 of file policy.c.

References policy_list::associated_fetch, DB_ERROR_UNKNOWN, db_object_read(), db_result_list_fetch_all(), db_result_list_free(), policy_list::dbo, policy_list::object_list, policy_list::object_list_first, policy_list::object_list_size, policy_free(), and policy_list::result_list.

Referenced by flush_resalt_task_all(), and policy_list_new_get().

## policy_list_get_by_clauses()

int policy_list_get_by_clauses | ( | policy_list_t * | policy_list,
|  | const db_clause_list_t * | clause_list
| ) |  |

Get policy objects from the database by a clause list.

Parameters

  [in] | policy_list | a policy_list_t pointer.
  [in] | clause_list | a db_clause_list_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 3096 of file policy.c.

## policy_list_get_next()

policy_t* policy_list_get_next | ( | policy_list_t * | policy_list | ) |

Get the next policy object in a policy object list. The caller will be given ownership of this object and is responsible for freeing it.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  a policy_t pointer or NULL on error or if there are no more policy objects in the policy object list.

Definition at line 3280 of file policy.c.

## policy_list_new()

policy_list_t* policy_list_new | ( | const db_connection_t * | connection | ) |

Create a new policy object list.

Parameters

  [in] | connection | a db_connection_t pointer.

Returns
  a policy_list_t pointer or NULL on error.

Definition at line 2621 of file policy.c.

References policy_list::dbo.

Referenced by flush_resalt_task_all(), policy_list_new_copy(), and policy_list_new_get().

## policy_list_new_copy()

policy_list_t* policy_list_new_copy | ( | const policy_list_t * | policy_copy | ) |

Create a new policy object list that is a copy of another.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  a policy_list_t pointer or NULL on error.

Definition at line 2635 of file policy.c.

References db_object_connection(), policy_list::dbo, policy_list_copy(), policy_list_free(), and policy_list_new().

Referenced by hsm_key_list_copy(), policy_key_list_copy(), and zone_list_db_copy().

## policy_list_new_get()

policy_list_t* policy_list_new_get | ( | const db_connection_t * | connection | ) |

Get a new list with all policy objects.

Parameters

  [in] | connection | a db_connection_t pointer.

Returns
  a policy_list_t pointer or NULL on error.

Definition at line 3079 of file policy.c.

References policy_list_free(), policy_list_get(), and policy_list_new().

## policy_list_new_get_by_clauses()

policy_list_t* policy_list_new_get_by_clauses | ( | const db_connection_t * | connection,
|  | const db_clause_list_t * | clause_list
| ) |  |

Get a new list of policy objects from the database by a clause list.

Parameters

  [in] | connection | a db_connection_t pointer.
  [in] | clause_list | a db_clause_list_t pointer.

Returns
  a policy_list_t pointer or NULL on error.

Definition at line 3138 of file policy.c.

## policy_list_next()

const policy_t* policy_list_next | ( | policy_list_t * | policy_list | ) |

Get the next policy object in a policy object list. Ownership of this object is retained within the list and the object is only valid until the next call to this function.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  a policy_t pointer or NULL on error or if there are no more policy objects in the policy object list.

Definition at line 3214 of file policy.c.

## policy_list_object_store()

int policy_list_object_store | ( | policy_list_t * | policy_list | ) |

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.

Parameters

  [in] | policy_list | a policy_list_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 2654 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy_list::object_store.

## policy_name()

const char* policy_name | ( | const policy_t * | policy | ) |

Get the name of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a character pointer or NULL on error or if no name has been set.

Definition at line 813 of file policy.c.

References policy::name.

Referenced by check_zonelist(), and removeDeadKeysNow().

## policy_new()

policy_t* policy_new | ( | const db_connection_t * | connection | ) |

Create a new policy object.

Parameters

  [in] | connection | a db_connection_t pointer.

Returns
  a policy_t pointer or NULL on error.

Definition at line 479 of file policy.c.

References policy::dbo.

Referenced by policy_new_copy(), policy_new_get_by_name(), and zone_db_get_policy().

## policy_new_copy()

policy_t* policy_new_copy | ( | const policy_t * | policy | ) |

Create a new policy object that is a copy of another policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a policy_t pointer or NULL on error.

Definition at line 499 of file policy.c.

References db_object_connection(), policy::dbo, policy_copy(), policy_free(), and policy_new().

Referenced by hsm_key_copy(), hsm_key_factory_schedule_generate_policy(), policy_key_copy(), policy_list_copy(), and zone_db_copy().

## policy_new_get_by_name()

policy_t* policy_new_get_by_name | ( | const db_connection_t * | connection,
|  | const char * | name
| ) |  |

Get a new policy object from the database by a name specified in `name`.

Parameters

  [in] | connection | a db_connection_t pointer.
  [in] | name | a character pointer.

Returns
  a policy_t pointer or NULL on error or if it does not exist.

Definition at line 2090 of file policy.c.

References policy_free(), policy_get_by_name(), and policy_new().

## policy_parent_ds_ttl()

unsigned int policy_parent_ds_ttl | ( | const policy_t * | policy | ) |

Get the parent_ds_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1061 of file policy.c.

References policy::parent_ds_ttl.

## policy_parent_propagation_delay()

unsigned int policy_parent_propagation_delay | ( | const policy_t * | policy | ) |

Get the parent_propagation_delay of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1053 of file policy.c.

References policy::parent_propagation_delay.

## policy_parent_registration_delay()

unsigned int policy_parent_registration_delay | ( | const policy_t * | policy | ) |

Get the parent_registration_delay of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1045 of file policy.c.

References policy::parent_registration_delay.

## policy_parent_soa_minimum()

unsigned int policy_parent_soa_minimum | ( | const policy_t * | policy | ) |

Get the parent_soa_minimum of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1077 of file policy.c.

References policy::parent_soa_minimum.

## policy_parent_soa_ttl()

unsigned int policy_parent_soa_ttl | ( | const policy_t * | policy | ) |

Get the parent_soa_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1069 of file policy.c.

References policy::parent_soa_ttl.

## policy_passthrough()

unsigned int policy_passthrough | ( | const policy_t * | policy | ) |

Get the passthrough of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1085 of file policy.c.

References policy::passthrough.

## policy_retrieve_zone_list()

int policy_retrieve_zone_list | ( | policy_t * | policy | ) |

Retrieve zone objects related to a policy object. Use policy_zone_list() to get the list afterwards. This will refetch objects if already retrieved.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1111 of file policy.c.

Referenced by policy_zone_list(), and removeDeadKeysNow().

## policy_set_denial_algorithm()

int policy_set_denial_algorithm | ( | policy_t * | policy,
|  | unsigned int | denial_algorithm
| ) |  |

Set the denial_algorithm of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_algorithm | an unsigned integer with a maximum value of 255.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1309 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_algorithm.

## policy_set_denial_iterations()

int policy_set_denial_iterations | ( | policy_t * | policy,
|  | unsigned int | denial_iterations
| ) |  |

Set the denial_iterations of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_iterations | an unsigned integer with a maximum value of 65535.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1323 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_iterations.

## policy_set_denial_optout()

int policy_set_denial_optout | ( | policy_t * | policy,
|  | unsigned int | denial_optout
| ) |  |

Set the denial_optout of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_optout | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1279 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_optout.

## policy_set_denial_resalt()

int policy_set_denial_resalt | ( | policy_t * | policy,
|  | unsigned int | denial_resalt
| ) |  |

Set the denial_resalt of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_resalt | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1299 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_resalt.

## policy_set_denial_salt()

int policy_set_denial_salt | ( | policy_t * | policy,
|  | const char * | denial_salt_text
| ) |  |

Set the denial_salt of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_salt_text | a character pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1351 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_salt.

## policy_set_denial_salt_last_change()

int policy_set_denial_salt_last_change | ( | policy_t * | policy,
|  | unsigned int | denial_salt_last_change
| ) |  |

Set the denial_salt_last_change of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_salt_last_change | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1373 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_salt_last_change.

## policy_set_denial_salt_length()

int policy_set_denial_salt_length | ( | policy_t * | policy,
|  | unsigned int | denial_salt_length
| ) |  |

Set the denial_salt_length of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_salt_length | an unsigned integer with a maximum value of 255.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1337 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_salt_length.

## policy_set_denial_ttl()

int policy_set_denial_ttl | ( | policy_t * | policy,
|  | unsigned int | denial_ttl
| ) |  |

Set the denial_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1289 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::denial_ttl.

## policy_set_denial_type()

int policy_set_denial_type | ( | policy_t * | policy,
|  | policy_denial_type_t | denial_type
| ) |  |

Set the denial_type of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | denial_type | a policy_denial_type_t.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1266 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, policy::denial_type, and POLICY_DENIAL_TYPE_INVALID.

## policy_set_description()

int policy_set_description | ( | policy_t * | policy,
|  | const char * | description_text
| ) |  |

Set the description of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | description_text | a character pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1164 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::description.

## policy_set_keys_publish_safety()

int policy_set_keys_publish_safety | ( | policy_t * | policy,
|  | unsigned int | keys_publish_safety
| ) |  |

Set the keys_publish_safety of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | keys_publish_safety | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1403 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::keys_publish_safety.

## policy_set_keys_purge_after()

int policy_set_keys_purge_after | ( | policy_t * | policy,
|  | unsigned int | keys_purge_after
| ) |  |

Set the keys_purge_after of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | keys_purge_after | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1423 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::keys_purge_after.

## policy_set_keys_retire_safety()

int policy_set_keys_retire_safety | ( | policy_t * | policy,
|  | unsigned int | keys_retire_safety
| ) |  |

Set the keys_retire_safety of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | keys_retire_safety | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1393 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::keys_retire_safety.

## policy_set_keys_shared()

int policy_set_keys_shared | ( | policy_t * | policy,
|  | unsigned int | keys_shared
| ) |  |

Set the keys_shared of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | keys_shared | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1413 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::keys_shared.

## policy_set_keys_ttl()

int policy_set_keys_ttl | ( | policy_t * | policy,
|  | unsigned int | keys_ttl
| ) |  |

Set the keys_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | keys_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1383 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::keys_ttl.

## policy_set_name()

int policy_set_name | ( | policy_t * | policy,
|  | const char * | name_text
| ) |  |

Set the name of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | name_text | a character pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1142 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::name.

## policy_set_parent_ds_ttl()

int policy_set_parent_ds_ttl | ( | policy_t * | policy,
|  | unsigned int | parent_ds_ttl
| ) |  |

Set the parent_ds_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | parent_ds_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1500 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::parent_ds_ttl.

## policy_set_parent_propagation_delay()

int policy_set_parent_propagation_delay | ( | policy_t * | policy,
|  | unsigned int | parent_propagation_delay
| ) |  |

Set the parent_propagation_delay of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | parent_propagation_delay | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1490 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::parent_propagation_delay.

## policy_set_parent_registration_delay()

int policy_set_parent_registration_delay | ( | policy_t * | policy,
|  | unsigned int | parent_registration_delay
| ) |  |

Set the parent_registration_delay of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | parent_registration_delay | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1480 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::parent_registration_delay.

## policy_set_parent_soa_minimum()

int policy_set_parent_soa_minimum | ( | policy_t * | policy,
|  | unsigned int | parent_soa_minimum
| ) |  |

Set the parent_soa_minimum of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | parent_soa_minimum | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1520 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::parent_soa_minimum.

## policy_set_parent_soa_ttl()

int policy_set_parent_soa_ttl | ( | policy_t * | policy,
|  | unsigned int | parent_soa_ttl
| ) |  |

Set the parent_soa_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | parent_soa_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1510 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::parent_soa_ttl.

## policy_set_passthrough()

int policy_set_passthrough | ( | policy_t * | policy,
|  | unsigned int | passthrough
| ) |  |

Set the passthrough of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | passthrough | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1530 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::passthrough.

## policy_set_signatures_inception_offset()

int policy_set_signatures_inception_offset | ( | policy_t * | policy,
|  | unsigned int | signatures_inception_offset
| ) |  |

Set the signatures_inception_offset of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_inception_offset | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1216 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_inception_offset.

## policy_set_signatures_jitter()

int policy_set_signatures_jitter | ( | policy_t * | policy,
|  | unsigned int | signatures_jitter
| ) |  |

Set the signatures_jitter of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_jitter | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1206 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_jitter.

## policy_set_signatures_max_zone_ttl()

int policy_set_signatures_max_zone_ttl | ( | policy_t * | policy,
|  | unsigned int | signatures_max_zone_ttl
| ) |  |

Set the signatures_max_zone_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_max_zone_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1256 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_max_zone_ttl.

## policy_set_signatures_refresh()

int policy_set_signatures_refresh | ( | policy_t * | policy,
|  | unsigned int | signatures_refresh
| ) |  |

Set the signatures_refresh of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_refresh | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1196 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_refresh.

## policy_set_signatures_resign()

int policy_set_signatures_resign | ( | policy_t * | policy,
|  | unsigned int | signatures_resign
| ) |  |

Set the signatures_resign of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_resign | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1186 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_resign.

## policy_set_signatures_validity_default()

int policy_set_signatures_validity_default | ( | policy_t * | policy,
|  | unsigned int | signatures_validity_default
| ) |  |

Set the signatures_validity_default of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_validity_default | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1226 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_validity_default.

## policy_set_signatures_validity_denial()

int policy_set_signatures_validity_denial | ( | policy_t * | policy,
|  | unsigned int | signatures_validity_denial
| ) |  |

Set the signatures_validity_denial of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_validity_denial | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1236 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_validity_denial.

## policy_set_signatures_validity_keyset()

int policy_set_signatures_validity_keyset | ( | policy_t * | policy,
|  | unsigned int | signatures_validity_keyset
| ) |  |

Set the signatures_validity_keyset of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | signatures_validity_keyset | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1246 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::signatures_validity_keyset.

## policy_set_zone_propagation_delay()

int policy_set_zone_propagation_delay | ( | policy_t * | policy,
|  | unsigned int | zone_propagation_delay
| ) |  |

Set the zone_propagation_delay of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | zone_propagation_delay | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1433 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::zone_propagation_delay.

## policy_set_zone_soa_minimum()

int policy_set_zone_soa_minimum | ( | policy_t * | policy,
|  | unsigned int | zone_soa_minimum
| ) |  |

Set the zone_soa_minimum of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | zone_soa_minimum | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1453 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::zone_soa_minimum.

## policy_set_zone_soa_serial_text()

int policy_set_zone_soa_serial_text | ( | policy_t * | policy,
|  | const char * | zone_soa_serial
| ) |  |

Set the zone_soa_serial of a policy object from text.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | zone_soa_serial | a character pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1463 of file policy.c.

## policy_set_zone_soa_ttl()

int policy_set_zone_soa_ttl | ( | policy_t * | policy,
|  | unsigned int | zone_soa_ttl
| ) |  |

Set the zone_soa_ttl of a policy object.

Parameters

  [in] | policy | a policy_t pointer.
  [in] | zone_soa_ttl | an unsigned integer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 1443 of file policy.c.

References DB_ERROR_UNKNOWN, DB_OK, and policy::zone_soa_ttl.

## policy_signatures_inception_offset()

unsigned int policy_signatures_inception_offset | ( | const policy_t * | policy | ) |

Get the signatures_inception_offset of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 853 of file policy.c.

References policy::signatures_inception_offset.

## policy_signatures_jitter()

unsigned int policy_signatures_jitter | ( | const policy_t * | policy | ) |

Get the signatures_jitter of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 845 of file policy.c.

References policy::signatures_jitter.

## policy_signatures_max_zone_ttl()

unsigned int policy_signatures_max_zone_ttl | ( | const policy_t * | policy | ) |

Get the signatures_max_zone_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 885 of file policy.c.

References policy::signatures_max_zone_ttl.

## policy_signatures_refresh()

unsigned int policy_signatures_refresh | ( | const policy_t * | policy | ) |

Get the signatures_refresh of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 837 of file policy.c.

References policy::signatures_refresh.

## policy_signatures_resign()

unsigned int policy_signatures_resign | ( | const policy_t * | policy | ) |

Get the signatures_resign of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 829 of file policy.c.

References policy::signatures_resign.

## policy_signatures_validity_default()

unsigned int policy_signatures_validity_default | ( | const policy_t * | policy | ) |

Get the signatures_validity_default of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 861 of file policy.c.

References policy::signatures_validity_default.

## policy_signatures_validity_denial()

unsigned int policy_signatures_validity_denial | ( | const policy_t * | policy | ) |

Get the signatures_validity_denial of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 869 of file policy.c.

References policy::signatures_validity_denial.

## policy_signatures_validity_keyset()

unsigned int policy_signatures_validity_keyset | ( | const policy_t * | policy | ) |

Get the signatures_validity_keyset of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 877 of file policy.c.

References policy::signatures_validity_keyset.

## policy_update()

int policy_update | ( | policy_t * | policy | ) |

Update a policy object in the database.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 2110 of file policy.c.

## policy_zone_list()

zone_list_db_t* policy_zone_list | ( | policy_t * | policy | ) |

Get the zone objects related to a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a zone_list_db_t pointer or NULL on error.

Definition at line 1093 of file policy.c.

References policy::dbo, policy_retrieve_zone_list(), and policy::zone_list.

Referenced by removeDeadKeysNow().

## policy_zone_propagation_delay()

unsigned int policy_zone_propagation_delay | ( | const policy_t * | policy | ) |

Get the zone_propagation_delay of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1005 of file policy.c.

References policy::zone_propagation_delay.

## policy_zone_soa_minimum()

unsigned int policy_zone_soa_minimum | ( | const policy_t * | policy | ) |

Get the zone_soa_minimum of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1021 of file policy.c.

References policy::zone_soa_minimum.

## policy_zone_soa_serial_text()

const char* policy_zone_soa_serial_text | ( | const policy_t * | policy | ) |

Get the zone_soa_serial as text of a policy object.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  a character pointer or NULL on error or if no zone_soa_serial has been set.

Definition at line 1029 of file policy.c.

## policy_zone_soa_ttl()

unsigned int policy_zone_soa_ttl | ( | const policy_t * | policy | ) |

Get the zone_soa_ttl of a policy object. Undefined behavior if `policy` is NULL.

Parameters

  [in] | policy | a policy_t pointer.

Returns
  an unsigned integer.

Definition at line 1013 of file policy.c.

References policy::zone_soa_ttl.

## Variable Documentation

## policy_enum_set_denial_type

const db_enum_t policy_enum_set_denial_type[]

Initial value:
= {
{ "NSEC", (policy_denial_type_t)POLICY_DENIAL_TYPE_NSEC },
{ "NSEC3", (policy_denial_type_t)POLICY_DENIAL_TYPE_NSEC3 },
{ NULL, 0 }
}
policy_denial_type_t
enum policy_denial_type policy_denial_type_t
POLICY_DENIAL_TYPE_NSEC3
Definition: policy.h:43
POLICY_DENIAL_TYPE_NSEC
Definition: policy.h:42

Definition at line 36 of file policy.c.

## policy_enum_set_zone_soa_serial

const db_enum_t policy_enum_set_zone_soa_serial[]

Initial value:
= {
{ "counter", (policy_zone_soa_serial_t)POLICY_ZONE_SOA_SERIAL_COUNTER },
{ "datecounter", (policy_zone_soa_serial_t)POLICY_ZONE_SOA_SERIAL_DATECOUNTER },
{ "unixtime", (policy_zone_soa_serial_t)POLICY_ZONE_SOA_SERIAL_UNIXTIME },
{ "keep", (policy_zone_soa_serial_t)POLICY_ZONE_SOA_SERIAL_KEEP },
{ NULL, 0 }
}
policy_zone_soa_serial_t
enum policy_zone_soa_serial policy_zone_soa_serial_t
POLICY_ZONE_SOA_SERIAL_DATECOUNTER
Definition: policy.h:50
POLICY_ZONE_SOA_SERIAL_COUNTER
Definition: policy.h:49
POLICY_ZONE_SOA_SERIAL_KEEP
Definition: policy.h:52
POLICY_ZONE_SOA_SERIAL_UNIXTIME
Definition: policy.h:51

Definition at line 42 of file policy.c.