Commit c74247da authored by Lubos Slovak's avatar Lubos Slovak

common: Discarded the libknots (common-knot) library.

Most of the files were moved to knot/common/ (ex knot/other/).

Two files moved to utils, because were used only there
(hex, strtonum).

One file (strlcat) moved to libknot/internal/, as it was used both
in server and in libknot. (Also, strlcpy was there already).
parent 7e1bf96b
......@@ -24,21 +24,6 @@ man/Makefile.am
patches/Makefile.am
samples/Makefile.am
src/Makefile.am
src/common-knot/crc.h
src/common-knot/evsched.c
src/common-knot/evsched.h
src/common-knot/fdset.c
src/common-knot/fdset.h
src/common-knot/heap.c
src/common-knot/heap.h
src/common-knot/hex.c
src/common-knot/hex.h
src/common-knot/ref.c
src/common-knot/ref.h
src/common-knot/strlcat.c
src/common-knot/strlcat.h
src/common-knot/strtonum.h
src/common-knot/trim.h
src/dnstap/Makefile.am
src/dnstap/convert.c
src/dnstap/convert.h
......@@ -50,6 +35,17 @@ src/dnstap/reader.c
src/dnstap/reader.h
src/dnstap/writer.c
src/dnstap/writer.h
src/knot/common/crc.h
src/knot/common/debug.h
src/knot/common/evsched.c
src/knot/common/evsched.h
src/knot/common/fdset.c
src/knot/common/fdset.h
src/knot/common/heap.c
src/knot/common/heap.h
src/knot/common/ref.c
src/knot/common/ref.h
src/knot/common/trim.h
src/knot/conf/cf-lex.l
src/knot/conf/cf-parse.y
src/knot/conf/conf.c
......@@ -107,7 +103,6 @@ src/knot/nameserver/tsig_ctx.c
src/knot/nameserver/tsig_ctx.h
src/knot/nameserver/update.c
src/knot/nameserver/update.h
src/knot/other/debug.h
src/knot/server/dthreads.c
src/knot/server/dthreads.h
src/knot/server/journal.c
......@@ -227,6 +222,8 @@ src/libknot/internal/print.c
src/libknot/internal/print.h
src/libknot/internal/sockaddr.c
src/libknot/internal/sockaddr.h
src/libknot/internal/strlcat.c
src/libknot/internal/strlcat.h
src/libknot/internal/strlcpy.c
src/libknot/internal/strlcpy.h
src/libknot/internal/tolower.c
......@@ -278,6 +275,8 @@ src/libknot/tsig-op.c
src/libknot/tsig-op.h
src/utils/common/exec.c
src/utils/common/exec.h
src/utils/common/hex.c
src/utils/common/hex.h
src/utils/common/msg.c
src/utils/common/msg.h
src/utils/common/netio.c
......@@ -286,6 +285,7 @@ src/utils/common/params.c
src/utils/common/params.h
src/utils/common/resolv.c
src/utils/common/resolv.h
src/utils/common/strtonum.h
src/utils/common/token.c
src/utils/common/token.h
src/utils/dig/dig_exec.c
......
......@@ -4,7 +4,7 @@ SUBDIRS = zscanner dnstap .
sbin_PROGRAMS = knotc knotd
bin_PROGRAMS = kdig khost knsupdate knsec3hash
lib_LTLIBRARIES = libknot.la
noinst_LTLIBRARIES = libknotd.la libknots.la libknotus.la libknotcs.la
noinst_LTLIBRARIES = libknotd.la libknotus.la libknotcs.la
# $(YACC) will generate header file
AM_CPPFLAGS = \
......@@ -60,24 +60,6 @@ knsupdate_SOURCES = \
knsec3hash_SOURCES = \
utils/nsec3hash/nsec3hash_main.c
# static: shared (not in libknot)
libknots_la_SOURCES = \
common-knot/crc.h \
common-knot/evsched.c \
common-knot/evsched.h \
common-knot/fdset.c \
common-knot/fdset.h \
common-knot/heap.c \
common-knot/heap.h \
common-knot/hex.c \
common-knot/hex.h \
common-knot/ref.c \
common-knot/ref.h \
common-knot/strlcat.c \
common-knot/strlcat.h \
common-knot/strtonum.h \
common-knot/trim.h
# static: common shared (also in libknot)
libknotcs_la_SOURCES = \
libknot/internal/array-sort.h \
......@@ -115,6 +97,8 @@ libknotcs_la_SOURCES = \
libknot/internal/print.h \
libknot/internal/sockaddr.c \
libknot/internal/sockaddr.h \
libknot/internal/strlcat.c \
libknot/internal/strlcat.h \
libknot/internal/strlcpy.c \
libknot/internal/strlcpy.h \
libknot/internal/trie/hat-trie.c \
......@@ -126,6 +110,8 @@ libknotcs_la_SOURCES = \
libknotus_la_SOURCES = \
utils/common/exec.c \
utils/common/exec.h \
utils/common/hex.c \
utils/common/hex.h \
utils/common/msg.c \
utils/common/msg.h \
utils/common/netio.c \
......@@ -134,6 +120,7 @@ libknotus_la_SOURCES = \
utils/common/params.h \
utils/common/resolv.c \
utils/common/resolv.h \
utils/common/strtonum.h \
utils/common/token.c \
utils/common/token.h
......@@ -271,7 +258,17 @@ libknotd_la_SOURCES = \
knot/nameserver/tsig_ctx.h \
knot/nameserver/update.c \
knot/nameserver/update.h \
knot/other/debug.h \
knot/common/crc.h \
knot/common/debug.h \
knot/common/evsched.c \
knot/common/evsched.h \
knot/common/fdset.c \
knot/common/fdset.h \
knot/common/heap.c \
knot/common/heap.h \
knot/common/ref.c \
knot/common/ref.h \
knot/common/trim.h \
knot/server/dthreads.c \
knot/server/dthreads.h \
knot/server/journal.c \
......@@ -333,8 +330,8 @@ libknotd_la_SOURCES = \
# libraries
libknot_la_LIBADD = libknotcs.la zscanner/libzscanner.la
libknotd_la_LIBADD = libknots.la libknotcs.la libknot.la
libknotus_la_LIBADD = libknots.la libknotcs.la libknot.la
libknotd_la_LIBADD = libknotcs.la libknot.la
libknotus_la_LIBADD = libknotcs.la libknot.la
libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(lmdb_CFLAGS)
libknotd_la_LDFLAGS = $(AM_LDFLAGS) $(lmdb_LIBS)
libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(libidn_CFLAGS)
......@@ -347,7 +344,7 @@ knotd_LDADD = libknot.la libknotd.la $(systemd_LIBS) $(lmdb_LIBS)
knotc_LDADD = libknot.la libknotd.la
# bin programs
BIN_LIBS = libknotus.la libknots.la
BIN_LIBS = libknotus.la
kdig_LDADD = $(BIN_LIBS) $(libidn_LIBS)
khost_LDADD = $(BIN_LIBS) $(libidn_LIBS)
knsupdate_LDADD = $(BIN_LIBS) zscanner/libzscanner.la
......
Copyright (c) 2007, 2008 Mutsuo Saito, Makoto Matsumoto and Hiroshima
University. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Hiroshima University nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
......@@ -21,7 +21,7 @@
#include <assert.h>
#include "libknot/errcode.h"
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
/*! \brief Some implementations of timercmp >= are broken, this is for compat.*/
static inline int timercmp_ge(struct timeval *a, struct timeval *b) {
......
......@@ -30,7 +30,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <sys/time.h>
#include "common-knot/heap.h"
#include "knot/common/heap.h"
/* Forward decls. */
struct evsched;
......
......@@ -18,7 +18,7 @@
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "common-knot/fdset.h"
#include "knot/common/fdset.h"
#include "libknot/errcode.h"
/* Workarounds for clock_gettime() not available on some platforms. */
......
......@@ -37,7 +37,7 @@
* ------
***/
#include "common-knot/heap.h"
#include "knot/common/heap.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -16,7 +16,7 @@
#include <stdio.h>
#include "common-knot/ref.h"
#include "knot/common/ref.h"
void ref_init(ref_t *p, ref_destructor_t dtor)
{
......
......@@ -31,7 +31,7 @@
#include <pwd.h>
#include <grp.h>
#include "libknot/internal/sockaddr.h"
#include "common-knot/strlcat.h"
#include "libknot/internal/strlcat.h"
#include "libknot/internal/strlcpy.h"
#include "libknot/dname.h"
#include "libknot/binary.h"
......
......@@ -25,7 +25,7 @@
#include <errno.h>
#include <urcu.h>
#include "common-knot/strlcat.h"
#include "libknot/internal/strlcat.h"
#include "libknot/internal/strlcpy.h"
#include "libknot/internal/mem.h"
#include "libknot/internal/macros.h"
......
......@@ -20,7 +20,7 @@
#include "libknot/internal/log.h"
#include "libknot/internal/mem.h"
#include "libknot/internal/macros.h"
#include "common-knot/fdset.h"
#include "knot/common/fdset.h"
#include "knot/knot.h"
#include "knot/conf/conf.h"
#include "libknot/internal/net.h"
......
......@@ -32,7 +32,7 @@
#include "libknot/internal/print.h"
#include "libknot/internal/log.h"
#include "libknot/errcode.h"
#include "knot/other/debug.h"
#include "knot/common/debug.h"
#define DEFAULT_THR_COUNT 2 /*!< \brief Default thread count. */
#define TCP_BACKLOG_SIZE 10 /*!< \brief TCP listen backlog size. */
......
......@@ -27,8 +27,8 @@
#include "knot/zone/timers.h"
#include "libknot/packet/wire.h"
#include "knot/updates/acl.h"
#include "common-knot/evsched.h"
#include "knot/other/debug.h"
#include "knot/common/evsched.h"
#include "knot/common/debug.h"
#include "knot/server/server.h"
#include "knot/nameserver/internet.h"
#include "libknot/internal/debug.h"
......
......@@ -24,8 +24,8 @@
#include <sys/mman.h>
#include <assert.h>
#include "common-knot/crc.h"
#include "knot/other/debug.h"
#include "knot/common/crc.h"
#include "knot/common/debug.h"
#include "knot/server/journal.h"
#include "knot/server/serialization.h"
#include "libknot/rrtype/soa.h"
......
......@@ -21,7 +21,7 @@
#include <errno.h>
#include <assert.h>
#include "common-knot/trim.h"
#include "knot/common/trim.h"
#include "knot/knot.h"
#include "knot/server/server.h"
#include "knot/server/udp-handler.h"
......
......@@ -29,9 +29,9 @@
#pragma once
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
#include "libknot/internal/lists.h"
#include "common-knot/fdset.h"
#include "knot/common/fdset.h"
#include "libknot/internal/net.h"
#include "libknot/internal/namedb/namedb.h"
#include "knot/server/dthreads.h"
......
......@@ -32,7 +32,7 @@
#endif /* HAVE_CAP_NG_H */
#include "libknot/internal/sockaddr.h"
#include "common-knot/fdset.h"
#include "knot/common/fdset.h"
#include "libknot/internal/mempool.h"
#include "libknot/internal/net.h"
#include "libknot/internal/macros.h"
......
......@@ -17,7 +17,7 @@
#include <assert.h>
#include <time.h>
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
#include "libknot/internal//namedb/namedb.h"
#include "knot/server/server.h"
#include "knot/worker/pool.h"
......
......@@ -19,7 +19,7 @@
#include <pthread.h>
#include <stdbool.h>
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
#include "libknot/internal/namedb/namedb.h"
#include "knot/worker/pool.h"
......
......@@ -18,7 +18,7 @@
#include "libknot/dnssec/random.h"
#include "libknot/processing/requestor.h"
#include "common-knot/trim.h"
#include "knot/common/trim.h"
#include "libknot/internal/mempool.h"
#include "libknot/internal/macros.h"
......
......@@ -22,7 +22,7 @@
#include <arpa/inet.h>
#include "knot/knot.h"
#include "knot/other/debug.h"
#include "knot/common/debug.h"
#include "libknot/libknot.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/rrset-sign.h"
......@@ -31,7 +31,7 @@
#include "libknot/rrtype/nsec.h"
#include "libknot/rrtype/nsec3.h"
#include "libknot/internal/base32hex.h"
#include "common-knot/crc.h"
#include "knot/common/crc.h"
#include "libknot/descriptor.h"
#include "libknot/internal/mempattern.h"
#include "knot/dnssec/zone-nsec.h"
......
......@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include "libknot/descriptor.h"
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
#include "libknot/internal/lists.h"
#include "common-knot/trim.h"
#include "knot/common/trim.h"
#include "knot/zone/node.h"
#include "knot/zone/zone.h"
#include "knot/zone/zonefile.h"
......
......@@ -28,8 +28,8 @@
#include <stdbool.h>
#include <stdint.h>
#include "common-knot/evsched.h"
#include "common-knot/ref.h"
#include "knot/common/evsched.h"
#include "knot/common/ref.h"
#include "knot/conf/conf.h"
#include "knot/server/journal.h"
#include "knot/updates/acl.h"
......
......@@ -26,14 +26,14 @@
#include <unistd.h>
#include <inttypes.h>
#include "common-knot/crc.h"
#include "common-knot/strlcat.h"
#include "knot/common/crc.h"
#include "libknot/internal/strlcat.h"
#include "libknot/internal/strlcpy.h"
#include "libknot/internal/macros.h"
#include "knot/zone/semantic-check.h"
#include "knot/zone/contents.h"
#include "knot/dnssec/zone-nsec.h"
#include "knot/other/debug.h"
#include "knot/common/debug.h"
#include "knot/zone/zonefile.h"
#include "libknot/rdata.h"
#include "knot/zone/zone-dump.h"
......
......@@ -17,7 +17,7 @@
#include <sys/types.h>
#include <string.h>
#include "common-knot/strlcat.h"
#include "libknot/internal/strlcat.h"
size_t
knot_strlcat(char *dst, const char *src, size_t siz)
......
......@@ -22,11 +22,11 @@
#include "utils/common/msg.h"
#include "utils/common/netio.h"
#include "utils/common/params.h"
#include "common-knot/strlcat.h"
#include "libknot/libknot.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/print.h"
#include "libknot/internal/sockaddr.h"
#include "libknot/internal/strlcat.h"
#include "libknot/dnssec/random.h"
#include "libknot/dnssec/sig0.h"
......
......@@ -25,8 +25,8 @@
#include "libknot/internal/base32hex.h"
#include "libknot/dnssec/crypto.h"
#include "libknot/errcode.h"
#include "common-knot/hex.h"
#include "common-knot/strtonum.h"
#include "utils/common/hex.h"
#include "utils/common/strtonum.h"
#define PROGRAM_NAME "knsec3hash"
......
......@@ -5,8 +5,7 @@ AM_CPPFLAGS = \
LDADD = \
$(top_builddir)/libtap/libtap.a \
$(top_builddir)/src/libknotd.la \
$(top_builddir)/src/libknots.la
$(top_builddir)/src/libknotd.la
check_PROGRAMS = \
acl \
......
......@@ -22,7 +22,7 @@
#include <unistd.h>
#include <tap/basic.h>
#include "common-knot/fdset.h"
#include "knot/common/fdset.h"
#define WRITE_PATTERN ((char) 0xde)
#define WRITE_PATTERN_LEN sizeof(char)
......
......@@ -16,7 +16,7 @@
#include <tap/basic.h>
#include "common-knot/evsched.h"
#include "knot/common/evsched.h"
#include "knot/worker/pool.h"
#include "knot/zone/events/events.h"
#include "knot/zone/zone.h"
......
......@@ -16,7 +16,7 @@
#include <tap/basic.h>
#include "common-knot/strlcat.h"
#include "libknot/internal/strlcat.h"
#include "libknot/internal/strlcpy.h"
#include "knot/zone/zone.h"
#include "knot/zone/zonedb.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment