Commit fa84b4c3 authored by Jan Včelák's avatar Jan Včelák 🚀
Browse files

zones: remove knot_ from zone contents, rename zone-create.c

parent bbe06367
......@@ -258,6 +258,8 @@ libknotd_la_SOURCES = \
knot/worker/queue.h \
knot/worker/task.c \
knot/worker/task.h \
knot/zone/contents.c \
knot/zone/contents.h \
knot/zone/estimator.c \
knot/zone/estimator.h \
knot/zone/events.c \
......@@ -266,10 +268,6 @@ libknotd_la_SOURCES = \
knot/zone/node.h \
knot/zone/semantic-check.c \
knot/zone/semantic-check.h \
knot/zone/zone-contents.c \
knot/zone/zone-contents.h \
knot/zone/zone-create.c \
knot/zone/zone-create.h \
knot/zone/zone-diff.c \
knot/zone/zone-diff.h \
knot/zone/zone-dump.c \
......@@ -279,7 +277,9 @@ libknotd_la_SOURCES = \
knot/zone/zone.c \
knot/zone/zone.h \
knot/zone/zonedb.c \
knot/zone/zonedb.h
knot/zone/zonedb.h \
knot/zone/zonefile.c \
knot/zone/zonefile.h
# libraries
libknot_la_LIBADD = libknots.la zscanner/libzscanner.la
......
......@@ -31,7 +31,7 @@
#include "knot/ctl/process.h"
#include "knot/ctl/remote.h"
#include "knot/conf/conf.h"
#include "knot/zone/zone-create.h"
#include "knot/zone/zonefile.h"
#include "knot/server/tcp-handler.h"
#include "libknot/packet/wire.h"
#include "knot/server/zone-load.h"
......@@ -687,7 +687,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
}
/* Create zone loader context. */
zone_t *loaded_zone = load_zone_file(zone);
zone_t *loaded_zone = NULL; // TODO load_zone_file(zone);
if (loaded_zone == NULL) {
rc = 1;
continue;
......
......@@ -315,7 +315,7 @@ static int handle_nsec_next_dname(chain_fix_data_t *fix_data,
knot_node_rrset(a_node, KNOT_RRTYPE_NSEC);
assert(nsec_rrset);
const knot_node_t *next_node =
knot_zone_contents_find_node(fix_data->zone,
zone_contents_find_node(fix_data->zone,
knot_rdata_nsec_next(nsec_rrset));
assert(next_node);
update_last_used(fix_data, next_node->owner, next_node);
......@@ -324,7 +324,7 @@ static int handle_nsec_next_dname(chain_fix_data_t *fix_data,
} else {
// We have no immediate previous node, connect broken chain
const knot_node_t *next_node =
knot_zone_contents_find_node(fix_data->zone,
zone_contents_find_node(fix_data->zone,
fix_data->next_dname);
assert(next_node);
update_last_used(fix_data, next_node->owner, next_node);
......@@ -343,18 +343,18 @@ static int handle_nsec_next_dname(chain_fix_data_t *fix_data,
*
* \return Previous NSEC node for 'd'.
*/
static const knot_node_t *find_prev_nsec_node(const knot_zone_contents_t *z,
static const knot_node_t *find_prev_nsec_node(const zone_contents_t *z,
const knot_dname_t *d)
{
// Find previous node for the dname, return node that will be used later
const knot_node_t *prev_zone_node = knot_zone_contents_find_previous(z,
const knot_node_t *prev_zone_node = zone_contents_find_previous(z,
d);
bool nsec_node_found = !knot_node_is_non_auth(prev_zone_node) &&
!only_nsec_in_node(prev_zone_node);
while (!nsec_node_found) {
// Get previous node from zone tree
prev_zone_node =
knot_zone_contents_find_previous(z,
zone_contents_find_previous(z,
prev_zone_node->owner);
assert(prev_zone_node);
// Infinite loop check
......@@ -383,14 +383,14 @@ static int fix_nsec_chain(knot_dname_t *a, knot_dname_t *b,
assert(b);
assert(fix_data);
// Get changed nodes from zone
const knot_node_t *b_node = knot_zone_contents_find_node(fix_data->zone,
const knot_node_t *b_node = zone_contents_find_node(fix_data->zone,
b);
assert(b_node);
if (knot_node_is_non_auth(b_node)) {
// Nothing to fix in this node
return NSEC_NODE_SKIP;
}
const knot_node_t *a_node = knot_zone_contents_find_node(fix_data->zone,
const knot_node_t *a_node = zone_contents_find_node(fix_data->zone,
a);
// Find previous node in zone
const knot_node_t *prev_zone_node = find_prev_nsec_node(fix_data->zone,
......@@ -482,11 +482,11 @@ static int chain_finalize_nsec(chain_fix_data_t *fix_data)
// NSEC cannot point to itself (except for the case above)
const knot_rrset_t *nsec_rrset =
knot_node_rrset(from, KNOT_RRTYPE_NSEC);
to = knot_zone_contents_find_node(fix_data->zone,
to = zone_contents_find_node(fix_data->zone,
knot_rdata_nsec_next(nsec_rrset));
} else {
// Normal case
to = knot_zone_contents_find_node(fix_data->zone,
to = zone_contents_find_node(fix_data->zone,
fix_data->next_dname);
}
assert(to);
......@@ -693,7 +693,7 @@ bool knot_nsec_only_nsec_and_rrsigs_in_node(const knot_node_t *n)
/*!
* \brief Create new NSEC chain, add differences from current into a changeset.
*/
int knot_nsec_create_chain(const knot_zone_contents_t *zone, uint32_t ttl,
int knot_nsec_create_chain(const zone_contents_t *zone, uint32_t ttl,
knot_changeset_t *changeset)
{
assert(zone);
......
......@@ -31,7 +31,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
#include "knot/updates/changesets.h"
#include "libknot/dnssec/bitmap.h"
......@@ -39,7 +39,7 @@
* \brief Parameters to be used when fixing NSEC(3) chain.
*/
typedef struct chain_fix_data {
const knot_zone_contents_t *zone; // Zone to fix
const zone_contents_t *zone; // Zone to fix
knot_changeset_t *out_ch; // Outgoing changes
const knot_dname_t *chain_start; // Possible new starting node
bool old_connected; // Marks old start connection
......@@ -56,7 +56,7 @@ typedef struct chain_fix_data {
typedef struct {
uint32_t ttl; // TTL for NSEC(3) records
knot_changeset_t *changeset; // Changeset for NSEC(3) changes
const knot_zone_contents_t *zone; // Updated zone
const zone_contents_t *zone; // Updated zone
} nsec_chain_iterate_data_t;
/*!
......@@ -166,7 +166,7 @@ bool knot_nsec_only_nsec_and_rrsigs_in_node(const knot_node_t *n);
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_nsec_create_chain(const knot_zone_contents_t *zone, uint32_t ttl,
int knot_nsec_create_chain(const zone_contents_t *zone, uint32_t ttl,
knot_changeset_t *changeset);
/*!
......
......@@ -21,7 +21,7 @@
#include "libknot/dname.h"
#include "libknot/rdata.h"
#include "libknot/packet/wire.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
#include "knot/zone/zone-diff.h"
#include "knot/dnssec/nsec-chain.h"
#include "knot/dnssec/zone-sign.h"
......@@ -161,7 +161,7 @@ static void update_next_nsec3_dname(chain_fix_data_t *fix_data,
fix_data->next_dname = NULL;
} else {
const knot_node_t *nsec3_node =
knot_zone_contents_find_nsec3_node(fix_data->zone, d);
zone_contents_find_nsec3_node(fix_data->zone, d);
assert(nsec3_node);
const knot_rrset_t *nsec3_rrset = knot_node_rrset(nsec3_node,
KNOT_RRTYPE_NSEC3);
......@@ -177,7 +177,7 @@ static void update_next_nsec3_dname(chain_fix_data_t *fix_data,
/*!
* \brief Helper function - sets variables by looking for data in the zone.
*/
static void fetch_nodes_from_zone(const knot_zone_contents_t *z,
static void fetch_nodes_from_zone(const zone_contents_t *z,
const knot_dname_t *a,
const knot_dname_t *b,
const knot_dname_t *a_hash,
......@@ -187,10 +187,10 @@ static void fetch_nodes_from_zone(const knot_zone_contents_t *z,
const knot_node_t **a_nsec3_node,
const knot_node_t **b_nsec3_node)
{
*a_node = knot_zone_contents_find_node(z, a);
*b_node = knot_zone_contents_find_node(z, b);
*a_nsec3_node = knot_zone_contents_find_nsec3_node(z, a_hash);
*b_nsec3_node = knot_zone_contents_find_nsec3_node(z, b_hash);
*a_node = zone_contents_find_node(z, a);
*b_node = zone_contents_find_node(z, b);
*a_nsec3_node = zone_contents_find_nsec3_node(z, a_hash);
*b_nsec3_node = zone_contents_find_nsec3_node(z, b_hash);
}
/*!
......@@ -202,7 +202,7 @@ static void fetch_nodes_from_zone(const knot_zone_contents_t *z,
*
* \return True if this node can be used, false otherwise.
*/
static bool covered_node_usable(const knot_zone_contents_t *z,
static bool covered_node_usable(const zone_contents_t *z,
const knot_dname_t *d_hashed,
const hattrie_t *sorted_changes)
{
......@@ -217,7 +217,7 @@ static bool covered_node_usable(const knot_zone_contents_t *z,
assert(knot_dname_is_equal(info->hashed_dname, d_hashed));
// Get normal node
const knot_node_t *normal_node =
knot_zone_contents_find_node(z, info->dname);
zone_contents_find_node(z, info->dname);
// Usable if not deleted and not non-auth
return normal_node != NULL &&
!knot_node_is_non_auth(normal_node);
......@@ -268,11 +268,11 @@ static bool node_should_be_signed_nsec3(const knot_node_t *n)
static int update_nsec3(const knot_dname_t *from, const knot_dname_t *to,
const knot_node_t *covered_node,
knot_changeset_t *out_ch,
const knot_zone_contents_t *zone, uint32_t soa_min)
const zone_contents_t *zone, uint32_t soa_min)
{
assert(from && to && out_ch && zone);
// Get old NSEC3 RR (there might not be any)
const knot_node_t *from_node = knot_zone_contents_find_nsec3_node(zone,
const knot_node_t *from_node = zone_contents_find_nsec3_node(zone,
from);
const knot_rrset_t *old_nsec3 = from_node ?
knot_node_rrset(from_node,
......@@ -378,7 +378,7 @@ static int update_nsec3(const knot_dname_t *from, const knot_dname_t *to,
*
* \return first NSEC3 node on success, NULL otherwise.
*/
static const knot_node_t *zone_first_nsec3_node(const knot_zone_contents_t *z)
static const knot_node_t *zone_first_nsec3_node(const zone_contents_t *z)
{
assert(z && hattrie_weight(z->nsec3_nodes) > 0);
hattrie_iter_t *i = hattrie_iter_begin(z->nsec3_nodes, true);
......@@ -398,7 +398,7 @@ static const knot_node_t *zone_first_nsec3_node(const knot_zone_contents_t *z)
*
* \return last NSEC3 node on success, NULL otherwise.
*/
static const knot_node_t *zone_last_nsec3_node(const knot_zone_contents_t *z)
static const knot_node_t *zone_last_nsec3_node(const zone_contents_t *z)
{
// Get first node
const knot_node_t *first_node = zone_first_nsec3_node(z);
......@@ -406,7 +406,7 @@ static const knot_node_t *zone_last_nsec3_node(const knot_zone_contents_t *z)
return NULL;
}
// Get node previous to first = last node
return knot_zone_contents_find_previous_nsec3(z, first_node->owner);
return zone_contents_find_previous_nsec3(z, first_node->owner);
}
/* - RRSIGs handling for NSEC3 ---------------------------------------------- */
......@@ -720,7 +720,7 @@ static int connect_nsec3_nodes(knot_node_t *a, knot_node_t *b,
*
* \return Error code, KNOT_EOK if successful.
*/
static int create_nsec3_nodes(const knot_zone_contents_t *zone, uint32_t ttl,
static int create_nsec3_nodes(const zone_contents_t *zone, uint32_t ttl,
knot_zone_tree_t *nsec3_nodes,
knot_changeset_t *chgset)
{
......@@ -794,7 +794,7 @@ static int create_nsec3_nodes(const knot_zone_contents_t *zone, uint32_t ttl,
* \return KNOT_E*
*/
static int walk_dname_and_store_empty_nonterminals(const knot_dname_t *dname,
const knot_zone_contents_t *zone,
const zone_contents_t *zone,
hattrie_t *t)
{
assert(dname);
......@@ -815,7 +815,7 @@ static int walk_dname_and_store_empty_nonterminals(const knot_dname_t *dname,
const knot_dname_t *cut = knot_wire_next_label(dname, NULL);
while (*cut != '\0' && !knot_dname_is_equal(cut, zone->apex->owner)) {
// Search for name in the zone
const knot_node_t *n = knot_zone_contents_find_node(zone, cut);
const knot_node_t *n = zone_contents_find_node(zone, cut);
if (n == NULL || n->rrset_count == 0) {
/*!
* n == NULL:
......@@ -842,7 +842,7 @@ static int walk_dname_and_store_empty_nonterminals(const knot_dname_t *dname,
*
* \return KNOT_E*
*/
static int update_changes_with_empty_non_terminals(const knot_zone_contents_t *zone,
static int update_changes_with_empty_non_terminals(const zone_contents_t *zone,
hattrie_t *sorted_changes)
{
assert(zone);
......@@ -924,7 +924,7 @@ static int update_changes_with_empty_non_terminals(const knot_zone_contents_t *z
* \return KNOT_E*
*/
static int create_nsec3_hashes_from_trie(const hattrie_t *sorted_changes,
const knot_zone_contents_t *zone,
const zone_contents_t *zone,
hattrie_t **out)
{
assert(sorted_changes);
......@@ -988,7 +988,7 @@ static const knot_node_t *fetch_covered_node(chain_fix_data_t *fix_data,
return NULL;
} else {
signed_info_t *info = (signed_info_t *)*val;
return knot_zone_contents_find_node(fix_data->zone,
return zone_contents_find_node(fix_data->zone,
info->dname);
}
}
......@@ -1023,7 +1023,7 @@ static int handle_nsec3_next_dname(chain_fix_data_t *fix_data,
return KNOT_ENOMEM;
}
const knot_node_t *next_node =
knot_zone_contents_find_nsec3_node(fix_data->zone,
zone_contents_find_nsec3_node(fix_data->zone,
rr_next_dname);
assert(next_node);
knot_dname_free(&rr_next_dname);
......@@ -1175,19 +1175,19 @@ static bool use_prev_from_changeset(const knot_dname_t *a_hash,
*
* \return Previous NSEC3 node for 'd_hashed'.
*/
static const knot_node_t *find_prev_nsec3_node(const knot_zone_contents_t *z,
static const knot_node_t *find_prev_nsec3_node(const zone_contents_t *z,
const knot_dname_t *d_hashed,
const hattrie_t *sorted_changes)
{
// Find previous node for the node
const knot_node_t *prev_nsec3_node =
knot_zone_contents_find_previous_nsec3(z, d_hashed);
zone_contents_find_previous_nsec3(z, d_hashed);
assert(prev_nsec3_node);
bool prev_nsec3_found = !covered_node_usable(z, prev_nsec3_node->owner,
sorted_changes);
while (!prev_nsec3_found) {
prev_nsec3_node =
knot_zone_contents_find_previous_nsec3(z,
zone_contents_find_previous_nsec3(z,
prev_nsec3_node->owner);
assert(prev_nsec3_node);
// Either the node is usable, or there's nothing more to find
......@@ -1356,7 +1356,7 @@ static int chain_finalize_nsec3(chain_fix_data_t *fix_data)
} else if (knot_dname_is_equal(from, fix_data->next_dname)) {
// We do not want to point it to itself, extract next
const knot_node_t *nsec3_node =
knot_zone_contents_find_nsec3_node(fix_data->zone,
zone_contents_find_nsec3_node(fix_data->zone,
from);
assert(nsec3_node);
const knot_rrset_t *nsec3_rrset =
......@@ -1442,7 +1442,7 @@ static int nsec3_mark_empty(knot_node_t **node_p, void *data)
* This is only temporary for the time of NSEC3 generation. Afterwards it must
* be reset (removed flag and fixed children counts).
*/
static void mark_empty_nodes_tmp(const knot_zone_contents_t *zone)
static void mark_empty_nodes_tmp(const zone_contents_t *zone)
{
assert(zone);
......@@ -1482,7 +1482,7 @@ static int nsec3_reset(knot_node_t **node_p, void *data)
* This function must be called after NSEC3 generation, so that flags and
* children count are back to normal before further processing.
*/
static void reset_nodes(const knot_zone_contents_t *zone)
static void reset_nodes(const zone_contents_t *zone)
{
assert(zone);
......@@ -1496,7 +1496,7 @@ static void reset_nodes(const knot_zone_contents_t *zone)
/*!
* \brief Create new NSEC3 chain, add differences from current into a changeset.
*/
int knot_nsec3_create_chain(const knot_zone_contents_t *zone, uint32_t ttl,
int knot_nsec3_create_chain(const zone_contents_t *zone, uint32_t ttl,
knot_changeset_t *changeset)
{
assert(zone);
......
......@@ -40,7 +40,7 @@
*
* \return KNOT_E*
*/
int knot_nsec3_create_chain(const knot_zone_contents_t *zone, uint32_t ttl,
int knot_nsec3_create_chain(const zone_contents_t *zone, uint32_t ttl,
knot_changeset_t *changeset);
/*!
......
......@@ -27,7 +27,7 @@
#include "common/debug.h"
#include "knot/zone/zone.h"
static int init_dnssec_structs(const knot_zone_contents_t *zone,
static int init_dnssec_structs(const zone_contents_t *zone,
conf_zone_t *config,
knot_zone_keys_t *zone_keys,
knot_dnssec_policy_t *policy,
......@@ -65,7 +65,7 @@ static int init_dnssec_structs(const knot_zone_contents_t *zone,
return KNOT_EOK;
}
static int zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
static int zone_sign(zone_contents_t *zone, conf_zone_t *zone_config,
knot_changeset_t *out_ch, bool force,
knot_update_serial_t soa_up, uint32_t *refresh_at,
uint32_t new_serial)
......@@ -152,7 +152,7 @@ static int zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
return KNOT_EOK;
}
int knot_dnssec_zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
int knot_dnssec_zone_sign(zone_contents_t *zone, conf_zone_t *zone_config,
knot_changeset_t *out_ch,
knot_update_serial_t soa_up, uint32_t *refresh_at,
uint32_t new_serial)
......@@ -164,7 +164,7 @@ int knot_dnssec_zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
return zone_sign(zone, zone_config, out_ch, false, soa_up, refresh_at, new_serial);
}
int knot_dnssec_zone_sign_force(knot_zone_contents_t *zone, conf_zone_t *zone_config,
int knot_dnssec_zone_sign_force(zone_contents_t *zone, conf_zone_t *zone_config,
knot_changeset_t *out_ch, uint32_t *refresh_at,
uint32_t new_serial)
{
......@@ -176,7 +176,7 @@ int knot_dnssec_zone_sign_force(knot_zone_contents_t *zone, conf_zone_t *zone_co
new_serial);
}
int knot_dnssec_sign_changeset(const knot_zone_contents_t *zone,
int knot_dnssec_sign_changeset(const zone_contents_t *zone,
conf_zone_t *zone_config,
const knot_changeset_t *in_ch,
knot_changeset_t *out_ch,
......
......@@ -44,7 +44,7 @@
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_dnssec_zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
int knot_dnssec_zone_sign(zone_contents_t *zone, conf_zone_t *zone_config,
knot_changeset_t *out_ch,
knot_update_serial_t soa_up, uint32_t *refresh_at,
uint32_t new_serial);
......@@ -61,7 +61,7 @@ int knot_dnssec_zone_sign(knot_zone_contents_t *zone, conf_zone_t *zone_config,
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_dnssec_zone_sign_force(knot_zone_contents_t *zone, conf_zone_t *zone_config,
int knot_dnssec_zone_sign_force(zone_contents_t *zone, conf_zone_t *zone_config,
knot_changeset_t *out_ch,
uint32_t *refresh_at, uint32_t new_serial);
......@@ -79,7 +79,7 @@ int knot_dnssec_zone_sign_force(knot_zone_contents_t *zone, conf_zone_t *zone_co
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_dnssec_sign_changeset(const knot_zone_contents_t *zone,
int knot_dnssec_sign_changeset(const zone_contents_t *zone,
conf_zone_t *zone_config,
const knot_changeset_t *in_ch,
knot_changeset_t *out_ch,
......
......@@ -34,7 +34,7 @@
#include "common/debug.h"
#include "libknot/util/utils.h"
#include "libknot/packet/wire.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
#include "knot/zone/zone-diff.h"
/*!
......@@ -44,7 +44,7 @@
* \param changeset Changeset to be used.
* \return KNOT_E*
*/
static int delete_nsec3_chain(const knot_zone_contents_t *zone,
static int delete_nsec3_chain(const zone_contents_t *zone,
knot_changeset_t *changeset)
{
assert(zone);
......@@ -74,7 +74,7 @@ static int delete_nsec3_chain(const knot_zone_contents_t *zone,
/*!
* \brief Check if NSEC3 is enabled for given zone.
*/
bool knot_is_nsec3_enabled(const knot_zone_contents_t *zone)
bool knot_is_nsec3_enabled(const zone_contents_t *zone)
{
if (!zone) {
return false;
......@@ -87,7 +87,7 @@ bool knot_is_nsec3_enabled(const knot_zone_contents_t *zone)
* \brief Get minimum TTL from zone SOA.
* \note Value should be used for NSEC records.
*/
static bool get_zone_soa_min_ttl(const knot_zone_contents_t *zone,
static bool get_zone_soa_min_ttl(const zone_contents_t *zone,
uint32_t *ttl)
{
assert(zone);
......@@ -193,7 +193,7 @@ knot_dname_t *knot_nsec3_hash_to_dname(const uint8_t *hash, size_t hash_size,
/*!
* \brief Create NSEC or NSEC3 chain in the zone.
*/
int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
int knot_zone_create_nsec_chain(const zone_contents_t *zone,
knot_changeset_t *changeset,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy)
......@@ -231,7 +231,7 @@ int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
/*!
* \brief Fix NSEC or NSEC3 chain in the zone.
*/
int knot_zone_fix_nsec_chain(const knot_zone_contents_t *zone,
int knot_zone_fix_nsec_chain(const zone_contents_t *zone,
hattrie_t *sorted_changes,
knot_changeset_t *out_ch,
const knot_zone_keys_t *zone_keys,
......
......@@ -31,7 +31,7 @@
#include <stdbool.h>
#include "knot/updates/changesets.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
#include "libknot/dnssec/policy.h"
#include "knot/dnssec/zone-keys.h"
#include "libknot/dnssec/bitmap.h"
......@@ -43,7 +43,7 @@
*
* \return NSEC3 is enabled.
*/
bool knot_is_nsec3_enabled(const knot_zone_contents_t *zone);
bool knot_is_nsec3_enabled(const zone_contents_t *zone);
/*!
* \brief Create NSEC3 owner name from hash and zone apex.
......@@ -80,7 +80,7 @@ knot_dname_t *knot_create_nsec3_owner(const knot_dname_t *owner,
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
int knot_zone_create_nsec_chain(const zone_contents_t *zone,
knot_changeset_t *changeset,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy);
......@@ -98,7 +98,7 @@ int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_zone_fix_nsec_chain(const knot_zone_contents_t *zone,
int knot_zone_fix_nsec_chain(const zone_contents_t *zone,
hattrie_t *sorted_changes,
knot_changeset_t *out_ch,
const knot_zone_keys_t *zone_keys,
......
......@@ -36,7 +36,7 @@
#include "knot/updates/changesets.h"
#include "common/debug.h"
#include "knot/zone/node.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
/*- private API - common functions -------------------------------------------*/
......@@ -605,7 +605,7 @@ static int zone_tree_sign(knot_zone_tree_t *tree,
* \brief Struct to carry data for 'add_rrsigs_for_nsec' callback function.
*/
typedef struct {
const knot_zone_contents_t *zone;
const zone_contents_t *zone;
const knot_zone_keys_t *zone_keys;
const knot_dnssec_policy_t *policy;
knot_changeset_t *changeset;
......@@ -974,7 +974,7 @@ fail:
*
* \return Error code, KNOT_EOK if successful.
*/
static int update_dnskeys(const knot_zone_contents_t *zone,
static int update_dnskeys(const zone_contents_t *zone,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy,
knot_changeset_t *changeset)
......@@ -1155,7 +1155,7 @@ static int sign_changeset_wrap(knot_rrset_t *chg_rrset, void *data)
bool rr_signed = false;
// Find RR's node in zone, find out if we need to sign this RR
const knot_node_t *node =
knot_zone_contents_find_node(args->zone, chg_rrset->owner);
zone_contents_find_node(args->zone, chg_rrset->owner);
// If node is not in zone, all its RRSIGs were dropped - no-op
if (node) {
const knot_rrset_t *rrsigs = knot_node_rrset(node, KNOT_RRTYPE_RRSIG);
......@@ -1223,7 +1223,7 @@ static int free_helper_trie_node(value_t *val, void *d)
/*!
* \brief Update zone signatures and store performed changes in changeset.
*/
int knot_zone_sign(const knot_zone_contents_t *zone,
int knot_zone_sign(const zone_contents_t *zone,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy,
knot_changeset_t *changeset,
......@@ -1272,7 +1272,7 @@ int knot_zone_sign(const knot_zone_contents_t *zone,
/*!
* \brief Check if zone SOA signatures are expired.
*/
bool knot_zone_sign_soa_expired(const knot_zone_contents_t *zone,
bool knot_zone_sign_soa_expired(const zone_contents_t *zone,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy)
{
......@@ -1366,7 +1366,7 @@ int knot_zone_sign_update_soa(const knot_rrset_t *soa,
/*!
* \brief Sign changeset created by DDNS or zone-diff.
*/
int knot_zone_sign_changeset(const knot_zone_contents_t *zone,
int knot_zone_sign_changeset(const zone_contents_t *zone,
const knot_changeset_t *in_ch,
knot_changeset_t *out_ch,
hattrie_t **sorted_changes,
......
......@@ -31,7 +31,7 @@
#include "knot/updates/changesets.h"
#include "knot/zone/zone.h"
#include "knot/zone/zone-contents.h"
#include "knot/zone/contents.h"
#include "knot/dnssec/zone-keys.h"
#include "libknot/dnssec/policy.h"
......@@ -59,7 +59,7 @@ typedef struct signed_info {
*
* \return Error code, KNOT_EOK if successful.
*/
int knot_zone_sign(const knot_zone_contents_t *zone,
int knot_zone_sign(const zone_contents_t *zone,
const knot_zone_keys_t *zone_keys,
const knot_dnssec_policy_t *policy,
knot_changeset_t *out_ch, uint32_t *refresh_at);
......@@ -89,7 +89,7 @@ int knot_zone_sign_update_soa(const knot_rrset_t *soa, const knot_rrset_t *rrsig
*
* \return True if zone SOA signatures need update, false othewise.
*/
bool knot_zone_sign_soa_expired(const knot_zone_contents_t *zone,