Commit c41dea7e authored by Daniel Salzman's avatar Daniel Salzman

modules: separate modules into own directories

parent 92aa3deb
...@@ -254,23 +254,23 @@ src/knot/events/handlers/refresh.c ...@@ -254,23 +254,23 @@ src/knot/events/handlers/refresh.c
src/knot/events/handlers/update.c src/knot/events/handlers/update.c
src/knot/events/replan.c src/knot/events/replan.c
src/knot/events/replan.h src/knot/events/replan.h
src/knot/modules/dnsproxy.c src/knot/modules/dnsproxy/dnsproxy.c
src/knot/modules/dnsproxy.h src/knot/modules/dnsproxy/dnsproxy.h
src/knot/modules/dnstap.c src/knot/modules/dnstap/dnstap.c
src/knot/modules/dnstap.h src/knot/modules/dnstap/dnstap.h
src/knot/modules/noudp.c src/knot/modules/noudp/noudp.c
src/knot/modules/noudp.h src/knot/modules/noudp/noudp.h
src/knot/modules/online_sign/module.c
src/knot/modules/online_sign/module.h
src/knot/modules/online_sign/nsec_next.c src/knot/modules/online_sign/nsec_next.c
src/knot/modules/online_sign/nsec_next.h src/knot/modules/online_sign/nsec_next.h
src/knot/modules/rosedb.c src/knot/modules/online_sign/online_sign.c
src/knot/modules/rosedb.h src/knot/modules/online_sign/online_sign.h
src/knot/modules/rosedb_tool.c src/knot/modules/rosedb/rosedb.c
src/knot/modules/synth_record.c src/knot/modules/rosedb/rosedb.h
src/knot/modules/synth_record.h src/knot/modules/rosedb/rosedb_tool.c
src/knot/modules/whoami.c src/knot/modules/synth_record/synth_record.c
src/knot/modules/whoami.h src/knot/modules/synth_record/synth_record.h
src/knot/modules/whoami/whoami.c
src/knot/modules/whoami/whoami.h
src/knot/nameserver/axfr.c src/knot/nameserver/axfr.c
src/knot/nameserver/axfr.h src/knot/nameserver/axfr.h
src/knot/nameserver/chaos.c src/knot/nameserver/chaos.c
......
...@@ -272,18 +272,18 @@ libknotd_la_SOURCES = \ ...@@ -272,18 +272,18 @@ libknotd_la_SOURCES = \
knot/events/handlers/update.c \ knot/events/handlers/update.c \
knot/events/replan.c \ knot/events/replan.c \
knot/events/replan.h \ knot/events/replan.h \
knot/modules/dnsproxy.c \ knot/modules/dnsproxy/dnsproxy.c \
knot/modules/dnsproxy.h \ knot/modules/dnsproxy/dnsproxy.h \
knot/modules/noudp.c \ knot/modules/noudp/noudp.c \
knot/modules/noudp.h \ knot/modules/noudp/noudp.h \
knot/modules/online_sign/module.c \ knot/modules/online_sign/online_sign.c \
knot/modules/online_sign/module.h \ knot/modules/online_sign/online_sign.h \
knot/modules/online_sign/nsec_next.c \ knot/modules/online_sign/nsec_next.c \
knot/modules/online_sign/nsec_next.h \ knot/modules/online_sign/nsec_next.h \
knot/modules/synth_record.c \ knot/modules/synth_record/synth_record.c\
knot/modules/synth_record.h \ knot/modules/synth_record/synth_record.h\
knot/modules/whoami.c \ knot/modules/whoami/whoami.c \
knot/modules/whoami.h \ knot/modules/whoami/whoami.h \
knot/nameserver/axfr.c \ knot/nameserver/axfr.c \
knot/nameserver/axfr.h \ knot/nameserver/axfr.h \
knot/nameserver/chaos.c \ knot/nameserver/chaos.c \
...@@ -454,16 +454,16 @@ knot1to2_LDADD = libcontrib.la ...@@ -454,16 +454,16 @@ knot1to2_LDADD = libcontrib.la
if HAVE_DNSTAP if HAVE_DNSTAP
libknotd_la_SOURCES += \ libknotd_la_SOURCES += \
knot/modules/dnstap.c \ knot/modules/dnstap/dnstap.c \
knot/modules/dnstap.h knot/modules/dnstap/dnstap.h
libknotd_la_CPPFLAGS += $(DNSTAP_CFLAGS) libknotd_la_CPPFLAGS += $(DNSTAP_CFLAGS)
libknotd_la_LIBADD += $(DNSTAP_LIBS) contrib/dnstap/libdnstap.la libknotd_la_LIBADD += $(DNSTAP_LIBS) contrib/dnstap/libdnstap.la
endif # HAVE_DNSTAP endif # HAVE_DNSTAP
if HAVE_ROSEDB if HAVE_ROSEDB
libknotd_la_SOURCES += \ libknotd_la_SOURCES += \
knot/modules/rosedb.c \ knot/modules/rosedb/rosedb.c \
knot/modules/rosedb.h knot/modules/rosedb/rosedb.h
endif # HAVE_ROSEDB endif # HAVE_ROSEDB
# Create storage and run-time directories # Create storage and run-time directories
...@@ -546,7 +546,7 @@ endif # HAVE_DNSTAP ...@@ -546,7 +546,7 @@ endif # HAVE_DNSTAP
if HAVE_ROSEDB if HAVE_ROSEDB
bin_PROGRAMS += rosedb_tool bin_PROGRAMS += rosedb_tool
rosedb_tool_SOURCES = knot/modules/rosedb_tool.c rosedb_tool_SOURCES = knot/modules/rosedb/rosedb_tool.c
rosedb_tool_LDADD = libknotd.la libcontrib.la rosedb_tool_LDADD = libknotd.la libcontrib.la
rosedb_tool_CFLAGS = $(AM_CFLAGS) $(lmdb_CFLAGS) $(DNSTAP_CFLAGS) rosedb_tool_CFLAGS = $(AM_CFLAGS) $(lmdb_CFLAGS) $(DNSTAP_CFLAGS)
rosedb_tool_LDFLAGS = $(AM_LDFLAGS) $(lmdb_LIBS) rosedb_tool_LDFLAGS = $(AM_LDFLAGS) $(lmdb_LIBS)
......
...@@ -29,17 +29,17 @@ ...@@ -29,17 +29,17 @@
#include "dnssec/lib/dnssec/tsig.h" #include "dnssec/lib/dnssec/tsig.h"
#include "dnssec/lib/dnssec/key.h" #include "dnssec/lib/dnssec/key.h"
#include "knot/modules/synth_record.h" #include "knot/modules/synth_record/synth_record.h"
#include "knot/modules/dnsproxy.h" #include "knot/modules/dnsproxy/dnsproxy.h"
#include "knot/modules/online_sign/module.h" #include "knot/modules/online_sign/online_sign.h"
#ifdef HAVE_ROSEDB #ifdef HAVE_ROSEDB
#include "knot/modules/rosedb.h" #include "knot/modules/rosedb/rosedb.h"
#endif #endif
#if USE_DNSTAP #if USE_DNSTAP
#include "knot/modules/dnstap.h" #include "knot/modules/dnstap/dnstap.h"
#endif #endif
#include "knot/modules/whoami.h" #include "knot/modules/whoami/whoami.h"
#include "knot/modules/noudp.h" #include "knot/modules/noudp/noudp.h"
#define HOURS(x) ((x) * 3600) #define HOURS(x) ((x) * 3600)
#define DAYS(x) ((x) * HOURS(24)) #define DAYS(x) ((x) * HOURS(24))
......
...@@ -14,13 +14,11 @@ ...@@ -14,13 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "knot/query/requestor.h"
#include "knot/common/log.h"
#include "knot/modules/dnsproxy.h"
#include "knot/query/capture.h"
#include "knot/nameserver/process_query.h"
#include "contrib/mempattern.h" #include "contrib/mempattern.h"
#include "contrib/net.h" #include "contrib/net.h"
#include "knot/modules/dnsproxy/dnsproxy.h"
#include "knot/query/capture.h"
#include "knot/query/requestor.h"
/* Module configuration scheme. */ /* Module configuration scheme. */
#define MOD_REMOTE "\x06""remote" #define MOD_REMOTE "\x06""remote"
......
...@@ -16,15 +16,12 @@ ...@@ -16,15 +16,12 @@
#include <sys/stat.h> #include <sys/stat.h>
#include "knot/common/log.h"
#include "knot/modules/dnstap.h"
#include "knot/nameserver/process_query.h"
#include "contrib/dnstap/dnstap.pb-c.h" #include "contrib/dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/writer.h" #include "contrib/dnstap/writer.h"
#include "contrib/dnstap/message.h" #include "contrib/dnstap/message.h"
#include "contrib/dnstap/dnstap.h" #include "contrib/dnstap/dnstap.h"
#include "contrib/mempattern.h" #include "contrib/mempattern.h"
#include "libknot/libknot.h" #include "knot/modules/dnstap/dnstap.h"
/* Module configuration scheme. */ /* Module configuration scheme. */
#define MOD_SINK "\x04""sink" #define MOD_SINK "\x04""sink"
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "knot/modules/noudp.h" #include "knot/modules/noudp/noudp.h"
#include "knot/nameserver/process_query.h"
const yp_item_t scheme_mod_noudp[] = { const yp_item_t scheme_mod_noudp[] = {
{ C_ID, YP_TSTR, YP_VNONE }, { C_ID, YP_TSTR, YP_VNONE },
......
/* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -16,22 +16,16 @@ ...@@ -16,22 +16,16 @@
#include <assert.h> #include <assert.h>
#include "knot/common/log.h"
#include "knot/dnssec/rrset-sign.h"
#include "knot/modules/online_sign/module.h"
#include "knot/modules/online_sign/nsec_next.h"
#include "knot/nameserver/internet.h"
#include "knot/nameserver/process_query.h"
#include "libknot/dname.h"
#include "contrib/string.h"
#include "dnssec/error.h" #include "dnssec/error.h"
#include "dnssec/kasp.h" #include "dnssec/kasp.h"
#include "dnssec/sign.h" #include "dnssec/sign.h"
#include "dnssec/nsec.h" #include "dnssec/nsec.h"
#include "contrib/string.h"
#include "knot/modules/online_sign/online_sign.h"
#include "knot/modules/online_sign/nsec_next.h"
#include "knot/dnssec/rrset-sign.h"
#define module_zone_error(zone, msg...) \ #define module_zone_error(zone, msg...) \
MODULE_ZONE_ERR(C_MOD_ONLINE_SIGN, zone, msg) MODULE_ZONE_ERR(C_MOD_ONLINE_SIGN, zone, msg)
......
/* Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
#include <lmdb.h> #include <lmdb.h>
#include "dnssec/random.h" #include "dnssec/random.h"
#include "knot/common/log.h"
#include "knot/modules/rosedb.h"
#include "knot/nameserver/process_query.h"
#include "libknot/libknot.h"
#include "contrib/mempattern.h" #include "contrib/mempattern.h"
#include "contrib/net.h" #include "contrib/net.h"
#include "contrib/wire.h" #include "contrib/wire.h"
#include "knot/modules/rosedb/rosedb.h"
/* Module configuration scheme. */ /* Module configuration scheme. */
#define MOD_DBDIR "\x05""dbdir" #define MOD_DBDIR "\x05""dbdir"
......
/* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -19,10 +19,9 @@ ...@@ -19,10 +19,9 @@
#include <getopt.h> #include <getopt.h>
#include "contrib/getline.h" #include "contrib/getline.h"
#include "knot/modules/rosedb.c"
#include "zscanner/scanner.h"
#include "libknot/libknot.h"
#include "contrib/string.h" #include "contrib/string.h"
#include "zscanner/scanner.h"
#include "knot/modules/rosedb/rosedb.c"
static int rosedb_add(struct cache *cache, MDB_txn *txn, int argc, char *argv[]); static int rosedb_add(struct cache *cache, MDB_txn *txn, int argc, char *argv[]);
static int rosedb_del(struct cache *cache, MDB_txn *txn, int argc, char *argv[]); static int rosedb_del(struct cache *cache, MDB_txn *txn, int argc, char *argv[]);
......
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -14,14 +14,10 @@ ...@@ -14,14 +14,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "knot/modules/synth_record.h"
#include "knot/nameserver/process_query.h"
#include "knot/nameserver/internet.h"
#include "knot/common/log.h"
#include "libknot/descriptor.h"
#include "contrib/mempattern.h" #include "contrib/mempattern.h"
#include "contrib/net.h" #include "contrib/net.h"
#include "contrib/sockaddr.h" #include "contrib/sockaddr.h"
#include "knot/modules/synth_record/synth_record.h"
/* Module configuration scheme. */ /* Module configuration scheme. */
#define MOD_NET "\x07""network" #define MOD_NET "\x07""network"
......
/* Copyright (C) 2013 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
* *
* \brief Synthetic records module * \brief Synthetic records module
* *
* Accepted configurations:
* * "forward <prefix> <ttl> <address>/<netblock>"
* * "reverse <prefix> <zone> <ttl> <address>/<netblock>"
*
* Module synthetises forward/reverse records based on a template when * Module synthetises forward/reverse records based on a template when
* the queried record can't be found in the zone contents. * the queried record can't be found in the zone contents.
* *
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "knot/modules/whoami.h" #include "knot/modules/whoami/whoami.h"
#include "knot/nameserver/process_query.h"
#include "knot/nameserver/internet.h"
#include "libknot/libknot.h"
const yp_item_t scheme_mod_whoami[] = { const yp_item_t scheme_mod_whoami[] = {
{ C_ID, YP_TSTR, YP_VNONE }, { C_ID, YP_TSTR, YP_VNONE },
......
...@@ -15,22 +15,19 @@ ...@@ -15,22 +15,19 @@
*/ */
#include "knot/nameserver/query_module.h" #include "knot/nameserver/query_module.h"
#include "libknot/libknot.h"
#include "contrib/mempattern.h" #include "contrib/mempattern.h"
#include "contrib/openbsd/strlcpy.h"
/* Compiled-in module headers. */ #include "knot/modules/synth_record/synth_record.h"
#include "knot/modules/synth_record.h" #include "knot/modules/dnsproxy/dnsproxy.h"
#include "knot/modules/dnsproxy.h" #include "knot/modules/online_sign/online_sign.h"
#include "knot/modules/online_sign/module.h"
#ifdef HAVE_ROSEDB #ifdef HAVE_ROSEDB
#include "knot/modules/rosedb.h" #include "knot/modules/rosedb/rosedb.h"
#endif #endif
#if USE_DNSTAP #if USE_DNSTAP
#include "knot/modules/dnstap.h" #include "knot/modules/dnstap/dnstap.h"
#endif #endif
#include "knot/modules/whoami.h" #include "knot/modules/whoami/whoami.h"
#include "knot/modules/noudp.h" #include "knot/modules/noudp/noudp.h"
/*! \note All modules should be dynamically loaded later on. */ /*! \note All modules should be dynamically loaded later on. */
static_module_t MODULES[] = { static_module_t MODULES[] = {
......
/* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> /* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -39,8 +39,11 @@ ...@@ -39,8 +39,11 @@
#pragma once #pragma once
#include "libknot/libknot.h" #include "libknot/libknot.h"
#include "knot/common/log.h"
#include "knot/conf/conf.h" #include "knot/conf/conf.h"
#include "knot/conf/tools.h" #include "knot/conf/tools.h"
#include "knot/nameserver/process_query.h"
#include "knot/nameserver/internet.h"
#include "contrib/ucw/lists.h" #include "contrib/ucw/lists.h"
#define MODULE_ERR(mod, msg, ...) \ #define MODULE_ERR(mod, msg, ...) \
......
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