Commit 494b93af authored by Daniel Salzman's avatar Daniel Salzman

contrib: move dnstap

parent 91f99691
......@@ -59,10 +59,10 @@
/src/libknot.pc
# dnstap
/src/dnstap/Makefile
/src/dnstap/Makefile.in
/src/dnstap/dnstap.pb-c.c
/src/dnstap/dnstap.pb-c.h
/src/contrib/dnstap/Makefile
/src/contrib/dnstap/Makefile.in
/src/contrib/dnstap/dnstap.pb-c.c
/src/contrib/dnstap/dnstap.pb-c.h
# zscanner
/src/zscanner/scanner.c
......
......@@ -35,6 +35,17 @@ src/contrib/base32hex.c
src/contrib/base32hex.h
src/contrib/base64.c
src/contrib/base64.h
src/contrib/dnstap/Makefile.am
src/contrib/dnstap/convert.c
src/contrib/dnstap/convert.h
src/contrib/dnstap/dnstap.c
src/contrib/dnstap/dnstap.h
src/contrib/dnstap/message.c
src/contrib/dnstap/message.h
src/contrib/dnstap/reader.c
src/contrib/dnstap/reader.h
src/contrib/dnstap/writer.c
src/contrib/dnstap/writer.h
src/contrib/endian.h
src/contrib/getline.c
src/contrib/getline.h
......@@ -196,17 +207,6 @@ src/dnssec/utils/legacy/privkey.h
src/dnssec/utils/legacy/pubkey.c
src/dnssec/utils/legacy/pubkey.h
src/dnssec/utils/print.h
src/dnstap/Makefile.am
src/dnstap/convert.c
src/dnstap/convert.h
src/dnstap/dnstap.c
src/dnstap/dnstap.h
src/dnstap/message.c
src/dnstap/message.h
src/dnstap/reader.c
src/dnstap/reader.h
src/dnstap/writer.c
src/dnstap/writer.h
src/knot/common/evsched.c
src/knot/common/evsched.h
src/knot/common/fdset.c
......
......@@ -492,7 +492,7 @@ AC_CONFIG_FILES([Makefile
src/Makefile
tests/Makefile
tests-fuzz/Makefile
src/dnstap/Makefile
src/contrib/dnstap/Makefile
src/zscanner/Makefile
src/dnssec/Makefile
src/dnssec/tests/Makefile
......
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
SUBDIRS = zscanner dnssec dnstap .
SUBDIRS = zscanner dnssec contrib/dnstap .
lib_LTLIBRARIES = \
libknot.la
......@@ -371,7 +371,7 @@ libknotd_la_SOURCES += \
knot/modules/dnstap.c \
knot/modules/dnstap.h
libknotd_la_CPPFLAGS += $(DNSTAP_CFLAGS)
libknotd_la_LIBADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
libknotd_la_LIBADD += $(DNSTAP_LIBS) contrib/dnstap/libdnstap.la
endif # HAVE_DNSTAP
if HAVE_ROSEDB
......@@ -454,8 +454,8 @@ knsupdate_LDADD = zscanner/libzscanner.la libknotus.la
#######################################
if HAVE_DNSTAP
kdig_LDADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
khost_LDADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
kdig_LDADD += $(DNSTAP_LIBS) contrib/dnstap/libdnstap.la
khost_LDADD += $(DNSTAP_LIBS) contrib/dnstap/libdnstap.la
endif # HAVE_DNSTAP
if HAVE_ROSEDB
......
......@@ -19,8 +19,8 @@
#include <netinet/in.h>
#include <netinet/ip.h>
#include "dnstap/convert.h"
#include "dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/convert.h"
#include "contrib/dnstap/dnstap.pb-c.h"
/*!
* \brief Translation between real and Dnstap value.
......
......@@ -14,9 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file convert.h
*
* \author Jan Vcelak <jan.vcelak@nic.cz>
* \file
*
* \brief Dnstap identifiers conversions.
*
......@@ -28,7 +26,7 @@
#include <stdbool.h>
#include "dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/dnstap.pb-c.h"
/*!
* \brief Get Dnstap socket family from the real one.
......
......@@ -17,7 +17,7 @@
#include <stdint.h>
#include <stdlib.h>
#include "dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/dnstap.pb-c.h"
#define DNSTAP_INITIAL_BUF_SIZE 256
......
......@@ -14,11 +14,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file dnstap.h
* \file
*
* \author Robert Edmonds <edmonds@fsi.io>
*
* \brief Public interface for dnstap.
*
* \addtogroup dnstap
* @{
*/
......@@ -27,7 +29,7 @@
#include <stddef.h>
#include <stdint.h>
#include "dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/dnstap.pb-c.h"
/*! \brief Frame Streams "Content Type" value for dnstap. */
#define DNSTAP_CONTENT_TYPE "protobuf:dnstap.Dnstap"
......
......@@ -14,16 +14,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <netinet/in.h> // sockaddr_in
#include <netinet/in.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h> // memset
#include <string.h>
#include "libknot/libknot.h"
#include "libknot/errcode.h"
#include "dnstap/convert.h"
#include "dnstap/message.h"
#include "contrib/dnstap/convert.h"
#include "contrib/dnstap/message.h"
static void set_address(const struct sockaddr *sockaddr,
ProtobufCBinaryData *addr,
......
......@@ -14,11 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file message.h
* \file
*
* \author Robert Edmonds <edmonds@fsi.io>
*
* \brief dnstap message interface.
* \brief Dnstap message interface.
*
* \addtogroup dnstap
* @{
......@@ -26,11 +26,11 @@
#pragma once
#include <sys/socket.h> // struct sockaddr
#include <sys/time.h> // struct timeval
#include <stddef.h> // size_t
#include <sys/socket.h>
#include <sys/time.h>
#include <stddef.h>
#include "dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/dnstap.pb-c.h"
/*!
* \brief Fill a Dnstap__Message structure with the given parameters.
......
......@@ -14,16 +14,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h> // uint8_t, uint32_t
#include <stdio.h> // fopen, fwrite
#include <stdlib.h> // calloc, free
#include <string.h> // strdup
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libknot/libknot.h"
#include "libknot/errcode.h"
#include "libknot/internal/macros.h"
#include "dnstap/dnstap.h"
#include "dnstap/reader.h"
#include "contrib/dnstap/dnstap.h"
#include "contrib/dnstap/reader.h"
dt_reader_t* dt_reader_create(const char *file_path)
{
......
......@@ -14,9 +14,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file reader.h
* \file
*
* \brief dnstap file reader.
* \brief Dnstap file reader.
*
* \addtogroup dnstap
* @{
......@@ -27,7 +27,7 @@
#include <fstrm.h>
#include <protobuf-c/protobuf-c.h>
#include "dnstap.pb-c.h"
#include "contrib/dnstap/dnstap.pb-c.h"
/*! \brief Structure for dnstap file reader. */
typedef struct {
......
......@@ -14,15 +14,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h> // uint8_t, uint32_t
#include <stdio.h> // fopen, fwrite
#include <stdlib.h> // calloc, free
#include <string.h> // strdup
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libknot/libknot.h"
#include "libknot/errcode.h"
#include "dnstap/dnstap.h"
#include "dnstap/writer.h"
#include "contrib/dnstap/dnstap.h"
#include "contrib/dnstap/writer.h"
dt_writer_t* dt_writer_create(const char *file_path, const char *version)
{
......
......@@ -14,11 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file writer.h
* \file
*
* \author Robert Edmonds <edmonds@fsi.io>
*
* \brief dnstap file writer.
* \brief Dnstap file writer.
*
* \addtogroup dnstap
* @{
......
......@@ -19,10 +19,10 @@
#include "knot/common/log.h"
#include "knot/modules/dnstap.h"
#include "knot/nameserver/process_query.h"
#include "dnstap/dnstap.pb-c.h"
#include "dnstap/writer.h"
#include "dnstap/message.h"
#include "dnstap/dnstap.h"
#include "contrib/dnstap/dnstap.pb-c.h"
#include "contrib/dnstap/writer.h"
#include "contrib/dnstap/message.h"
#include "contrib/dnstap/dnstap.h"
#include "libknot/libknot.h"
/* Module configuration scheme. */
......
......@@ -30,9 +30,9 @@
#include "contrib/print.h"
#if USE_DNSTAP
# include "dnstap/convert.h"
# include "dnstap/message.h"
# include "dnstap/writer.h"
# include "contrib/dnstap/convert.h"
# include "contrib/dnstap/message.h"
# include "contrib/dnstap/writer.h"
static int write_dnstap(dt_writer_t *writer,
const bool is_response,
......
......@@ -35,8 +35,8 @@
#include "contrib/sockaddr.h"
#if USE_DNSTAP
# include "dnstap/reader.h"
# include "dnstap/writer.h"
# include "contrib/dnstap/reader.h"
# include "contrib/dnstap/writer.h"
#endif // USE_DNSTAP
#define KDIG_VERSION "kdig, version " PACKAGE_VERSION "\n"
......
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