Skip to content
Snippets Groups Projects
Commit 40872e1a authored by Lubos Slovak's avatar Lubos Slovak Committed by Jan Kadlec
Browse files

Comments

refs #999 @5m
parent 189507e8
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,16 @@ int dnslib_dname_table_add_dname(dnslib_dname_table_t *table,
int dnslib_dname_table_add_dname2(dnslib_dname_table_t *table,
dnslib_dname_t **dname);
/*!
* \brief Creates a shallow copy of the domain name table.
*
* Expects an existing dnslib_dname_table_t structure to be passed via \a to,
* and fills it with the same data (domain names) as the original. Actual
* tree nodes are created, but domain names are not copied (just referenced).
*
* \param from Original domain name table.
* \param to Copy of the domain name table.
*/
int dnslib_dname_table_copy(dnslib_dname_table_t *from,
dnslib_dname_table_t *to);
......
......@@ -472,6 +472,22 @@ int dnslib_zone_nsec3_apply_inorder_reverse(dnslib_zone_t *zone,
void (*function)(dnslib_node_t *node, void *data),
void *data);
/*!
* \brief Creates a shallow copy of the zone (no stored data are copied).
*
* This function creates a new zone structure in \a to, creates new trees for
* regular nodes and for NSEC3 nodes, creates new hash table and a new domain
* table. It also fills these structures with the exact same data as the
* original zone is - no copying of stored data is done, just pointers are
* copied.
*
* \param from Original zone.
* \param to Copy of the zone.
*
* \retval DNSLIB_EOK
* \retval DNSLIB_EBADARG
* \retval DNSLIB_ENOMEM
*/
int dnslib_zone_shallow_copy(const dnslib_zone_t *from, dnslib_zone_t **to);
/*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment