Commit 68d605c7 authored by Jan Kadlec's avatar Jan Kadlec

Major cleanup - removed obsolete files, move zcompile logic to zone-load.c.

parent 55220625
......@@ -595,7 +595,6 @@ INPUT = src/common \
src/libknot \
src/common \
src/knot \
src/zcompile \
src/zscanner \
src/utils \
Doxy.page.h
......
......@@ -57,8 +57,6 @@ src/libknot/zone/zone-contents.c
src/libknot/zone/zone-contents.h
src/libknot/zone/zone-tree.h
src/libknot/zone/zone-tree.c
src/libknot/zone/dname-table.h
src/libknot/zone/dname-table.c
src/Makefile.am
src/common/hattrie
src/common/hattrie/ahtable.c
......@@ -124,16 +122,6 @@ src/common/fdset_kqueue.h
src/common/fdset_kqueue.c
src/common/log.c
src/common/log.h
src/zcompile/parser-descriptor.h
src/zcompile/parser-descriptor.c
src/zcompile/parser-util.h
src/zcompile/parser-util.c
src/zcompile/zcompile.c
src/zcompile/zcompile.h
src/zcompile/zparser.y
src/zcompile/zlexer.l
src/zcompile/zcompile-error.h
src/zcompile/zcompile_main.c
src/knot/common.h
src/knot/main.c
src/knot/ctl/knotc_main.c
......@@ -173,15 +161,10 @@ src/knot/conf/conf.c
src/knot/conf/conf.h
src/knot/conf/logconf.c
src/knot/conf/logconf.h
src/knot/zone/zone-dump.c
src/knot/zone/zone-dump.h
src/knot/zone/zone-load.c
src/knot/zone/zone-load.h
src/knot/zone/zone-dump-text.h
src/knot/zone/zone-dump-text.c
src/zcompile/tests/unittests_zp_main.c
src/zcompile/tests/zcompile_tests.c
src/zcompile/zcompile-error.c
src/tests/unittests_main.c
src/tests/common/acl_tests.c
src/tests/common/acl_tests.h
......@@ -206,55 +189,8 @@ src/tests/knot/journal_tests.h
src/tests/knot/server_tests.c
src/tests/knot/server_tests.h
src/tests/libknot/unittests_libknot.c
src/tests/libknot/libknot/dname_tests.c
src/tests/libknot/libknot/dname_tests.h
src/tests/libknot/libknot/edns_tests.c
src/tests/libknot/libknot/edns_tests.h
src/tests/libknot/libknot/node_tests.c
src/tests/libknot/libknot/node_tests.h
src/tests/libknot/libknot/rdata_tests.c
src/tests/libknot/libknot/rdata_tests.h
src/tests/libknot/libknot/response_tests.c
src/tests/libknot/libknot/response_tests.h
src/tests/libknot/libknot/rrset_tests.c
src/tests/libknot/libknot/rrset_tests.h
src/tests/libknot/libknot/zone_tests.c
src/tests/libknot/libknot/zone_tests.h
src/tests/libknot/libknot/zonedb_tests.c
src/tests/libknot/libknot/zonedb_tests.h
src/tests/libknot/libknot/cuckoo_tests.c
src/tests/libknot/libknot/cuckoo_tests.h
src/tests/libknot/libknot/dname_table_tests.h
src/tests/libknot/libknot/dname_table_tests.c
src/tests/libknot/libknot/packet_tests.c
src/tests/libknot/libknot/packet_tests.h
src/tests/libknot/libknot/query_tests.c
src/tests/libknot/libknot/query_tests.h
src/tests/libknot/libknot/nsec3_tests.c
src/tests/libknot/libknot/nsec3_tests.h
src/tests/libknot/realdata/unittests_libknot_realdata.c
src/tests/libknot/realdata/libknot/packet_tests_realdata.c
src/tests/libknot/realdata/libknot/packet_tests_realdata.h
src/tests/libknot/realdata/libknot/dname_tests_realdata.c
src/tests/libknot/realdata/libknot/dname_tests_realdata.h
src/tests/libknot/realdata/libknot/edns_tests_realdata.c
src/tests/libknot/realdata/libknot/edns_tests_realdata.h
src/tests/libknot/realdata/libknot/node_tests_realdata.c
src/tests/libknot/realdata/libknot/node_tests_realdata.h
src/tests/libknot/realdata/libknot/rdata_tests_realdata.c
src/tests/libknot/realdata/libknot/rdata_tests_realdata.h
src/tests/libknot/realdata/libknot/response_tests_realdata.c
src/tests/libknot/realdata/libknot/response_tests_realdata.h
src/tests/libknot/realdata/libknot/rrset_tests_realdata.c
src/tests/libknot/realdata/libknot/rrset_tests_realdata.h
src/tests/libknot/realdata/libknot/zone_tests_realdata.c
src/tests/libknot/realdata/libknot/zone_tests_realdata.h
src/tests/libknot/realdata/libknot/zonedb_tests_realdata.c
src/tests/libknot/realdata/libknot/zonedb_tests_realdata.h
src/tests/libknot/realdata/libknot_tests_loader_realdata.c
src/tests/libknot/realdata/libknot_tests_loader_realdata.h
src/tests/libknot/libknot/zone_tree_tests.c
src/tests/libknot/libknot/zone_tree_tests.h
samples/Makefile.am
src/libknot/tsig.h
src/libknot/tsig.c
......
......@@ -89,12 +89,8 @@ libknot_la_SOURCES = \
libknot/zone/zonedb.c \
libknot/zone/zonedb.h \
libknot/zone/node.c \
libknot/zone/dname-table.h \
libknot/zone/dname-table.c \
libknot/zone/zone-diff.h \
libknot/zone/zone-diff.c \
zcompile/zcompile.h \
zcompile/zcompile.c \
libknot/hash/hash-functions.c \
libknot/hash/cuckoo-hash-table.c \
libknot/hash/universal-system.c \
......@@ -225,6 +221,8 @@ libknotd_la_SOURCES = \
knot/server/zones.h \
knot/zone/semantic-check.c \
knot/zone/semantic-check.h \
knot/zone/zone-load.h \
knot/zone/zone-load.c \
knot/server/server.h
zscanner/scanner.c: zscanner/scanner.rl zscanner/scanner_body.rl
......
......@@ -24,8 +24,8 @@
#include <sys/mman.h>
#include "common/crc.h"
#include "common.h"
#include "knot/other/debug.h"
#include "knot/zone/zone-dump.h"
#include "journal.h"
/*! \brief Infinite file size limit. */
......
......@@ -44,6 +44,8 @@
#include <stdint.h>
#include <fcntl.h>
#include "knot/zone/zone-load.h"
/*!
* \brief Journal entry flags.
*/
......
......@@ -33,7 +33,6 @@
#include "knot/server/xfr-handler.h"
#include "libknot/updates/xfr-in.h"
#include "knot/server/zones.h"
#include "knot/zone/zone-dump.h"
#include "libknot/nameserver/name-server.h"
#include "libknot/updates/changesets.h"
#include "libknot/tsig-op.h"
......@@ -41,7 +40,6 @@
#include "libknot/packet/response.h"
#include "libknot/zone/zone-diff.h"
#include "libknot/updates/ddns.h"
#include "zcompile/zcompile.h"
static const size_t XFRIN_CHANGESET_BINARY_SIZE = 100;
static const size_t XFRIN_CHANGESET_BINARY_STEP = 100;
......@@ -875,38 +873,19 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
}
*dst = NULL;
/* Duplicate zone name. */
size_t zlen = strlen(zone_name);
char *zname = NULL;
if (zlen > 0) {
if ((zname = strdup(zone_name)) == NULL) {
return KNOT_ENOMEM;
}
} else {
return KNOT_EINVAL;
}
zname[zlen - 1] = '\0'; /* Trim last dot */
/* Check if the compiled file still exists. */
struct stat st;
if (stat(source, &st) != 0) {
char reason[256] = {0};
strerror_r(errno, reason, sizeof(reason));
log_server_warning("Failed to open zone file '%s' (%s).\n",
zname, reason);
free(zname);
return KNOT_EZONEINVAL;
}
int ret = zone_read(zone_name, source, 0, dst);
/* Attempt to open compiled zone for loading. */
zloader_t *zl = NULL;
int ret = knot_zload_open(&zl, source, zone_name, 0);
if (ret != KNOT_EOK) {
log_server_warning("Failed to parser zone file '%s' (%s).\n",
source, knot_strerror(ret));
free(zname);
return ret;
}
*dst = knot_zload_load(zl);
if (*dst == NULL) {
log_zone_error("Zone %s could not be loaded.\n", zone_name);
knot_zload_close(zl);
return KNOT_ERROR;
}
//TODO, change to zone parsing
// switch(knot_zload_open(&zl, filename)) {
// case KNOT_EOK:
......@@ -966,7 +945,7 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
/* Check if loaded origin matches. */
const knot_dname_t *dname = knot_zone_name(*dst);
knot_dname_t *dname_req = NULL;
dname_req = knot_dname_new_from_str(zone_name, zlen, 0);
dname_req = knot_dname_new_from_str(zone_name, strlen(zone_name), 0);
if (knot_dname_compare(dname, dname_req) != 0) {
log_server_error("Origin of the zone db file is "
"different than '%s'\n",
......@@ -975,18 +954,17 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
ret = KNOT_EZONEINVAL;
} else {
/* Save the timestamp from the zone db file. */
if (stat(source, &st) < 0) { // TODO REVIEW MV
dbg_zones("zones: failed to stat() zone db, "
"something is seriously wrong\n");
knot_zone_deep_free(dst, 0);
ret = KNOT_EZONEINVAL;
} else {
knot_zone_set_version(*dst, st.st_mtime);
}
// if (stat(source, &st) < 0) { // TODO REVIEW MV
// dbg_zones("zones: failed to stat() zone db, "
// "something is seriously wrong\n");
// knot_zone_deep_free(dst, 0);
// ret = KNOT_EZONEINVAL;
// } else {
// knot_zone_set_version(*dst, st.st_mtime);
// }
}
knot_dname_free(&dname_req);
// knot_zload_close(zl);
free(zname);
knot_zload_close(zl);
return ret;
}
......
......@@ -3,12 +3,12 @@
#include <arpa/inet.h>
#include "knot/common.h"
#include "knot/zone/zone-dump.h"
#include "knot/other/debug.h"
#include "libknot/libknot.h"
#include "common/base32hex.h"
#include "common/crc.h"
#include "common/descriptor_new.h"
#include "common/mempattern.h"
#include "semantic-check.h"
......
This diff is collapsed.
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file zone-dump.h
*
* \author Jan Kadlec <jan.kadlec@nic.cz>
*
* \brief Functions for dumping zone to binary file.
*
* \addtogroup zone-load-dump
* @{
*/
#ifndef _KNOT_ZONEDUMP_H_
#define _KNOT_ZONEDUMP_H_
#include "common/crc.h"
#include "libknot/zone/zone.h"
/*!
* \brief Zone loader enums.
*/
enum {
MAGIC_LENGTH = 7 /*!< Compiled zone magic length. */
};
/*! \brief Magic identifier: { "knot", maj_ver, min_ver, revision } */
#define MAGIC_BYTES {'k', 'n', 'o', 't', '1', '1', '0'}
/*!
* \brief Dumps given zone to binary file.
*
* \param zone Zone to be saved.
* \param fd File descriptor to be written to.
* \param do_checks Set to 1 to enable checking the zone for semantic errors.
* \param sfilename Source filename of the text zone file.
* \param crc Returns a calculated CRC.
*
* \retval KNOT_EOK on success.
* \retval KNOT_EINVAL if the file cannot be opened for writing.
*/
int knot_zdump_binary(knot_zone_contents_t *zone, int fd,
int do_checks, const char *sfilename,
crc_t *crc);
/*!
* \brief Serializes RRSet into binary stream. Expects NULL pointer, memory
* is handled inside function.
*
* \param rrset RRSet to be serialized.
* \param stream Stream containing serialized RRSet.
* \param max_size Maximum size of stream.
* \param bytes_written Actually written data.
*
* \retval KNOT_EOK on success.
* \retval KNOT_EINVAL if wrong arguments are supplied.
* \retval KNOT_ENOMEM on memory error.
*/
int knot_zdump_rrset_serialize(const knot_rrset_t *rrset, uint8_t *stream,
size_t max_size, size_t *bytes_written);
/*!
* \brief Checks if zone uses DNSSEC and/or NSEC3
*
* \param zone Zone to be checked.
*
* \retval 0 if zone is not secured.
* \retval 2 if zone uses NSEC3
* \retval 1 if zone uses NSEC
*/
int zone_is_secure(knot_zone_contents_t *zone);
/*! \todo Document me (issue #1586). */
int knot_zdump_dump(knot_zone_contents_t *zone, int fd, const char *sfilename,
crc_t *crc);
/*!
* \brief Return name of the CRC file associated with filename.
*/
char *knot_zdump_crc_file(const char* filename);
#endif /* _KNOT_ZONEDUMP_H_ */
/*! @} */
This diff is collapsed.
......@@ -16,11 +16,11 @@
/*!
* \file zone-load.h
*
* \author Marek Vavrusa <marek.vavrusa@nic.cz>
* \author Jan Kadlec <jan.kadlec@nic.cz>
*
* \brief Loader of previously parsed zone
* \brief Zone loading
*
* \addtogroup zone-load-dump
* @{
*/
......@@ -30,15 +30,44 @@
#include <stdio.h>
#include "libknot/zone/zone.h"
#include "zscanner/file_loader.h"
#define MAGIC_LENGTH 8
#define MAGIC "knotv130"
/* TODO this structure is highly redundant, remove. Maybe use oh-so-great BIRD lists. */
/*!
* \brief One-purpose linked list holding pointers to RRSets.
*/
struct rrset_list {
knot_rrset_t *data; /*!< List data. */
struct rrset_list *next; /*!< Next node. */
};
typedef struct rrset_list rrset_list_t;
struct parser_context {
rrset_list_t *node_rrsigs;
knot_zone_contents_t *current_zone;
knot_rrset_t *current_rrset;
knot_dname_t *origin_from_config;
knot_node_t *last_node;
int ret;
};
typedef struct parser_context parser_context_t;
/*!
* \brief Zone loader structure.
*/
typedef struct zloader_t
{
char *filename; /*!< Compiled zone filename. */
char *source; /*!< Zone source file. */
FILE *fp; /*!< Open filepointer to compiled zone. */
char *origin; /*!< Zone's origin string. */
int semantic_checks; /*!< Wanted level of semantic checks. */
file_loader_t *file_loader;/*!< Scanner's file loader. */
parser_context_t *context;/*!< Loader context. */
} zloader_t;
......@@ -51,7 +80,8 @@ typedef struct zloader_t
* \retval Initialized loader on success.
* \retval NULL on error.
*/
int knot_zload_open(zloader_t **loader, const char *filename);
int knot_zload_open(zloader_t **loader, const char *source, const char *origin,
int semantic_checks);
/*!
* \brief Loads zone from a compiled and serialized zone file.
......@@ -71,9 +101,9 @@ knot_zone_t *knot_zload_load(zloader_t *loader);
* \retval 1 is if needs to be recompiled.
* \retval 0 if it is up to date.
*/
//TODO will not work, has to look at serials probably
int knot_zload_needs_update(zloader_t *loader);
/*!
* \brief Free zone loader.
*
......@@ -81,24 +111,6 @@ int knot_zload_needs_update(zloader_t *loader);
*/
void knot_zload_close(zloader_t *loader);
/*!
* \brief Loads RRSet serialized by knot_zdump_rrset_serialize().
*
* \param stream Stream containing serialized RRSet.
* \param size Size of stream. This variable will contain remaining length of
* stream, once the function has ended.
* \param rrset Place for created RRSet.
*
* \note If RRSet contains RRSIGs, their owners are not copies, but only links
* to the owner of RRSet. All RDATA dnames are copied.
*
* \retval KNOT_EOK on success.
* \retval KNOT_EBADAG on wrong arguments.
* \retval KNOT_EMALF when stream is malformed.
*/
int knot_zload_rrset_deserialize(knot_rrset_t **rrset,
uint8_t *stream, size_t *size);
#endif /* _KNOTD_ZONELOAD_H_ */
/*! @} */
......@@ -24,6 +24,8 @@
#include "updates/xfr-in.h"
#include "libknot.h"
#include "common/errcode.h"
#include "common.h"
#include "util/debug.h"
#include "packet/packet.h"
#include "packet/response.h"
......
......@@ -15,6 +15,7 @@
*/
#include <assert.h>
#include <stdlib.h>
#include "packet/packet.h"
#include "util/debug.h"
......
......@@ -15,11 +15,13 @@
*/
#include <assert.h>
#include <stdlib.h>
#include "updates/ddns.h"
#include "updates/changesets.h"
#include "util/debug.h"
#include "packet/packet.h"
#include "common.h"
#include "consts.h"
#include "common/mempattern.h"
#include "nameserver/name-server.h" // ns_serial_compare() - TODO: extract
......
......@@ -26,6 +26,7 @@
#include "dname.h"
#include "zone/zone.h"
#include "packet/query.h"
#include "common.h"
#include "updates/changesets.h"
#include "tsig.h"
#include "tsig-op.h"
......@@ -1244,8 +1245,6 @@ static void xfrin_zone_contents_free(knot_zone_contents_t **contents)
knot_zone_tree_deep_free(&(*contents)->nsec3_nodes);
knot_nsec3_params_free(&(*contents)->nsec3_params);
knot_dname_table_deep_free(&(*contents)->dname_table);
free(*contents);
*contents = NULL;
......@@ -2418,27 +2417,6 @@ static void xfrin_switch_nodes_in_node(knot_node_t *node, void *data)
/*----------------------------------------------------------------------------*/
static void xfrin_switch_node_in_hash_table(ck_hash_table_item_t *item,
void *data)
{
UNUSED(data);
if (item == NULL) {
return;
}
knot_node_t *node = (knot_node_t *)item->value;
knot_node_t *new_node = knot_node_get_new_node(node);
assert(new_node != NULL);
if (new_node != NULL) {
item->value = new_node;
}
}
/*----------------------------------------------------------------------------*/
static void xfrin_switch_node_in_dname_table(knot_dname_t *dname, void *data)
{
UNUSED(data);
......@@ -2505,8 +2483,6 @@ static void xfrin_zone_contents_free2(knot_zone_contents_t **contents)
knot_nsec3_params_free(&(*contents)->nsec3_params);
knot_dname_table_deep_free(&(*contents)->dname_table);
free(*contents);
*contents = NULL;
}
......@@ -3010,12 +2986,10 @@ static int xfrin_remove_empty_nodes(knot_zone_contents_t *contents,
dbg_xfrin_verb("OLD NSEC3 NODES COUNT: %d\n", changes->old_nsec3_count);
// remove these nodes from both hash table and the tree
ck_hash_table_item_t *hash_item = NULL;
knot_zone_tree_node_t *zone_node = NULL;
for (int i = 0; i < changes->old_nodes_count; ++i) {
zone_node = NULL;
hash_item = NULL;
dbg_xfrin_exec_detail(
char *name = knot_dname_to_str(knot_node_owner(
......@@ -3026,15 +3000,12 @@ dbg_xfrin_exec_detail(
);
ret = knot_zone_contents_remove_node(
contents, changes->old_nodes[i], &zone_node,
&hash_item);
contents, changes->old_nodes[i], &zone_node);
if (ret != KNOT_EOK) {
dbg_xfrin("Failed to remove node from zone!\n");
return KNOT_ENONODE;
}
free(hash_item);
free(zone_node);
}
......
......@@ -948,17 +948,6 @@ knot_zone_contents_t *knot_zone_contents_new(knot_node_t *apex,
goto cleanup;
}
if (use_domain_table) {
dbg_zone_verb("Creating domain name table.\n");
contents->dname_table = knot_dname_table_new();
if (contents->dname_table == NULL) {
ERR_ALLOC_FAILED;
goto cleanup;
}
} else {
contents->dname_table = NULL;
}
//contents->node_count = node_count;
/* Initialize NSEC3 params */
......@@ -996,7 +985,6 @@ knot_zone_contents_t *knot_zone_contents_new(knot_node_t *apex,
cleanup:
dbg_zone_verb("Cleaning up.\n");
free(contents->dname_table);
free(contents->nodes);
free(contents->nsec3_nodes);
free(contents);
......@@ -1490,8 +1478,7 @@ int knot_zone_contents_add_nsec3_rrset(knot_zone_contents_t *zone,
/*----------------------------------------------------------------------------*/
int knot_zone_contents_remove_node(knot_zone_contents_t *contents,
const knot_node_t *node, knot_zone_tree_node_t **removed_tree,
ck_hash_table_item_t **removed_hash)
const knot_node_t *node, knot_zone_tree_node_t **removed_tree)
{
if (contents == NULL || node == NULL) {
return KNOT_EINVAL;
......@@ -2210,14 +2197,6 @@ knot_zone_tree_t *knot_zone_contents_get_nsec3_nodes(
/*----------------------------------------------------------------------------*/
ck_hash_table_t *knot_zone_contents_get_hash_table(
knot_zone_contents_t *contents)
{
return contents->table;
}
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
int knot_zone_contents_shallow_copy(const knot_zone_contents_t *from,
......@@ -2271,7 +2250,6 @@ int knot_zone_contents_shallow_copy(const knot_zone_contents_t *from,
cleanup:
knot_zone_tree_free(&contents->nodes);
knot_zone_tree_free(&contents->nsec3_nodes);
free(contents->dname_table);
free(contents);
return ret;
}
......@@ -2329,7 +2307,6 @@ int knot_zone_contents_shallow_copy2(const knot_zone_contents_t *from,
cleanup:
knot_zone_tree_free(&contents->nodes);
knot_zone_tree_free(&contents->nsec3_nodes);
free(contents->dname_table);
free(contents);
return ret;
}
......@@ -2348,8 +2325,6 @@ void knot_zone_contents_free(knot_zone_contents_t **contents)
knot_nsec3_params_free(&(*contents)->nsec3_params);
knot_dname_table_free(&(*contents)->dname_table);
free(*contents);
*contents = NULL;
}
......
......@@ -32,9 +32,7 @@
#include "zone/node.h"
#include "dname.h"
#include "nsec3.h"
#include "zone/dname-table.h"
#include "common/tree.h"
#include "hash/cuckoo-hash-table.h"
#include "zone-tree.h"
......@@ -45,12 +43,9 @@ struct knot_zone;
typedef struct knot_zone_contents_t {
knot_node_t *apex; /*!< Apex node of the zone (holding SOA) */
ck_hash_table_t *table; /*!< Hash table for holding zone nodes. */
knot_zone_tree_t *nodes;
knot_zone_tree_t *nsec3_nodes;
knot_dname_table_t *dname_table;
struct knot_zone *zone;
knot_nsec3_params_t nsec3_params;
......@@ -58,7 +53,7 @@ typedef struct knot_zone_contents_t {
/*!
* \todo Unify the use of this field - authoritative nodes vs. all.
*/
uint node_count;
size_t node_count;
/*! \brief Various flags
*
......@@ -80,7 +75,7 @@ typedef struct knot_zone_contents_t {
/*----------------------------------------------------------------------------*/
knot_zone_contents_t *knot_zone_contents_new(knot_node_t *apex,
uint node_count,
size_t node_count,
int use_domain_table,
struct knot_zone *zone);
......@@ -181,8 +176,7 @@ int knot_zone_contents_add_nsec3_rrset(knot_zone_contents_t *contents,
int use_domain_table);
int knot_zone_contents_remove_node(knot_zone_contents_t *contents,
const knot_node_t *node, knot_zone_tree_node_t **removed_tree,
ck_hash_table_item_t **removed_hash);
const knot_node_t *node, knot_zone_tree_node_t **removed_tree);
int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents,
const knot_node_t *node, knot_zone_tree_node_t **removed);
......@@ -506,9 +500,6 @@ knot_zone_tree_t *knot_zone_contents_get_nodes(
knot_zone_tree_t *knot_zone_contents_get_nsec3_nodes(
knot_zone_contents_t *contents);
ck_hash_table_t *knot_zone_contents_get_hash_table(
knot_zone_contents_t *contents);
int knot_zone_contents_dname_table_apply(knot_zone_contents_t *contents,
void (*function)(knot_dname_t *,
void *),
......
......@@ -16,8 +16,10 @@
#include <assert.h>
#include <config.h>
#include <stdlib.h>
#include "libknot/util/debug.h"
#include "common/errcode.h"
#include "zone-diff.h"
#include "libknot/nameserver/name-server.h"
#include "common/descriptor_new.h"
......
......@@ -27,7 +27,6 @@
#include "dname.h"
#include "util/debug.h"
#include "util/utils.h"
#include "hash/cuckoo-hash-table.h"
#include "zone/zone-contents.h"
/*! \brief Adaptor for knot_zone_deep_free() */
......
......@@ -32,10 +32,8 @@
#include "zone/node.h"
#include "dname.h"
#include "nsec3.h"
#include "zone/dname-table.h"
#include "common/tree.h"
#include "common/ref.h"
#include "hash/cuckoo-hash-table.h"
#include "zone-tree.h"
......@@ -109,7 +107,7 @@ knot_zone_t *knot_zone_new_empty(knot_dname_t *name);
*
* \return The initialized zone structure or NULL if an error occured.
*/
knot_zone_t *knot_zone_new(knot_node_t *apex, uint node_count,
knot_zone_t *knot_zone_new(knot_node_t *apex, size_t node_count,
int use_domain_table);
knot_zone_contents_t *knot_zone_get_contents(
......
This diff is collapsed.