summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 03:37:17 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 03:37:17 -0400
commit2e2f4ab33afd09e5b4ad3abe75e871cbb21961d4 (patch)
treebe840d9b1e9b7ac4ac57d9320383a666c7aeb0eb
parentde98d9505cd1f2b7f508088efe68cb0a95f8ef88 (diff)
libbasic-dns
-rw-r--r--config.mk.in4
-rw-r--r--src/grp-resolve/libbasic-dns/Makefile101
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h (renamed from src/grp-resolve/libbasic-dns/dns-type.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h (renamed from src/grp-resolve/libbasic-dns/resolved-def.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h (renamed from src/grp-resolve/libbasic-dns/resolved-dns-answer.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h (renamed from src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h (renamed from src/grp-resolve/libbasic-dns/resolved-dns-packet.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h (renamed from src/grp-resolve/libbasic-dns/resolved-dns-question.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h (renamed from src/grp-resolve/libbasic-dns/resolved-dns-rr.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/src/Makefile56
-rw-r--r--src/grp-resolve/libbasic-dns/src/dns-type.c (renamed from src/grp-resolve/libbasic-dns/dns-type.c)3
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c (renamed from src/grp-resolve/libbasic-dns/resolved-dns-answer.c)5
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c (renamed from src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c)5
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c (renamed from src/grp-resolve/libbasic-dns/resolved-dns-packet.c)3
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-question.c (renamed from src/grp-resolve/libbasic-dns/resolved-dns-question.c)5
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c (renamed from src/grp-resolve/libbasic-dns/resolved-dns-rr.c)9
-rw-r--r--src/grp-resolve/libbasic-dns/test/Makefile99
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts)bin169 -> 169 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts)bin986 -> 986 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts)bin196 -> 196 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts)bin1483 -> 1483 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts)bin1010 -> 1010 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/google.com.pkts)bin747 -> 747 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts)bin1803 -> 1803 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/root.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/root.pkts)bin1061 -> 1061 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts)bin330 -> 330 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts)bin1021 -> 1021 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts (renamed from src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts)bin2533 -> 2533 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dns-packet.c (renamed from src/grp-resolve/libbasic-dns/test-dns-packet.c)5
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c (renamed from src/grp-resolve/libbasic-dns/test-dnssec-complex.c)3
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dnssec.c (renamed from src/grp-resolve/libbasic-dns/test-dnssec.c)5
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-resolve-tables.c (renamed from src/grp-resolve/libbasic-dns/test-resolve-tables.c)3
-rw-r--r--src/grp-resolve/systemd-resolve/Makefile2
-rw-r--r--src/grp-resolve/systemd-resolve/resolve-tool.c4
-rw-r--r--src/grp-resolve/systemd-resolved/Makefile1
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-bus.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-cache.c4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-cache.h8
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-scope.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stream.h2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-transaction.h6
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.h6
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-etc-hosts.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link.h2
50 files changed, 209 insertions, 160 deletions
diff --git a/config.mk.in b/config.mk.in
index 098d29373d..1188b75e92 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -144,8 +144,8 @@ libnetworkd-core.CPPFLAGS = -I$(topsrcdir)/src/grp-network/libnetworkd-core $(l
libnetworkd-core.DEPENDS = $(topoutdir)/src/grp-network/libnetworkd-core/libnetworkd-core.la
libudev-core.CPPFLAGS = -I$(topoutdir)/src/grp-udev/libudev-core $(libsystemd-network.CPPFLAGS) $(libsystemd-shared.CPPFLAGS)
libudev-core.DEPENDS = $(topoutdir)/src/grp-udev/libudev-core/libudev-core.la
-libbasic-dns.CPPFLAGS = -I$(topoutdir)/src/grp-resolve/libbasic-dns -I$(topsrcdir)/src/grp-resolve/libbasic-dns
-libbasic-dns.DEPENDS = $(topoutdir)/src/grp-resolve/libbasic-dns/libbasic-dns.la
+libbasic-dns.CPPFLAGS = -I$(topsrcdir)/src/grp-resolve/libbasic-dns/include
+libbasic-dns.DEPENDS = $(topoutdir)/src/grp-resolve/libbasic-dns/src/libbasic-dns.la
libimport.CPPFLAGS = -I$(topsrcdir)/src/grp-machine/grp-import/libimport
libimport.DEPENDS = $(topoutdir)/src/grp-machine/grp-import/libimport/libimport.la
# NSS modules
diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile
index 294283d062..9979a2e3d6 100644
--- a/src/grp-resolve/libbasic-dns/Makefile
+++ b/src/grp-resolve/libbasic-dns/Makefile
@@ -23,105 +23,6 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-$(outdir)/dns_type-list.txt: $(srcdir)/dns-type.h
- $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
-
-$(outdir)/dns_type-to-name.h: $(outdir)/dns_type-list.txt
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
-
-$(outdir)/dns_type-from-name.gperf: $(outdir)/dns_type-list.txt
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
-
-basic_dns_sources =
-libbasic_dns_la_SOURCES = \
- src/resolve/resolved-dns-dnssec.c \
- src/resolve/resolved-dns-dnssec.h \
- src/resolve/resolved-dns-packet.c \
- src/resolve/resolved-dns-packet.h \
- src/resolve/resolved-dns-rr.c \
- src/resolve/resolved-dns-rr.h \
- src/resolve/resolved-dns-answer.c \
- src/resolve/resolved-dns-answer.h \
- src/resolve/resolved-dns-question.c \
- src/resolve/resolved-dns-question.h \
- src/resolve/dns-type.c \
- src/resolve/dns-type.h
-
-tests += \
- test-dns-packet \
- test-resolve-tables \
- test-dnssec
-
-manual_tests += \
- test-dnssec-complex
-
-test_resolve_tables_SOURCES = \
- src/resolve/test-resolve-tables.c \
- src/resolve/dns_type-from-name.h \
- src/resolve/dns_type-to-name.h \
- $(basic_dns_sources) \
- src/shared/test-tables.h
-
-test_resolve_tables_CFLAGS = \
- $(GCRYPT_CFLAGS)
-
-test_resolve_tables_LDADD = \
- libbasic-dns.la \
- libsystemd-shared.la \
- $(GCRYPT_LIBS) \
- -lm
-
-test_dns_packet_SOURCES = \
- src/resolve/test-dns-packet.c \
- $(basic_dns_sources)
-
-test_dns_packet_CPPFLAGS = \
- -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
-
-test_dns_packet_CFLAGS = \
- $(GCRYPT_CFLAGS)
-
-test_dns_packet_LDADD = \
- libbasic-dns.la \
- $(GCRYPT_LIBS) \
- -lm
-
-EXTRA_DIST += \
- src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
- src/resolve/test-data/fedoraproject.org.pkts \
- src/resolve/test-data/gandi.net.pkts \
- src/resolve/test-data/google.com.pkts \
- src/resolve/test-data/root.pkts \
- src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
- src/resolve/test-data/teamits.com.pkts \
- src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
- src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
- src/resolve/test-data/kyhwana.org.pkts \
- src/resolve/test-data/fake-caa.pkts
-
-test_dnssec_SOURCES = \
- src/resolve/test-dnssec.c \
- $(basic_dns_sources)
-
-test_dnssec_CFLAGS = \
- $(GCRYPT_CFLAGS)
-
-test_dnssec_LDADD = \
- libbasic-dns.la \
- libsystemd-shared.la \
- $(GCRYPT_LIBS) \
- -lm
-
-test_dnssec_complex_SOURCES = \
- src/resolve/test-dnssec-complex.c \
- src/resolve/dns-type.c \
- src/resolve/dns-type.h
-
-test_dnssec_complex_LDADD = \
- libsystemd-shared.la
-
-noinst_LTLIBRARIES = libbasic-dns.la
-libbasic_dns_la_LIBADD = libsystemd-shared.la
-$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h
+nested.subdirs += src test
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/dns-type.h b/src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h
index df1642f85e..df1642f85e 100644
--- a/src/grp-resolve/libbasic-dns/dns-type.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-def.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h
index c4c1915b18..c4c1915b18 100644
--- a/src/grp-resolve/libbasic-dns/resolved-def.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-answer.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h
index 447604d008..447604d008 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-answer.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h
index b91abe98ac..b91abe98ac 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-packet.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h
index cb03de8986..cb03de8986 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-packet.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-question.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h
index fb1b2d2410..fb1b2d2410 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-question.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-rr.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h
index 864c7c237f..864c7c237f 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-rr.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h
diff --git a/src/grp-resolve/libbasic-dns/src/Makefile b/src/grp-resolve/libbasic-dns/src/Makefile
new file mode 100644
index 0000000000..75041cbc3d
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/src/Makefile
@@ -0,0 +1,56 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+$(outdir)/dns_type-list.txt: $(call at.path,$(srcdir)/../include/basic-dns/dns-type.h)
+ $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
+
+$(outdir)/dns_type-to-name.h: $(outdir)/dns_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+
+$(outdir)/dns_type-from-name.gperf: $(outdir)/dns_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
+
+libbasic_dns_la_SOURCES = \
+ src/resolve/resolved-dns-dnssec.c \
+ src/resolve/resolved-dns-dnssec.h \
+ src/resolve/resolved-dns-packet.c \
+ src/resolve/resolved-dns-packet.h \
+ src/resolve/resolved-dns-rr.c \
+ src/resolve/resolved-dns-rr.h \
+ src/resolve/resolved-dns-answer.c \
+ src/resolve/resolved-dns-answer.h \
+ src/resolve/resolved-dns-question.c \
+ src/resolve/resolved-dns-question.h \
+ src/resolve/dns-type.c \
+ src/resolve/dns-type.h
+
+noinst_LTLIBRARIES = libbasic-dns.la
+libbasic_dns_la_LIBADD += \
+ libsystemd-gcrypt.la \
+ libsystemd-shared.la
+
+$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/dns-type.c b/src/grp-resolve/libbasic-dns/src/dns-type.c
index 44e4970fbf..79603c4dfc 100644
--- a/src/grp-resolve/libbasic-dns/dns-type.c
+++ b/src/grp-resolve/libbasic-dns/src/dns-type.c
@@ -19,11 +19,10 @@
#include <sys/socket.h>
+#include "basic-dns/dns-type.h"
#include "systemd-basic/parse-util.h"
#include "systemd-basic/string-util.h"
-#include "dns-type.h"
-
typedef const struct {
uint16_t type;
const char *name;
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-answer.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c
index 95c1398056..afb0d3cafa 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-answer.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c
@@ -17,13 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-dnssec.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/string-util.h"
#include "systemd-shared/dns-domain.h"
-#include "resolved-dns-answer.h"
-#include "resolved-dns-dnssec.h"
-
DnsAnswer *dns_answer_new(unsigned n) {
DnsAnswer *a;
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c
index 6b14287a51..9f56ce0843 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c
@@ -21,15 +21,14 @@
#include <gcrypt.h>
#endif
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hexdecoct.h"
#include "systemd-basic/string-table.h"
#include "systemd-gcrypt/gcrypt-util.h"
#include "systemd-shared/dns-domain.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
-
#define VERIFY_RRS_MAX 256
#define MAX_KEY_SIZE (32*1024)
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-packet.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c
index 28667bb3e8..e142832211 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/string-table.h"
#include "systemd-basic/strv.h"
@@ -25,8 +26,6 @@
#include "systemd-basic/util.h"
#include "systemd-shared/dns-domain.h"
-#include "resolved-dns-packet.h"
-
#define EDNS0_OPT_DO (1<<15)
typedef struct DnsPacketRewinder {
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-question.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-question.c
index 686bc01a09..672ef6207d 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-question.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-question.c
@@ -17,12 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic-dns/dns-type.h"
+#include "basic-dns/resolved-dns-question.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-shared/dns-domain.h"
-#include "dns-type.h"
-#include "resolved-dns-question.h"
-
DnsQuestion *dns_question_new(unsigned n) {
DnsQuestion *q;
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-rr.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c
index fbe0ff65d6..35d389b802 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-rr.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c
@@ -19,6 +19,10 @@
#include <math.h>
+#include "basic-dns/dns-type.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-rr.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/escape.h"
#include "systemd-basic/hexdecoct.h"
@@ -28,11 +32,6 @@
#include "systemd-basic/terminal-util.h"
#include "systemd-shared/dns-domain.h"
-#include "dns-type.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-rr.h"
-
DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name) {
DnsResourceKey *k;
size_t l;
diff --git a/src/grp-resolve/libbasic-dns/test/Makefile b/src/grp-resolve/libbasic-dns/test/Makefile
new file mode 100644
index 0000000000..a5028500df
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/test/Makefile
@@ -0,0 +1,99 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+tests += \
+ test-dns-packet \
+ test-resolve-tables \
+ test-dnssec
+
+manual_tests += \
+ test-dnssec-complex
+
+test_resolve_tables_SOURCES = \
+ src/resolve/test-resolve-tables.c \
+ src/resolve/dns_type-from-name.h \
+ src/resolve/dns_type-to-name.h \
+ $(basic_dns_sources) \
+ src/shared/test-tables.h
+
+test_resolve_tables_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_resolve_tables_LDADD = \
+ libbasic-dns.la \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+test_dns_packet_SOURCES = \
+ src/resolve/test-dns-packet.c \
+ $(basic_dns_sources)
+
+test_dns_packet_CPPFLAGS = \
+ -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
+
+test_dns_packet_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_dns_packet_LDADD = \
+ libbasic-dns.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+EXTRA_DIST += \
+ src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
+ src/resolve/test-data/fedoraproject.org.pkts \
+ src/resolve/test-data/gandi.net.pkts \
+ src/resolve/test-data/google.com.pkts \
+ src/resolve/test-data/root.pkts \
+ src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
+ src/resolve/test-data/teamits.com.pkts \
+ src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
+ src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
+ src/resolve/test-data/kyhwana.org.pkts \
+ src/resolve/test-data/fake-caa.pkts
+
+test_dnssec_SOURCES = \
+ src/resolve/test-dnssec.c \
+ $(basic_dns_sources)
+
+test_dnssec_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_dnssec_LDADD = \
+ libbasic-dns.la \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+test_dnssec_complex_SOURCES = \
+ src/resolve/test-dnssec-complex.c \
+ src/resolve/dns-type.c \
+ src/resolve/dns-type.h
+
+test_dnssec_complex_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts
index a383c6286d..a383c6286d 100644
--- a/src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts
index 15de02e997..15de02e997 100644
--- a/src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts b/src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts
index 1c3ecc5491..1c3ecc5491 100644
--- a/src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts
index 17874844d9..17874844d9 100644
--- a/src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts b/src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts
index 5ef51e0c8e..5ef51e0c8e 100644
--- a/src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/google.com.pkts b/src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts
index f98c4cd855..f98c4cd855 100644
--- a/src/grp-resolve/libbasic-dns/test-data/google.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts
index e28a725c9a..e28a725c9a 100644
--- a/src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/root.pkts b/src/grp-resolve/libbasic-dns/test/test-data/root.pkts
index 54ba668c75..54ba668c75 100644
--- a/src/grp-resolve/libbasic-dns/test-data/root.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/root.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts b/src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
index a854249532..a854249532 100644
--- a/src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts b/src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts
index 11deb39677..11deb39677 100644
--- a/src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts
index f0a6f982df..f0a6f982df 100644
--- a/src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/libbasic-dns/test-dns-packet.c b/src/grp-resolve/libbasic-dns/test/test-dns-packet.c
index 059011513c..7a012c13dd 100644
--- a/src/grp-resolve/libbasic-dns/test-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dns-packet.c
@@ -20,6 +20,8 @@
#include <glob.h>
#include <net/if.h>
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-rr.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fileio.h"
#include "systemd-basic/glob-util.h"
@@ -29,9 +31,6 @@
#include "systemd-basic/strv.h"
#include "systemd-basic/unaligned.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-rr.h"
-
#define HASH_KEY SD_ID128_MAKE(d3,1e,48,90,4b,fa,4c,fe,af,9d,d5,a1,d7,2e,8a,b1)
static void verify_rr_copy(DnsResourceRecord *rr) {
diff --git a/src/grp-resolve/libbasic-dns/test-dnssec-complex.c b/src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c
index afa01d9858..2eb4cfe1c2 100644
--- a/src/grp-resolve/libbasic-dns/test-dnssec-complex.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c
@@ -21,6 +21,7 @@
#include <systemd/sd-bus.h>
+#include "basic-dns/dns-type.h"
#include "sd-bus/bus-common-errors.h"
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
@@ -28,8 +29,6 @@
#include "systemd-basic/string-util.h"
#include "systemd-basic/time-util.h"
-#include "dns-type.h"
-
#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
static void prefix_random(const char *name, char **ret) {
diff --git a/src/grp-resolve/libbasic-dns/test-dnssec.c b/src/grp-resolve/libbasic-dns/test/test-dnssec.c
index 1e7b4913b0..c2b8a74944 100644
--- a/src/grp-resolve/libbasic-dns/test-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dnssec.c
@@ -21,13 +21,12 @@
#include <netinet/in.h>
#include <sys/socket.h>
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-rr.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hexdecoct.h"
#include "systemd-basic/string-util.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-rr.h"
-
static void test_dnssec_canonicalize_one(const char *original, const char *canonical, int r) {
char canonicalized[DNSSEC_CANONICAL_HOSTNAME_MAX];
diff --git a/src/grp-resolve/libbasic-dns/test-resolve-tables.c b/src/grp-resolve/libbasic-dns/test/test-resolve-tables.c
index 6f96235dec..98474b1abf 100644
--- a/src/grp-resolve/libbasic-dns/test-resolve-tables.c
+++ b/src/grp-resolve/libbasic-dns/test/test-resolve-tables.c
@@ -17,10 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic-dns/dns-type.h"
#include "systemd-shared/test-tables.h"
-#include "dns-type.h"
-
int main(int argc, char **argv) {
uint16_t i;
diff --git a/src/grp-resolve/systemd-resolve/Makefile b/src/grp-resolve/systemd-resolve/Makefile
index 48c2ec1e26..2f1ad43208 100644
--- a/src/grp-resolve/systemd-resolve/Makefile
+++ b/src/grp-resolve/systemd-resolve/Makefile
@@ -37,6 +37,8 @@ systemd_resolve_CFLAGS = \
$(GCRYPT_CFLAGS)
systemd_resolve_LDADD = \
+ libsystemd-internal.la \
+ libsystemd-gcrypt.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
diff --git a/src/grp-resolve/systemd-resolve/resolve-tool.c b/src/grp-resolve/systemd-resolve/resolve-tool.c
index 6cdf125ca4..facad18086 100644
--- a/src/grp-resolve/systemd-resolve/resolve-tool.c
+++ b/src/grp-resolve/systemd-resolve/resolve-tool.c
@@ -22,8 +22,8 @@
#include <systemd/sd-bus.h>
-#include "resolved-def.h"
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-def.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "sd-netlink/netlink-util.h"
diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile
index be55959cb2..768c30bf97 100644
--- a/src/grp-resolve/systemd-resolved/Makefile
+++ b/src/grp-resolve/systemd-resolved/Makefile
@@ -79,6 +79,7 @@ systemd_resolved_CFLAGS = \
$(GCRYPT_CFLAGS)
systemd_resolved_LDADD = \
+ libsystemd-internal.la \
libsystemd-network.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
diff --git a/src/grp-resolve/systemd-resolved/resolved-bus.c b/src/grp-resolve/systemd-resolved/resolved-bus.c
index 1bef48a040..ec63fb2900 100644
--- a/src/grp-resolve/systemd-resolved/resolved-bus.c
+++ b/src/grp-resolve/systemd-resolved/resolved-bus.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-def.h"
+#include "basic-dns/resolved-def.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
index fa4a2a42d1..1f8811c5de 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
@@ -19,8 +19,8 @@
#include <net/if.h>
-#include "resolved-dns-answer.h"
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/string-util.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-cache.h b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h
index 5c3d850bc8..c2b6a987b9 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h
@@ -31,10 +31,10 @@ typedef struct DnsCache {
unsigned n_miss;
} DnsCache;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-rr.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "basic-dns/resolved-dns-rr.h"
void dns_cache_flush(DnsCache *c);
void dns_cache_prune(DnsCache *c);
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
index 5b5cc8b532..7c270ccd2b 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "dns-type.h"
+#include "basic-dns/dns-type.h"
#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hostname-util.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.h b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
index 04d3034499..bc26a58f21 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
@@ -22,8 +22,8 @@
#include <systemd/sd-bus.h>
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
#include "systemd-basic/set.h"
typedef struct DnsQuery DnsQuery;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
index 6e7d0e5e79..3ca4623068 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/list.h"
typedef struct DnsScope DnsScope;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
index 7af574411b..3d5a3c22d1 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/socket-util.h"
typedef struct DnsStream DnsStream;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
index 2309105068..23b05587ac 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
#include "resolved-manager.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
index 5837e982d4..cfd2a35da8 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
@@ -57,9 +57,9 @@ enum DnsTransactionSource {
_DNS_TRANSACTION_SOURCE_INVALID = -1
};
-#include "resolved-dns-answer.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-question.h"
#include "resolved-dns-scope.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
index fb0e76b917..53cd9d8f55 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
@@ -19,7 +19,7 @@
#include <systemd/sd-messages.h>
-#include "resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-dnssec.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/conf-files.h"
#include "systemd-basic/def.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
index 6d1b2d3655..9039bd7aa3 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-answer.h"
-#include "resolved-dns-rr.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-rr.h"
#include "systemd-basic/hashmap.h"
typedef struct DnsTrustAnchor DnsTrustAnchor;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
index 4b6f571447..723df26454 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-packet.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/list.h"
#include "systemd-basic/string-util.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
index c5ba404cbf..fe656be793 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
@@ -26,9 +26,9 @@ typedef struct DnsZone {
Hashmap *by_name;
} DnsZone;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-rr.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "basic-dns/resolved-dns-rr.h"
typedef enum DnsZoneItemState DnsZoneItemState;
typedef struct DnsZoneItem DnsZoneItem;
diff --git a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
index e68d87417e..49e449b56d 100644
--- a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
+++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
#include "resolved-manager.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-link.h b/src/grp-resolve/systemd-resolved/resolved-link.h
index 0d3d54a620..271309914f 100644
--- a/src/grp-resolve/systemd-resolved/resolved-link.h
+++ b/src/grp-resolve/systemd-resolved/resolved-link.h
@@ -21,7 +21,7 @@
#include <net/if.h>
-#include "resolved-dns-rr.h"
+#include "basic-dns/resolved-dns-rr.h"
#include "systemd-basic/in-addr-util.h"
#include "systemd-basic/ratelimit.h"
#include "systemd-shared/resolve-util.h"