summaryrefslogtreecommitdiffstats
path: root/include/dnsjit/test
diff options
context:
space:
mode:
Diffstat (limited to 'include/dnsjit/test')
-rw-r--r--include/dnsjit/test/Makefile.am52
-rw-r--r--include/dnsjit/test/Makefile.in947
-rw-r--r--include/dnsjit/test/dns.pcapbin0 -> 20228 bytes
-rw-r--r--include/dnsjit/test/dns.pcap.lz4bin0 -> 7560 bytes
-rw-r--r--include/dnsjit/test/dns.pcap.zstbin0 -> 3972 bytes
-rw-r--r--include/dnsjit/test/pellets.pcapbin0 -> 9177 bytes
-rwxr-xr-xinclude/dnsjit/test/test-base64url.sh20
-rwxr-xr-xinclude/dnsjit/test/test-ipsplit.sh20
-rwxr-xr-xinclude/dnsjit/test/test-trie.sh20
-rw-r--r--include/dnsjit/test/test1.gold1493
-rwxr-xr-xinclude/dnsjit/test/test1.sh31
-rw-r--r--include/dnsjit/test/test2.gold42
-rwxr-xr-xinclude/dnsjit/test/test2.sh21
-rw-r--r--include/dnsjit/test/test3.gold82
-rwxr-xr-xinclude/dnsjit/test/test3.sh22
-rw-r--r--include/dnsjit/test/test4.gold82
-rwxr-xr-xinclude/dnsjit/test/test4.sh21
-rwxr-xr-xinclude/dnsjit/test/test6.sh23
-rw-r--r--include/dnsjit/test/test_base64url.lua24
-rw-r--r--include/dnsjit/test/test_compressupport.lua10
-rwxr-xr-xinclude/dnsjit/test/test_ipsplit.lua294
-rwxr-xr-xinclude/dnsjit/test/test_trie.lua134
22 files changed, 3338 insertions, 0 deletions
diff --git a/include/dnsjit/test/Makefile.am b/include/dnsjit/test/Makefile.am
new file mode 100644
index 0000000..0556db6
--- /dev/null
+++ b/include/dnsjit/test/Makefile.am
@@ -0,0 +1,52 @@
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+CLEANFILES = test*.log test*.trs test*.out \
+ *.pcap-dist *.lz4-dist *.zst-dist
+
+TESTS = test1.sh test2.sh test3.sh test4.sh test6.sh test-ipsplit.sh \
+ test-trie.sh test-base64url.sh
+
+test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist
+
+test2.sh: dns.pcap-dist
+
+test3.sh: dns.pcap-dist
+
+test4.sh: dns.pcap-dist
+
+test6.sh: dns.pcap-dist
+
+test-ipsplit.sh: pellets.pcap-dist dns.pcap-dist
+
+test-trie.sh: pellets.pcap-dist dns.pcap-dist
+
+.pcap.pcap-dist:
+ cp "$<" "$@"
+
+.lz4.lz4-dist:
+ cp "$<" "$@"
+
+.zst.zst-dist:
+ cp "$<" "$@"
+
+EXTRA_DIST = $(TESTS) \
+ dns.pcap pellets.pcap test_ipsplit.lua test_trie.lua test_base64url.lua \
+ test1.gold test2.gold test3.gold test4.gold test_compressupport.lua \
+ dns.pcap.lz4 dns.pcap.zst
diff --git a/include/dnsjit/test/Makefile.in b/include/dnsjit/test/Makefile.in
new file mode 100644
index 0000000..b03a826
--- /dev/null
+++ b/include/dnsjit/test/Makefile.in
@@ -0,0 +1,947 @@
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_compiler_vendor.m4 \
+ $(top_srcdir)/m4/ax_ext.m4 \
+ $(top_srcdir)/m4/ax_gcc_x86_avx_xgetbv.m4 \
+ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
+ $(top_srcdir)/m4/ax_prepend_flag.m4 \
+ $(top_srcdir)/m4/ax_pthread.m4 \
+ $(top_srcdir)/m4/ax_require_defined.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__extra_recursive_targets = gcov-recursive
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPUEXT_FLAGS = @CPUEXT_FLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+LUAJIT = @LUAJIT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMD_FLAGS = @SIMD_FLAGS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+ck_CFLAGS = @ck_CFLAGS@
+ck_LIBS = @ck_LIBS@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+liblz4_CFLAGS = @liblz4_CFLAGS@
+liblz4_LIBS = @liblz4_LIBS@
+libzstd_CFLAGS = @libzstd_CFLAGS@
+libzstd_LIBS = @libzstd_LIBS@
+localedir = @localedir@
+localstatedir = @localstatedir@
+luajit_CFLAGS = @luajit_CFLAGS@
+luajit_LIBS = @luajit_LIBS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+CLEANFILES = test*.log test*.trs test*.out \
+ *.pcap-dist *.lz4-dist *.zst-dist
+
+TESTS = test1.sh test2.sh test3.sh test4.sh test6.sh test-ipsplit.sh \
+ test-trie.sh test-base64url.sh
+
+EXTRA_DIST = $(TESTS) \
+ dns.pcap pellets.pcap test_ipsplit.lua test_trie.lua test_base64url.lua \
+ test1.gold test2.gold test3.gold test4.gold test_compressupport.lua \
+ dns.pcap.lz4 dns.pcap.zst
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .log .lz4 .lz4-dist .pcap .pcap-dist .test .test$(EXEEXT) .trs .zst .zst-dist
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/test/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+gcov-local:
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+test1.sh.log: test1.sh
+ @p='test1.sh'; \
+ b='test1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test2.sh.log: test2.sh
+ @p='test2.sh'; \
+ b='test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test3.sh.log: test3.sh
+ @p='test3.sh'; \
+ b='test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test4.sh.log: test4.sh
+ @p='test4.sh'; \
+ b='test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test6.sh.log: test6.sh
+ @p='test6.sh'; \
+ b='test6.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ipsplit.sh.log: test-ipsplit.sh
+ @p='test-ipsplit.sh'; \
+ b='test-ipsplit.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-trie.sh.log: test-trie.sh
+ @p='test-trie.sh'; \
+ b='test-trie.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-base64url.sh.log: test-base64url.sh
+ @p='test-base64url.sh'; \
+ b='test-base64url.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+gcov: gcov-am
+
+gcov-am: gcov-local
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-TESTS check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am gcov-am \
+ gcov-local html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
+ uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist
+
+test2.sh: dns.pcap-dist
+
+test3.sh: dns.pcap-dist
+
+test4.sh: dns.pcap-dist
+
+test6.sh: dns.pcap-dist
+
+test-ipsplit.sh: pellets.pcap-dist dns.pcap-dist
+
+test-trie.sh: pellets.pcap-dist dns.pcap-dist
+
+.pcap.pcap-dist:
+ cp "$<" "$@"
+
+.lz4.lz4-dist:
+ cp "$<" "$@"
+
+.zst.zst-dist:
+ cp "$<" "$@"
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/dnsjit/test/dns.pcap b/include/dnsjit/test/dns.pcap
new file mode 100644
index 0000000..a0e585c
--- /dev/null
+++ b/include/dnsjit/test/dns.pcap
Binary files differ
diff --git a/include/dnsjit/test/dns.pcap.lz4 b/include/dnsjit/test/dns.pcap.lz4
new file mode 100644
index 0000000..d042863
--- /dev/null
+++ b/include/dnsjit/test/dns.pcap.lz4
Binary files differ
diff --git a/include/dnsjit/test/dns.pcap.zst b/include/dnsjit/test/dns.pcap.zst
new file mode 100644
index 0000000..07b43c0
--- /dev/null
+++ b/include/dnsjit/test/dns.pcap.zst
Binary files differ
diff --git a/include/dnsjit/test/pellets.pcap b/include/dnsjit/test/pellets.pcap
new file mode 100644
index 0000000..ef39a7b
--- /dev/null
+++ b/include/dnsjit/test/pellets.pcap
Binary files differ
diff --git a/include/dnsjit/test/test-base64url.sh b/include/dnsjit/test/test-base64url.sh
new file mode 100755
index 0000000..163f847
--- /dev/null
+++ b/include/dnsjit/test/test-base64url.sh
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+# Copyright (c) 2020, CZ.NIC, z.s.p.o.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/test_base64url.lua"
diff --git a/include/dnsjit/test/test-ipsplit.sh b/include/dnsjit/test/test-ipsplit.sh
new file mode 100755
index 0000000..3d118d6
--- /dev/null
+++ b/include/dnsjit/test/test-ipsplit.sh
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+# Copyright (c) 2020, CZ.NIC, z.s.p.o.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/test_ipsplit.lua"
diff --git a/include/dnsjit/test/test-trie.sh b/include/dnsjit/test/test-trie.sh
new file mode 100755
index 0000000..238eea1
--- /dev/null
+++ b/include/dnsjit/test/test-trie.sh
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+# Copyright (c) 2020, CZ.NIC, z.s.p.o.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/test_trie.lua"
diff --git a/include/dnsjit/test/test1.gold b/include/dnsjit/test/test1.gold
new file mode 100644
index 0000000..7ded214
--- /dev/null
+++ b/include/dnsjit/test/test1.gold
@@ -0,0 +1,1493 @@
+udp 172.17.0.10:53199 -> 8.8.8.8:53
+id: 59311
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:53199
+id: 59311
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 44 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157880 <12> <56>ns4.<12>
+ IN NS 157880 <12> <74>ns3.<12>
+ IN NS 157880 <12> <92>ns1.<12>
+ IN NS 157880 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157880 <110>
+ IN A 331882 <92>
+ IN A 157880 <74>
+ IN A 157880 <56>
+udp 172.17.0.10:57822 -> 8.8.8.8:53
+id: 35665
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:57822
+id: 35665
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72125 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72125 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71608 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71608 <16> <155>ns3.<131>
+ IN NS 71608 <16> <173>ns1.<131>
+ IN NS 71608 <16> <191>ns4.<131>
+additionals: class type ttl labels RR labels
+ IN A 331882 <173>
+ IN A 157880 <155>
+ IN A 157880 <191>
+ IN A 157880 <127>
+udp 172.17.0.10:40043 -> 8.8.8.8:53
+id: 5337
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:40043
+id: 5337
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 44 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157880 <12> <56>ns1.<12>
+ IN NS 157880 <12> <74>ns2.<12>
+ IN NS 157880 <12> <92>ns3.<12>
+ IN NS 157880 <12> <110>ns4.<12>
+additionals: class type ttl labels RR labels
+ IN A 157880 <74>
+ IN A 331882 <56>
+ IN A 157880 <92>
+ IN A 157880 <110>
+udp 172.17.0.10:37953 -> 8.8.8.8:53
+id: 22982
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:37953
+id: 22982
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 34 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157870 <12> <56>ns4.<12>
+ IN NS 157870 <12> <74>ns1.<12>
+ IN NS 157870 <12> <92>ns2.<12>
+ IN NS 157870 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157870 <92>
+ IN A 331872 <74>
+ IN A 157870 <110>
+ IN A 157870 <56>
+udp 172.17.0.10:48658 -> 8.8.8.8:53
+id: 18718
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:48658
+id: 18718
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72115 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72115 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71598 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71598 <16> <155>ns3.<131>
+ IN NS 71598 <16> <173>ns4.<131>
+ IN NS 71598 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331872 <191>
+ IN A 157870 <155>
+ IN A 157870 <173>
+ IN A 157870 <127>
+udp 172.17.0.10:40953 -> 8.8.8.8:53
+id: 22531
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:40953
+id: 22531
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 297 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157828 <12> <56>ns2.<12>
+ IN NS 157828 <12> <74>ns4.<12>
+ IN NS 157828 <12> <92>ns1.<12>
+ IN NS 157828 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157828 <56>
+ IN A 331830 <92>
+ IN A 157828 <110>
+ IN A 157828 <74>
+udp 172.17.0.10:45174 -> 8.8.8.8:53
+id: 58510
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:45174
+id: 58510
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 291 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157822 <12> <56>ns2.<12>
+ IN NS 157822 <12> <74>ns3.<12>
+ IN NS 157822 <12> <92>ns1.<12>
+ IN NS 157822 <12> <110>ns4.<12>
+additionals: class type ttl labels RR labels
+ IN A 157822 <56>
+ IN A 331824 <92>
+ IN A 157822 <74>
+ IN A 157822 <110>
+udp 172.17.0.10:33916 -> 8.8.8.8:53
+id: 45248
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:33916
+id: 45248
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72067 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72067 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71550 <16> <127>ns3.<131>google.<138>com.
+ IN NS 71550 <16> <155>ns4.<131>
+ IN NS 71550 <16> <173>ns2.<131>
+ IN NS 71550 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331824 <191>
+ IN A 157822 <127>
+ IN A 157822 <155>
+ IN A 157822 <173>
+udp 172.17.0.10:43559 -> 8.8.8.8:53
+id: 49483
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:43559
+id: 49483
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 285 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157816 <12> <56>ns4.<12>
+ IN NS 157816 <12> <74>ns3.<12>
+ IN NS 157816 <12> <92>ns1.<12>
+ IN NS 157816 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157816 <110>
+ IN A 331818 <92>
+ IN A 157816 <74>
+ IN A 157816 <56>
+udp 172.17.0.10:54859 -> 8.8.8.8:53
+id: 31669
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:54859
+id: 31669
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 283 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157814 <12> <56>ns2.<12>
+ IN NS 157814 <12> <74>ns1.<12>
+ IN NS 157814 <12> <92>ns4.<12>
+ IN NS 157814 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157814 <56>
+ IN A 331816 <74>
+ IN A 157814 <110>
+ IN A 157814 <92>
+udp 172.17.0.10:58176 -> 8.8.8.8:53
+id: 25433
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:58176
+id: 25433
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72059 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72059 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71542 <16> <127>ns4.<131>google.<138>com.
+ IN NS 71542 <16> <155>ns1.<131>
+ IN NS 71542 <16> <173>ns3.<131>
+ IN NS 71542 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331816 <155>
+ IN A 157814 <173>
+ IN A 157814 <127>
+ IN A 157814 <191>
+udp 172.17.0.10:41266 -> 8.8.8.8:53
+id: 63798
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:41266
+id: 63798
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 282 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157813 <12> <56>ns4.<12>
+ IN NS 157813 <12> <74>ns1.<12>
+ IN NS 157813 <12> <92>ns3.<12>
+ IN NS 157813 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157813 <110>
+ IN A 331815 <74>
+ IN A 157813 <92>
+ IN A 157813 <56>
+udp 172.17.0.10:34607 -> 8.8.8.8:53
+id: 8470
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:34607
+id: 8470
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72058 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72058 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71541 <16> <127>ns1.<131>google.<138>com.
+ IN NS 71541 <16> <155>ns2.<131>
+ IN NS 71541 <16> <173>ns4.<131>
+ IN NS 71541 <16> <191>ns3.<131>
+additionals: class type ttl labels RR labels
+ IN A 331815 <127>
+ IN A 157813 <191>
+ IN A 157813 <173>
+ IN A 157813 <155>
+udp 172.17.0.10:60437 -> 8.8.8.8:53
+id: 60258
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:60437
+id: 60258
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 281 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157812 <12> <56>ns3.<12>
+ IN NS 157812 <12> <74>ns2.<12>
+ IN NS 157812 <12> <92>ns4.<12>
+ IN NS 157812 <12> <110>ns1.<12>
+additionals: class type ttl labels RR labels
+ IN A 157812 <74>
+ IN A 331814 <110>
+ IN A 157812 <56>
+ IN A 157812 <92>
+udp 172.17.0.10:37149 -> 8.8.8.8:53
+id: 44985
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:37149
+id: 44985
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72057 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72057 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71540 <16> <127>ns4.<131>google.<138>com.
+ IN NS 71540 <16> <155>ns3.<131>
+ IN NS 71540 <16> <173>ns1.<131>
+ IN NS 71540 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331814 <173>
+ IN A 157812 <155>
+ IN A 157812 <127>
+ IN A 157812 <191>
+udp 172.17.0.10:53820 -> 8.8.8.8:53
+id: 45512
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:53820
+id: 45512
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 280 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157811 <12> <56>ns3.<12>
+ IN NS 157811 <12> <74>ns4.<12>
+ IN NS 157811 <12> <92>ns1.<12>
+ IN NS 157811 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157811 <110>
+ IN A 331813 <92>
+ IN A 157811 <56>
+ IN A 157811 <74>
+udp 172.17.0.10:52368 -> 8.8.8.8:53
+id: 22980
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:52368
+id: 22980
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72056 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72056 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71539 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71539 <16> <155>ns3.<131>
+ IN NS 71539 <16> <173>ns4.<131>
+ IN NS 71539 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331813 <191>
+ IN A 157811 <155>
+ IN A 157811 <173>
+ IN A 157811 <127>
+udp 172.17.0.10:47637 -> 8.8.8.8:53
+id: 1834
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:47637
+id: 1834
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 279 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157810 <12> <56>ns1.<12>
+ IN NS 157810 <12> <74>ns2.<12>
+ IN NS 157810 <12> <92>ns4.<12>
+ IN NS 157810 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157810 <74>
+ IN A 331812 <56>
+ IN A 157810 <110>
+ IN A 157810 <92>
+udp 172.17.0.10:34426 -> 8.8.8.8:53
+id: 25431
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:34426
+id: 25431
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72055 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72055 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71538 <16> <127>ns1.<131>google.<138>com.
+ IN NS 71538 <16> <155>ns4.<131>
+ IN NS 71538 <16> <173>ns3.<131>
+ IN NS 71538 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331812 <127>
+ IN A 157810 <173>
+ IN A 157810 <155>
+ IN A 157810 <191>
+udp 172.17.0.10:41059 -> 8.8.8.8:53
+id: 48432
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:41059
+id: 48432
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 278 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157809 <12> <56>ns3.<12>
+ IN NS 157809 <12> <74>ns4.<12>
+ IN NS 157809 <12> <92>ns2.<12>
+ IN NS 157809 <12> <110>ns1.<12>
+additionals: class type ttl labels RR labels
+ IN A 157809 <92>
+ IN A 331811 <110>
+ IN A 157809 <56>
+ IN A 157809 <74>
+udp 172.17.0.10:51181 -> 8.8.8.8:53
+id: 47411
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:51181
+id: 47411
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72054 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72054 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71537 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71537 <16> <155>ns1.<131>
+ IN NS 71537 <16> <173>ns3.<131>
+ IN NS 71537 <16> <191>ns4.<131>
+additionals: class type ttl labels RR labels
+ IN A 331811 <155>
+ IN A 157809 <173>
+ IN A 157809 <191>
+ IN A 157809 <127>
+udp 172.17.0.10:32976 -> 8.8.8.8:53
+id: 12038
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:32976
+id: 12038
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 277 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157808 <12> <56>ns2.<12>
+ IN NS 157808 <12> <74>ns3.<12>
+ IN NS 157808 <12> <92>ns1.<12>
+ IN NS 157808 <12> <110>ns4.<12>
+additionals: class type ttl labels RR labels
+ IN A 157808 <56>
+ IN A 331810 <92>
+ IN A 157808 <74>
+ IN A 157808 <110>
+udp 172.17.0.10:53467 -> 8.8.8.8:53
+id: 11614
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:53467
+id: 11614
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 275 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157806 <12> <56>ns3.<12>
+ IN NS 157806 <12> <74>ns1.<12>
+ IN NS 157806 <12> <92>ns4.<12>
+ IN NS 157806 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157806 <110>
+ IN A 331808 <74>
+ IN A 157806 <56>
+ IN A 157806 <92>
+udp 172.17.0.10:41532 -> 8.8.8.8:53
+id: 59173
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:41532
+id: 59173
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 273 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157804 <12> <56>ns1.<12>
+ IN NS 157804 <12> <74>ns3.<12>
+ IN NS 157804 <12> <92>ns2.<12>
+ IN NS 157804 <12> <110>ns4.<12>
+additionals: class type ttl labels RR labels
+ IN A 157804 <92>
+ IN A 331806 <56>
+ IN A 157804 <74>
+ IN A 157804 <110>
+udp 172.17.0.10:44982 -> 8.8.8.8:53
+id: 45535
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:44982
+id: 45535
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 271 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157802 <12> <56>ns4.<12>
+ IN NS 157802 <12> <74>ns2.<12>
+ IN NS 157802 <12> <92>ns1.<12>
+ IN NS 157802 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157802 <74>
+ IN A 331804 <92>
+ IN A 157802 <110>
+ IN A 157802 <56>
+udp 172.17.0.10:40224 -> 8.8.8.8:53
+id: 60808
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:40224
+id: 60808
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72047 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72047 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71530 <16> <127>ns3.<131>google.<138>com.
+ IN NS 71530 <16> <155>ns4.<131>
+ IN NS 71530 <16> <173>ns2.<131>
+ IN NS 71530 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331804 <191>
+ IN A 157802 <127>
+ IN A 157802 <155>
+ IN A 157802 <173>
+udp 172.17.0.10:45658 -> 8.8.8.8:53
+id: 64325
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:45658
+id: 64325
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 270 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157801 <12> <56>ns1.<12>
+ IN NS 157801 <12> <74>ns3.<12>
+ IN NS 157801 <12> <92>ns4.<12>
+ IN NS 157801 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157801 <110>
+ IN A 331803 <56>
+ IN A 157801 <74>
+ IN A 157801 <92>
+udp 172.17.0.10:60457 -> 8.8.8.8:53
+id: 25543
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:60457
+id: 25543
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72046 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72046 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71529 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71529 <16> <155>ns3.<131>
+ IN NS 71529 <16> <173>ns4.<131>
+ IN NS 71529 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331803 <191>
+ IN A 157801 <155>
+ IN A 157801 <173>
+ IN A 157801 <127>
+udp 172.17.0.10:59762 -> 8.8.8.8:53
+id: 20736
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:59762
+id: 20736
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 269 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157800 <12> <56>ns3.<12>
+ IN NS 157800 <12> <74>ns1.<12>
+ IN NS 157800 <12> <92>ns4.<12>
+ IN NS 157800 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157800 <110>
+ IN A 331802 <74>
+ IN A 157800 <56>
+ IN A 157800 <92>
+udp 172.17.0.10:56022 -> 8.8.8.8:53
+id: 25911
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:56022
+id: 25911
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72045 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72045 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71528 <16> <127>ns1.<131>google.<138>com.
+ IN NS 71528 <16> <155>ns4.<131>
+ IN NS 71528 <16> <173>ns2.<131>
+ IN NS 71528 <16> <191>ns3.<131>
+additionals: class type ttl labels RR labels
+ IN A 331802 <127>
+ IN A 157800 <191>
+ IN A 157800 <155>
+ IN A 157800 <173>
+udp 172.17.0.10:37669 -> 8.8.8.8:53
+id: 64358
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:37669
+id: 64358
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 268 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157799 <12> <56>ns2.<12>
+ IN NS 157799 <12> <74>ns1.<12>
+ IN NS 157799 <12> <92>ns4.<12>
+ IN NS 157799 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157799 <56>
+ IN A 331801 <74>
+ IN A 157799 <110>
+ IN A 157799 <92>
+udp 172.17.0.10:42978 -> 8.8.8.8:53
+id: 37698
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:42978
+id: 37698
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72044 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72044 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71527 <16> <127>ns1.<131>google.<138>com.
+ IN NS 71527 <16> <155>ns4.<131>
+ IN NS 71527 <16> <173>ns3.<131>
+ IN NS 71527 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331801 <127>
+ IN A 157799 <173>
+ IN A 157799 <155>
+ IN A 157799 <191>
+udp 172.17.0.10:49829 -> 8.8.8.8:53
+id: 54706
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:49829
+id: 54706
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 267 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157798 <12> <56>ns2.<12>
+ IN NS 157798 <12> <74>ns4.<12>
+ IN NS 157798 <12> <92>ns3.<12>
+ IN NS 157798 <12> <110>ns1.<12>
+additionals: class type ttl labels RR labels
+ IN A 157798 <56>
+ IN A 331800 <110>
+ IN A 157798 <92>
+ IN A 157798 <74>
+udp 172.17.0.10:50599 -> 8.8.8.8:53
+id: 32142
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:50599
+id: 32142
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72043 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72043 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71526 <16> <127>ns3.<131>google.<138>com.
+ IN NS 71526 <16> <155>ns1.<131>
+ IN NS 71526 <16> <173>ns2.<131>
+ IN NS 71526 <16> <191>ns4.<131>
+additionals: class type ttl labels RR labels
+ IN A 331800 <155>
+ IN A 157798 <127>
+ IN A 157798 <191>
+ IN A 157798 <173>
+udp 172.17.0.10:44980 -> 8.8.8.8:53
+id: 41808
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:44980
+id: 41808
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 266 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157797 <12> <56>ns2.<12>
+ IN NS 157797 <12> <74>ns4.<12>
+ IN NS 157797 <12> <92>ns1.<12>
+ IN NS 157797 <12> <110>ns3.<12>
+additionals: class type ttl labels RR labels
+ IN A 157797 <56>
+ IN A 331799 <92>
+ IN A 157797 <110>
+ IN A 157797 <74>
+udp 172.17.0.10:60063 -> 8.8.8.8:53
+id: 18886
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:60063
+id: 18886
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72042 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72042 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71525 <16> <127>ns3.<131>google.<138>com.
+ IN NS 71525 <16> <155>ns1.<131>
+ IN NS 71525 <16> <173>ns4.<131>
+ IN NS 71525 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331799 <155>
+ IN A 157797 <127>
+ IN A 157797 <173>
+ IN A 157797 <191>
+udp 172.17.0.10:42042 -> 8.8.8.8:53
+id: 10624
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:42042
+id: 10624
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 265 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157796 <12> <56>ns3.<12>
+ IN NS 157796 <12> <74>ns4.<12>
+ IN NS 157796 <12> <92>ns1.<12>
+ IN NS 157796 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157796 <110>
+ IN A 331798 <92>
+ IN A 157796 <56>
+ IN A 157796 <74>
+udp 172.17.0.10:60469 -> 8.8.8.8:53
+id: 33139
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:60469
+id: 33139
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72041 <12> <57>dfw06s47-in-f206.<74>1e100.<80>net.
+ IN PTR 72041 <12> <97>dfw06s47-in-f14.<74>
+authorities: class type ttl labels RR labels
+ IN NS 71524 <16> <127>ns2.<131>google.<138>com.
+ IN NS 71524 <16> <155>ns4.<131>
+ IN NS 71524 <16> <173>ns3.<131>
+ IN NS 71524 <16> <191>ns1.<131>
+additionals: class type ttl labels RR labels
+ IN A 331798 <191>
+ IN A 157796 <173>
+ IN A 157796 <155>
+ IN A 157796 <127>
+udp 172.17.0.10:45703 -> 8.8.8.8:53
+id: 61415
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:45703
+id: 61415
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 264 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157795 <12> <56>ns3.<12>
+ IN NS 157795 <12> <74>ns4.<12>
+ IN NS 157795 <12> <92>ns2.<12>
+ IN NS 157795 <12> <110>ns1.<12>
+additionals: class type ttl labels RR labels
+ IN A 157795 <92>
+ IN A 331797 <110>
+ IN A 157795 <56>
+ IN A 157795 <74>
+udp 172.17.0.10:33507 -> 8.8.8.8:53
+id: 59258
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+udp 8.8.8.8:53 -> 172.17.0.10:33507
+id: 59258
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 2
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN PTR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa.
+answers: class type ttl labels RR labels
+ IN PTR 72040 <12> <57>dfw06s47-in-f14.<73>1e100.<79>net.
+ IN PTR 72040 <12> <96>dfw06s47-in-f206.<73>
+authorities: class type ttl labels RR labels
+ IN NS 71523 <16> <127>ns1.<131>google.<138>com.
+ IN NS 71523 <16> <155>ns4.<131>
+ IN NS 71523 <16> <173>ns3.<131>
+ IN NS 71523 <16> <191>ns2.<131>
+additionals: class type ttl labels RR labels
+ IN A 331797 <127>
+ IN A 157795 <173>
+ IN A 157795 <155>
+ IN A 157795 <191>
+udp 172.17.0.10:46798 -> 8.8.8.8:53
+id: 17700
+ qr: 0
+ opcode: QUERY
+ flags: RD
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 0
+ nscount: 0
+ arcount: 0
+questions: class type labels
+ IN A <12>google.<19>com.
+udp 8.8.8.8:53 -> 172.17.0.10:46798
+id: 17700
+ qr: 1
+ opcode: QUERY
+ flags: RD RA
+ rcode: NOERROR
+ qdcount: 1
+ ancount: 1
+ nscount: 4
+ arcount: 4
+questions: class type labels
+ IN A <12>google.<19>com.
+answers: class type ttl labels RR labels
+ IN A 263 <12>
+authorities: class type ttl labels RR labels
+ IN NS 157794 <12> <56>ns1.<12>
+ IN NS 157794 <12> <74>ns4.<12>
+ IN NS 157794 <12> <92>ns3.<12>
+ IN NS 157794 <12> <110>ns2.<12>
+additionals: class type ttl labels RR labels
+ IN A 157794 <110>
+ IN A 331796 <56>
+ IN A 157794 <92>
+ IN A 157794 <74>
diff --git a/include/dnsjit/test/test1.sh b/include/dnsjit/test/test1.sh
new file mode 100755
index 0000000..1af3a21
--- /dev/null
+++ b/include/dnsjit/test/test1.sh
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap-dist >test1.out
+diff "$srcdir/test1.gold" test1.out
+
+support=`../dnsjit "$srcdir/test_compressupport.lua"`
+if echo "$support"|grep -q lz4; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.lz4-dist lz4 >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+if echo "$support"|grep -q zstd; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.zst-dist zstd >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
diff --git a/include/dnsjit/test/test2.gold b/include/dnsjit/test/test2.gold
new file mode 100644
index 0000000..2fb62b0
--- /dev/null
+++ b/include/dnsjit/test/test2.gold
@@ -0,0 +1,42 @@
+src dst id rcode qname qtype
+172.17.0.10 8.8.8.8 59311 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 35665 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 5337 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 22982 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 18718 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 22531 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 58510 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 45248 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 49483 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 31669 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 25433 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 63798 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 8470 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 60258 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 44985 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 45512 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 22980 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 1834 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 25431 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 48432 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 47411 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 12038 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 11614 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 59173 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 45535 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 60808 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 64325 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 25543 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 20736 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 25911 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 64358 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 37698 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 54706 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 32142 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 41808 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 18886 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 10624 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 33139 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 61415 NOERROR <12>google.<19>com. A
+172.17.0.10 8.8.8.8 59258 NOERROR <12>206.<16>218.<20>58.<23>216.<27>in-addr.<35>arpa. PTR
+172.17.0.10 8.8.8.8 17700 NOERROR <12>google.<19>com. A
diff --git a/include/dnsjit/test/test2.sh b/include/dnsjit/test/test2.sh
new file mode 100755
index 0000000..9a58d06
--- /dev/null
+++ b/include/dnsjit/test/test2.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/../../examples/dumpdns-qr.lua" dns.pcap-dist >test2.out
+diff "$srcdir/test2.gold" test2.out
diff --git a/include/dnsjit/test/test3.gold b/include/dnsjit/test/test3.gold
new file mode 100644
index 0000000..cdbd0bf
--- /dev/null
+++ b/include/dnsjit/test/test3.gold
@@ -0,0 +1,82 @@
+59311 172.17.0.10 -> 8.8.8.8
+59311 8.8.8.8 -> 172.17.0.10
+35665 172.17.0.10 -> 8.8.8.8
+35665 8.8.8.8 -> 172.17.0.10
+5337 172.17.0.10 -> 8.8.8.8
+5337 8.8.8.8 -> 172.17.0.10
+22982 172.17.0.10 -> 8.8.8.8
+22982 8.8.8.8 -> 172.17.0.10
+18718 172.17.0.10 -> 8.8.8.8
+18718 8.8.8.8 -> 172.17.0.10
+22531 172.17.0.10 -> 8.8.8.8
+22531 8.8.8.8 -> 172.17.0.10
+58510 172.17.0.10 -> 8.8.8.8
+58510 8.8.8.8 -> 172.17.0.10
+45248 172.17.0.10 -> 8.8.8.8
+45248 8.8.8.8 -> 172.17.0.10
+49483 172.17.0.10 -> 8.8.8.8
+49483 8.8.8.8 -> 172.17.0.10
+31669 172.17.0.10 -> 8.8.8.8
+31669 8.8.8.8 -> 172.17.0.10
+25433 172.17.0.10 -> 8.8.8.8
+25433 8.8.8.8 -> 172.17.0.10
+63798 172.17.0.10 -> 8.8.8.8
+63798 8.8.8.8 -> 172.17.0.10
+8470 172.17.0.10 -> 8.8.8.8
+8470 8.8.8.8 -> 172.17.0.10
+60258 172.17.0.10 -> 8.8.8.8
+60258 8.8.8.8 -> 172.17.0.10
+44985 172.17.0.10 -> 8.8.8.8
+44985 8.8.8.8 -> 172.17.0.10
+45512 172.17.0.10 -> 8.8.8.8
+45512 8.8.8.8 -> 172.17.0.10
+22980 172.17.0.10 -> 8.8.8.8
+22980 8.8.8.8 -> 172.17.0.10
+1834 172.17.0.10 -> 8.8.8.8
+1834 8.8.8.8 -> 172.17.0.10
+25431 172.17.0.10 -> 8.8.8.8
+25431 8.8.8.8 -> 172.17.0.10
+48432 172.17.0.10 -> 8.8.8.8
+48432 8.8.8.8 -> 172.17.0.10
+47411 172.17.0.10 -> 8.8.8.8
+47411 8.8.8.8 -> 172.17.0.10
+12038 172.17.0.10 -> 8.8.8.8
+12038 8.8.8.8 -> 172.17.0.10
+11614 172.17.0.10 -> 8.8.8.8
+11614 8.8.8.8 -> 172.17.0.10
+59173 172.17.0.10 -> 8.8.8.8
+59173 8.8.8.8 -> 172.17.0.10
+45535 172.17.0.10 -> 8.8.8.8
+45535 8.8.8.8 -> 172.17.0.10
+60808 172.17.0.10 -> 8.8.8.8
+60808 8.8.8.8 -> 172.17.0.10
+64325 172.17.0.10 -> 8.8.8.8
+64325 8.8.8.8 -> 172.17.0.10
+25543 172.17.0.10 -> 8.8.8.8
+25543 8.8.8.8 -> 172.17.0.10
+20736 172.17.0.10 -> 8.8.8.8
+20736 8.8.8.8 -> 172.17.0.10
+25911 172.17.0.10 -> 8.8.8.8
+25911 8.8.8.8 -> 172.17.0.10
+64358 172.17.0.10 -> 8.8.8.8
+64358 8.8.8.8 -> 172.17.0.10
+37698 172.17.0.10 -> 8.8.8.8
+37698 8.8.8.8 -> 172.17.0.10
+54706 172.17.0.10 -> 8.8.8.8
+54706 8.8.8.8 -> 172.17.0.10
+32142 172.17.0.10 -> 8.8.8.8
+32142 8.8.8.8 -> 172.17.0.10
+41808 172.17.0.10 -> 8.8.8.8
+41808 8.8.8.8 -> 172.17.0.10
+18886 172.17.0.10 -> 8.8.8.8
+18886 8.8.8.8 -> 172.17.0.10
+10624 172.17.0.10 -> 8.8.8.8
+10624 8.8.8.8 -> 172.17.0.10
+33139 172.17.0.10 -> 8.8.8.8
+33139 8.8.8.8 -> 172.17.0.10
+61415 172.17.0.10 -> 8.8.8.8
+61415 8.8.8.8 -> 172.17.0.10
+59258 172.17.0.10 -> 8.8.8.8
+59258 8.8.8.8 -> 172.17.0.10
+17700 172.17.0.10 -> 8.8.8.8
+17700 8.8.8.8 -> 172.17.0.10
diff --git a/include/dnsjit/test/test3.sh b/include/dnsjit/test/test3.sh
new file mode 100755
index 0000000..b9a0b64
--- /dev/null
+++ b/include/dnsjit/test/test3.sh
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/../../examples/filter_rcode.lua" dns.pcap-dist 0 >test3.out
+../dnsjit "$srcdir/../../examples/filter_rcode.lua" dns.pcap-dist 1 >>test3.out
+diff "$srcdir/test3.gold" test3.out
diff --git a/include/dnsjit/test/test4.gold b/include/dnsjit/test/test4.gold
new file mode 100644
index 0000000..f56e464
--- /dev/null
+++ b/include/dnsjit/test/test4.gold
@@ -0,0 +1,82 @@
+59311
+59311
+35665
+35665
+5337
+5337
+22982
+22982
+18718
+18718
+22531
+22531
+58510
+58510
+45248
+45248
+49483
+49483
+31669
+31669
+25433
+25433
+63798
+63798
+8470
+8470
+60258
+60258
+44985
+44985
+45512
+45512
+22980
+22980
+1834
+1834
+25431
+25431
+48432
+48432
+47411
+47411
+12038
+12038
+11614
+11614
+59173
+59173
+45535
+45535
+60808
+60808
+64325
+64325
+25543
+25543
+20736
+20736
+25911
+25911
+64358
+64358
+37698
+37698
+54706
+54706
+32142
+32142
+41808
+41808
+18886
+18886
+10624
+10624
+33139
+33139
+61415
+61415
+59258
+59258
+17700
+17700
diff --git a/include/dnsjit/test/test4.sh b/include/dnsjit/test/test4.sh
new file mode 100755
index 0000000..b2d060d
--- /dev/null
+++ b/include/dnsjit/test/test4.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/../../examples/readme.lua" dns.pcap-dist >test4.out
+diff "$srcdir/test4.gold" test4.out
diff --git a/include/dnsjit/test/test6.sh b/include/dnsjit/test/test6.sh
new file mode 100755
index 0000000..67f8e25
--- /dev/null
+++ b/include/dnsjit/test/test6.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+# Copyright (c) 2018-2021, OARC, Inc.
+# All rights reserved.
+#
+# This file is part of dnsjit.
+#
+# dnsjit 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.
+#
+# dnsjit 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 dnsjit. If not, see <http://www.gnu.org/licenses/>.
+
+../dnsjit "$srcdir/../../examples/dumpdns.lua" "$srcdir/dns.pcap" > test6-dns.out
+../dnsjit "$srcdir/../../examples/dumpdns2pcap.lua" "$srcdir/dns.pcap" test6-pcap.out
+../dnsjit "$srcdir/../../examples/dumpdns.lua" test6-pcap.out > test6-dns2.out
+diff test6-dns.out test6-dns2.out
diff --git a/include/dnsjit/test/test_base64url.lua b/include/dnsjit/test/test_base64url.lua
new file mode 100644
index 0000000..00aea6a
--- /dev/null
+++ b/include/dnsjit/test/test_base64url.lua
@@ -0,0 +1,24 @@
+base64url = require("dnsjit.lib.base64url")
+ffi = require("ffi")
+
+-- empty string works
+assert(base64url.decode(base64url.encode("")) == "")
+
+-- regular string data
+assert(base64url.encode("abcd") == "YWJjZA")
+assert(base64url.decode(base64url.encode("abcd")) == "abcd")
+
+-- invalid base64 data
+base64url.decode("+")
+
+-- check all symbols - arbitrary binary data
+c_array = ffi.new("uint8_t[?]", 256)
+bin_symbols = {}
+for i = 0, 255 do
+ bin_symbols[i + 1] = string.char(i)
+ c_array[i] = i
+end
+bin_str = table.concat(bin_symbols)
+
+assert(base64url.decode(base64url.encode(bin_str)) == bin_str)
+assert(base64url.encode(c_array, 256) == base64url.encode(bin_str))
diff --git a/include/dnsjit/test/test_compressupport.lua b/include/dnsjit/test/test_compressupport.lua
new file mode 100644
index 0000000..9d4502e
--- /dev/null
+++ b/include/dnsjit/test/test_compressupport.lua
@@ -0,0 +1,10 @@
+local zpcap = require("dnsjit.input.zpcap").new()
+
+zpcap:lz4()
+if zpcap:have_support() then
+ print("lz4")
+end
+zpcap:zstd()
+if zpcap:have_support() then
+ print("zstd")
+end
diff --git a/include/dnsjit/test/test_ipsplit.lua b/include/dnsjit/test/test_ipsplit.lua
new file mode 100755
index 0000000..43dc8a0
--- /dev/null
+++ b/include/dnsjit/test/test_ipsplit.lua
@@ -0,0 +1,294 @@
+-- Test cases for dnsjit.filter.ipsplit
+-- Some checks that use ip_pkt() assume little-endian machine and will fail otherwise
+local ffi = require("ffi")
+local object = require("dnsjit.core.objects")
+local dns = require("dnsjit.core.object.dns").new()
+
+local function dns_msgid(obj)
+ local obj = ffi.cast("core_object_t*", obj)
+ assert(obj, "obj is nil")
+ local pl = obj:cast()
+ assert(obj:type() == "payload" and pl.len > 0, "obj doesn't have payload")
+ dns.obj_prev = obj
+ dns:parse_header()
+ return dns.id
+end
+
+local function ip_pkt(obj)
+ local obj = ffi.cast("core_object_t*", obj)
+ assert(obj, "obj is nil")
+ local pl = obj:cast()
+ assert(obj:type() == "payload" and pl.len > 0, "obj doesn't have payload")
+
+ local pkt = obj.obj_prev
+ while pkt ~= nil do
+ if pkt.obj_type == object.IP or pkt.obj_type == object.IP6 then
+ return pkt:cast()
+ end
+ pkt = pkt.obj_prev
+ end
+ assert(pkt, "obj has no ip/ip6 layer")
+end
+
+
+-----------------------------------------------------
+-- pellets.pcap: client detection
+--
+-- All packets have IPv6 layer and are expected to
+-- be sucessfully processed by ipsplit filter.
+-- Clients should be identified from source ip.
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local copy = require("dnsjit.filter.copy").new()
+local ipsplit = require("dnsjit.filter.ipsplit").new()
+local out1 = require("dnsjit.core.channel").new(256)
+local out2 = require("dnsjit.core.channel").new(256)
+
+input:open_offline("pellets.pcap-dist")
+layer:producer(input)
+ipsplit:receiver(out1)
+ipsplit:receiver(out2)
+ipsplit:overwrite_dst()
+copy:obj_type(object.IP)
+copy:obj_type(object.IP6)
+copy:obj_type(object.PAYLOAD)
+copy:receiver(ipsplit)
+
+local prod, pctx = layer:produce()
+local recv, rctx = copy:receive()
+
+-- Process entire PCAP first, channels are large enough to bufer all packets
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ recv(rctx, obj)
+end
+out1:close()
+out2:close()
+
+assert(ipsplit:discarded() == 0, "some valid packets have been discarded")
+assert(out1:size() == 47, "out1: some IPv6 packets lost by filter")
+assert(out2:size() == 44, "out2: some IPv6 packets lost by filter")
+
+-- out1: test individual packets
+local i = 0
+while true do
+ local obj = out1:get()
+ if obj == nil then break end
+ i = i + 1
+
+ if i == 1 then
+ assert(dns_msgid(obj) == 0x0a31, "pkt 1: client 1, pkt 1 -> out1")
+ assert(ip_pkt(obj):source() == "2001:0db8:beef:feed:0000:0000:0000:0003")
+ assert(ip_pkt(obj):destination() == "0100:0000:0000:0000:0000:0000:0000:0001")
+ end
+ if i == 2 then
+ assert(dns_msgid(obj) == 0xb3e8, "pkt 3: client 3, pkt 1 -> out1")
+ assert(ip_pkt(obj):source() == "2001:0db8:beef:feed:0000:0000:0000:0005")
+ assert(ip_pkt(obj):destination() == "0200:0000:0000:0000:0000:0000:0000:0001")
+ end
+ if i == 3 then
+ assert(dns_msgid(obj) == 0xb3e9, "pkt 4: client 3, pkt 2 -> out1")
+ assert(ip_pkt(obj):source() == "2001:0db8:beef:feed:0000:0000:0000:0005")
+ assert(ip_pkt(obj):destination() == "0200:0000:0000:0000:0000:0000:0000:0001")
+ end
+ if i == 13 then assert(dns_msgid(obj) == 0x4a05, "pkt 16: client 7, pkt 1 -> out1") end
+ if i == 14 then assert(dns_msgid(obj) == 0x4a06, "pkt 17: client 7, pkt 2 -> out1") end
+end
+
+-- out2: test individual packets
+local i = 0
+while true do
+ local obj = out2:get()
+ if obj == nil then break end
+ i = i + 1
+
+ if i == 1 then
+ assert(dns_msgid(obj) == 0xe6bd, "pkt 2: client 2, pkt 1 -> out2")
+ assert(ip_pkt(obj):source() == "2001:0db8:beef:feed:0000:0000:0000:0004")
+ assert(ip_pkt(obj):destination() == "0100:0000:0000:0000:0000:0000:0000:0001")
+ end
+ if i == 4 then assert(dns_msgid(obj) == 0xabfe, "pkt 18: client 8, pkt 1 -> out2") end
+ if i == 5 then assert(dns_msgid(obj) == 0xabff, "pkt 21: client 8, pkt 2 -> out2") end
+end
+
+
+-----------------------------------------------------
+-- pellets.pcap: weighted ipsplit:sequential()
+--
+-- Test sequential client assignment that respects
+-- weight.
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local copy = require("dnsjit.filter.copy").new()
+local ipsplit = require("dnsjit.filter.ipsplit").new()
+local out1 = require("dnsjit.core.channel").new(256)
+local out2 = require("dnsjit.core.channel").new(256)
+
+input:open_offline("pellets.pcap-dist")
+layer:producer(input)
+ipsplit:receiver(out1, 3)
+ipsplit:receiver(out2, 2)
+copy:obj_type(object.IP)
+copy:obj_type(object.IP6)
+copy:obj_type(object.PAYLOAD)
+copy:receiver(ipsplit)
+
+local prod, pctx = layer:produce()
+local recv, rctx = copy:receive()
+
+-- Process entire PCAP first, channels are large enough to bufer all packets
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ recv(rctx, obj)
+end
+out1:close()
+out2:close()
+
+assert(ipsplit:discarded() == 0, "some valid packets have been discarded")
+assert(out1:size() + out2:size() == 91, "some IPv6 packets lost by filter")
+
+-- out1: test individual packets
+local i = 0
+while true do
+ local obj = out1:get()
+ if obj == nil then break end
+ i = i + 1
+
+ if i == 1 then
+ assert(dns_msgid(obj) == 0x0a31, "pkt 1: client 1, pkt 1 -> out1")
+ assert(ip_pkt(obj):source() == "2001:0db8:beef:feed:0000:0000:0000:0003")
+ assert(ip_pkt(obj):destination() == "0000:0000:0000:0000:0000:0000:0000:0001")
+ end
+ if i == 2 then assert(dns_msgid(obj) == 0xe6bd, "pkt 2: client 2, pkt 1 -> out1") end
+ if i == 3 then assert(dns_msgid(obj) == 0xb3e8, "pkt 3: client 3, pkt 1 -> out1") end
+ if i == 4 then assert(dns_msgid(obj) == 0xb3e9, "pkt 4: client 3, pkt 2 -> out1") end
+ if i == 5 then assert(dns_msgid(obj) == 0x0a6f, "pkt 9: client 6, pkt 1 -> out1") end
+end
+
+-- out2: test individual packets
+local i = 0
+while true do
+ local obj = out2:get()
+ if obj == nil then break end
+ i = i + 1
+
+ if i == 1 then assert(dns_msgid(obj) == 0xaac6, "pkt 5: client 4, pkt 1 -> out2") end
+ if i == 2 then assert(dns_msgid(obj) == 0xaea6, "pkt 6: client 5, pkt 1 -> out2") end
+ if i == 3 then assert(dns_msgid(obj) == 0xaea7, "pkt 7: client 5, pkt 2 -> out2") end
+end
+
+-----------------------------------------------------
+-- pellets.pcap: weighted ipsplit:random()
+--
+-- Test sequential client assignment that respects
+-- weight.
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local copy = require("dnsjit.filter.copy").new()
+local ipsplit = require("dnsjit.filter.ipsplit").new()
+local out1 = require("dnsjit.core.channel").new(256)
+local out2 = require("dnsjit.core.channel").new(256)
+
+input:open_offline("pellets.pcap-dist")
+layer:producer(input)
+ipsplit:receiver(out1, 85)
+ipsplit:receiver(out2, 15)
+ipsplit:random()
+copy:obj_type(object.IP)
+copy:obj_type(object.IP6)
+copy:obj_type(object.PAYLOAD)
+copy:receiver(ipsplit)
+
+local prod, pctx = layer:produce()
+local recv, rctx = copy:receive()
+
+-- Process entire PCAP first, channels are large enough to bufer all packets
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ recv(rctx, obj)
+end
+out1:close()
+out2:close()
+
+assert(ipsplit:discarded() == 0, "some valid packets have been discarded")
+assert(out1:size() == 81, "out1: some IPv6 packets lost by filter")
+assert(out2:size() == 10, "out2: some IPv6 packets lost by filter")
+
+-- out1: test individual packets
+local i = 0
+while true do
+ local obj = out1:get()
+ if obj == nil then break end
+ i = i + 1
+ if i == 1 then assert(dns_msgid(obj) == 0xe6bd, "pkt 1: client 2, pkt 1 -> out1") end
+ if i == 2 then assert(dns_msgid(obj) == 0xb3e8, "pkt 2: client 3, pkt 1 -> out1") end
+ if i == 3 then assert(dns_msgid(obj) == 0xb3e9, "pkt 3: client 3, pkt 2 -> out1") end
+ if i == 5 then assert(dns_msgid(obj) == 0xaea6, "pkt 4: client 5, pkt 1 -> out1") end
+ if i == 29 then assert(dns_msgid(obj) == 0xaeaf, "pkt 29: client 5, pkt 10 -> out1") end
+end
+
+-- out2: test individual packets
+local i = 0
+while true do
+ local obj = out2:get()
+ if obj == nil then break end
+ i = i + 1
+ if i == 1 then assert(dns_msgid(obj) == 0x0a31, "pkt 1: client 1, pkt 1 -> out2") end
+ if i == 2 then assert(dns_msgid(obj) == 0x0a6f, "pkt 2: client 6, pkt 1 -> out2") end
+ if i == 10 then assert(dns_msgid(obj) == 0x0a70, "pkt 10: client 6, pkt 2 -> out2") end
+end
+
+-----------------------------------------------------
+-- Tests with dns.pcap
+--
+-- Packets use IPv4 and not all packets have IP layer
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local copy = require("dnsjit.filter.copy").new()
+local ipsplit = require("dnsjit.filter.ipsplit").new()
+local out1 = require("dnsjit.core.channel").new(256)
+local out2 = require("dnsjit.core.channel").new(256)
+
+input:open_offline("dns.pcap-dist")
+layer:producer(input)
+ipsplit:receiver(out1)
+ipsplit:receiver(out2)
+ipsplit:overwrite_src()
+copy:obj_type(object.IP)
+copy:obj_type(object.IP6)
+copy:obj_type(object.PAYLOAD)
+copy:receiver(ipsplit)
+
+local prod, pctx = layer:produce()
+local recv, rctx = copy:receive()
+
+-- Process entire PCAP first, channels are large enough to bufer all packets
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ recv(rctx, obj)
+end
+out1:close()
+out2:close()
+
+assert(out1:size() + out2:size() == 123, "some IPv4 packets lost by filter")
+
+-- out1: test individual packets
+local i = 0
+while true do
+ local obj = out1:get()
+ if obj == nil then break end
+ i = i + 1
+ if i == 1 then
+ assert(dns_msgid(obj) == 0xe7af)
+ assert(ip_pkt(obj):source() == "1.0.0.0")
+ assert(ip_pkt(obj):destination() == "8.8.8.8")
+ end
+end
diff --git a/include/dnsjit/test/test_trie.lua b/include/dnsjit/test/test_trie.lua
new file mode 100755
index 0000000..ddaccdf
--- /dev/null
+++ b/include/dnsjit/test/test_trie.lua
@@ -0,0 +1,134 @@
+-- Test cases for dnsjit.lib.trie
+
+local function key_compare(node1, node2)
+ local key1, keylen1 = node1:key()
+ local key2, keylen2 = node2:key()
+ if keylen1 ~= keylen2 then return false end
+ for i = 0, keylen1 - 1 do
+ if key1[i] ~= key2[i] then return false end
+ end
+ return true
+end
+
+-----------------------------------------------------
+-- binary-key trie with which stores numbers
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local object = require("dnsjit.core.objects")
+local ip = require("dnsjit.lib.ip")
+local trie = require("dnsjit.lib.trie").new("uint32_t", true, 16)
+
+input:open_offline("pellets.pcap-dist")
+layer:producer(input)
+
+local prod, pctx = layer:produce()
+
+-- fill trie with values
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ local pkt = obj:cast_to(object.IP6)
+
+ if pkt ~= nil then
+ -- count number of packets per IP
+ local node = trie:get_ins(pkt.src)
+ node:set(node:get() + 1)
+ end
+end
+
+assert(trie:weight() == 29)
+
+-- test iterator and check values
+local iter = trie:iter()
+local node = iter:node()
+local npkts = 0
+
+local i = 0
+while node ~= nil do
+ i = i + 1
+ local ip6str = ip.tostring(node:key())
+ local val = tonumber(node:get())
+ npkts = npkts + val
+
+ if i == 1 then assert(ip6str == "2001:0db8:beef:feed:0000:0000:0000:0003" and val == 1) end
+ if i == 1 then
+ local first = trie:get_first()
+ assert(key_compare(node, first))
+ assert(node:get() == first:get())
+ end
+ if i == 2 then assert(ip6str == "2001:0db8:beef:feed:0000:0000:0000:0004" and val == 1) end
+ if i == 2 then
+ local second = trie:get_try(node:key())
+ assert(key_compare(node, second))
+ assert(node:get() == second:get())
+ end
+ if i == 5 then assert(ip6str == "2001:0db8:beef:feed:0000:0000:0000:0008" and val == 10) end
+ if i == 29 then assert(ip6str == "2001:0db8:beef:feed:0000:0000:0000:0042" and val == 1) end
+
+ iter:next()
+ node = iter:node()
+end
+
+assert(npkts == 91)
+
+trie:clear()
+assert(trie:weight() == 0)
+
+
+-----------------------------------------------------
+-- string-key trie with which stores objects
+-----------------------------------------------------
+local input = require("dnsjit.input.pcap").new()
+local layer = require("dnsjit.filter.layer").new()
+local object = require("dnsjit.core.objects")
+local trie = require("dnsjit.lib.trie").new("core_object_t*")
+
+input:open_offline("dns.pcap-dist")
+layer:producer(input)
+
+local prod, pctx = layer:produce()
+
+-- fill trie with values
+while true do
+ local obj = prod(pctx)
+ if obj == nil then break end
+ local pkt = obj:cast_to(object.IP)
+
+ if pkt ~= nil then
+ local node = trie:get_ins(pkt:source())
+ local pkt2 = node:get()
+ if val ~= nil then
+ val:free()
+ end
+ node:set(pkt:copy():uncast())
+ end
+end
+
+assert(trie:weight() == 3)
+
+local node
+node = trie:get_first()
+assert(node:key() == "172.17.0.10")
+pkt = node:get():cast()
+assert(pkt:source() == "172.17.0.10")
+assert(pkt.id == 0x538b)
+pkt:free()
+
+node = trie:get_try("8.8.8.8")
+assert(node:key() == "8.8.8.8")
+pkt = node:get():cast()
+assert(pkt:source() == "8.8.8.8")
+pkt:free()
+
+node = trie:get_try("216.58.218.206")
+assert(node:key() == "216.58.218.206")
+pkt = node:get():cast()
+assert(pkt:source() == "216.58.218.206")
+pkt:free()
+
+node = trie:get_try("nonexistent")
+assert(node == nil)
+
+trie:clear()
+assert(trie:weight() == 0)