From f3d8514681a6a9a0664d3ad0b6b72eb87346f92f Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Thu, 14 Jan 2021 23:24:53 +0000
Subject: Prepare for 2.3.5.0, s6dns_message_get_domain_nodecode() now public
---
.gitignore | 3 ++
INSTALL | 2 +-
NEWS | 7 ++++
doc/index.html | 4 +-
doc/libs6dns/s6dns-message.html | 19 +++++++--
doc/upgrade.html | 10 +++++
package/deps.mak | 14 +++----
package/info | 2 +-
src/include/s6-dns/s6dns-message.h | 1 +
src/libs6dns/deps-lib/s6dns | 2 +-
src/libs6dns/s6dns-message-internal.h | 1 -
src/libs6dns/s6dns_engine.c | 3 +-
src/libs6dns/s6dns_message_get_domain.c | 3 +-
src/libs6dns/s6dns_message_get_domain_internal.c | 49 ------------------------
src/libs6dns/s6dns_message_get_domain_nodecode.c | 49 ++++++++++++++++++++++++
src/libs6dns/s6dns_message_parse_skipqd.c | 3 +-
16 files changed, 101 insertions(+), 71 deletions(-)
delete mode 100644 src/libs6dns/s6dns_message_get_domain_internal.c
create mode 100644 src/libs6dns/s6dns_message_get_domain_nodecode.c
diff --git a/.gitignore b/.gitignore
index fe331b4..d30de7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,9 @@
/libs6dns.so.xyzzy
/libskadns.a.xyzzy
/libskadns.so.xyzzy
+/libdcache.a.xyzzy
+/libdcache.so.xyzzy
+/s6-dnsip
/s6-dnsip4
/s6-dnsip4-filter
/s6-dnsip6
diff --git a/INSTALL b/INSTALL
index 8bbd34a..86d9d71 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- - skalibs version 2.10.0.0 or later: http://skarnet.org/software/skalibs/
+ - skalibs version 2.10.0.1 or later: http://skarnet.org/software/skalibs/
This software will run on any operating system that implements
POSIX.1-2008, available at:
diff --git a/NEWS b/NEWS
index 906d2ae..c037045 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
Changelog for s6-dns.
+In 2.3.5.0
+----------
+
+ - s6dns_message_get_domain_internal() is now public under the
+name s6dns_message_get_domain_nodecode().
+
+
In 2.3.4.0
----------
diff --git a/doc/index.html b/doc/index.html
index 7af0349..f7b0ed7 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -46,7 +46,7 @@ point in the future.
A POSIX-compliant system with a standard C development environment
GNU make, version 3.81 or later
skalibs version
-2.10.0.0 or later. It's a build-time requirement. It's also a run-time
+2.10.0.1 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs library.
@@ -60,7 +60,7 @@ requirement if you link against the shared version of the skalibs library.
Download
- - The current released version of s6-dns is 2.3.4.0.
+ - The current released version of s6-dns is 2.3.5.0.
- Alternatively, you can checkout a copy of the
s6-dns
git repository:
diff --git a/doc/libs6dns/s6dns-message.html b/doc/libs6dns/s6dns-message.html
index 315b375..14c5527 100644
--- a/doc/libs6dns/s6dns-message.html
+++ b/doc/libs6dns/s6dns-message.html
@@ -134,9 +134,14 @@ the series of character-strings.
- unsigned int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
-Reads a domain and stores it, in string form, into *d.
-Returns 1 on success and 0 on failure, and sets errno:
+ size_t s6dns_message_get_domain_nodecode (char *out, size_t outmax, char const *packet, unsigned int packetlen, unsigned int *pos)
+Reads a domain and stores it, in packet form, into *out, which is a character
+array that must have been preallocated by the user; outmax is the maximum
+number of characters that can be stored in out. As a special
+case, out can be NULL, in which case nothing will be written, but
+the domain will still be parsed and pos will still be updated.
+The function returns the number of characters written to out
+(or that would have been). If 0, it denotes a failure, and errno is set:
@@ -145,8 +150,16 @@ Returns 1 on success and 0 on failure, and sets errno:
misused.
- EPROTONOSUPPORT: the domain encoding uses an extension that the function
does not recognize.
+ - ENAMETOOLONG: the domain cannot be stored in outmax characters.
+
+ unsigned int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
+Reads a domain and stores it, in string form, into *d.
+Returns 1 on success and 0 on failure, and sets errno just like the
+function above.
+
+
int s6dns_message_get_hinfo (s6dns_message_rr_hinfo_t *p, char const *packet, unsigned int packetlen, unsigned int *pos)
Reads a HINFO RR and stores it into *p. Returns 1 on success or 0
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 5b7b9bb..496066e 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,16 @@
What has changed in s6-dns
+ in 2.3.5.0
+
+
+
in 2.3.4.0
diff --git a/package/deps.mak b/package/deps.mak
index eb634f0..3cb587d 100644
--- a/package/deps.mak
+++ b/package/deps.mak
@@ -78,7 +78,7 @@ src/libs6dns/s6dns_domain_fromstring_qualify_encode.o src/libs6dns/s6dns_domain_
src/libs6dns/s6dns_domain_noqualify.o src/libs6dns/s6dns_domain_noqualify.lo: src/libs6dns/s6dns_domain_noqualify.c src/include/s6-dns/s6dns-domain.h
src/libs6dns/s6dns_domain_qualify.o src/libs6dns/s6dns_domain_qualify.lo: src/libs6dns/s6dns_domain_qualify.c src/include/s6-dns/s6dns-domain.h
src/libs6dns/s6dns_domain_tostring.o src/libs6dns/s6dns_domain_tostring.lo: src/libs6dns/s6dns_domain_tostring.c src/include/s6-dns/s6dns-domain.h
-src/libs6dns/s6dns_engine.o src/libs6dns/s6dns_engine.lo: src/libs6dns/s6dns_engine.c src/include/s6-dns/s6dns-constants.h src/include/s6-dns/s6dns-engine.h src/include/s6-dns/s6dns-message.h src/libs6dns/s6dns-message-internal.h
+src/libs6dns/s6dns_engine.o src/libs6dns/s6dns_engine.lo: src/libs6dns/s6dns_engine.c src/include/s6-dns/s6dns-constants.h src/include/s6-dns/s6dns-engine.h src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_engine_free.o src/libs6dns/s6dns_engine_free.lo: src/libs6dns/s6dns_engine_free.c src/include/s6-dns/s6dns-engine.h
src/libs6dns/s6dns_engine_freen.o src/libs6dns/s6dns_engine_freen.lo: src/libs6dns/s6dns_engine_freen.c src/include/s6-dns/s6dns-engine.h
src/libs6dns/s6dns_engine_here.o src/libs6dns/s6dns_engine_here.lo: src/libs6dns/s6dns_engine_here.c src/include/s6-dns/s6dns-engine.h
@@ -97,8 +97,8 @@ src/libs6dns/s6dns_message_counts_pack.o src/libs6dns/s6dns_message_counts_pack.
src/libs6dns/s6dns_message_counts_unpack.o src/libs6dns/s6dns_message_counts_unpack.lo: src/libs6dns/s6dns_message_counts_unpack.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_counts_zero.o src/libs6dns/s6dns_message_counts_zero.lo: src/libs6dns/s6dns_message_counts_zero.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_get_caa.o src/libs6dns/s6dns_message_get_caa.lo: src/libs6dns/s6dns_message_get_caa.c src/include/s6-dns/s6dns-message.h
-src/libs6dns/s6dns_message_get_domain.o src/libs6dns/s6dns_message_get_domain.lo: src/libs6dns/s6dns_message_get_domain.c src/include/s6-dns/s6dns-domain.h src/include/s6-dns/s6dns-message.h src/libs6dns/s6dns-message-internal.h
-src/libs6dns/s6dns_message_get_domain_internal.o src/libs6dns/s6dns_message_get_domain_internal.lo: src/libs6dns/s6dns_message_get_domain_internal.c src/libs6dns/s6dns-message-internal.h
+src/libs6dns/s6dns_message_get_domain.o src/libs6dns/s6dns_message_get_domain.lo: src/libs6dns/s6dns_message_get_domain.c src/include/s6-dns/s6dns-domain.h src/include/s6-dns/s6dns-message.h
+src/libs6dns/s6dns_message_get_domain_nodecode.o src/libs6dns/s6dns_message_get_domain_nodecode.lo: src/libs6dns/s6dns_message_get_domain_nodecode.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_get_hinfo.o src/libs6dns/s6dns_message_get_hinfo.lo: src/libs6dns/s6dns_message_get_hinfo.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_get_mx.o src/libs6dns/s6dns_message_get_mx.lo: src/libs6dns/s6dns_message_get_mx.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_get_soa.o src/libs6dns/s6dns_message_get_soa.lo: src/libs6dns/s6dns_message_get_soa.c src/include/s6-dns/s6dns-message.h
@@ -123,7 +123,7 @@ src/libs6dns/s6dns_message_parse_getrr.o src/libs6dns/s6dns_message_parse_getrr.
src/libs6dns/s6dns_message_parse_init.o src/libs6dns/s6dns_message_parse_init.lo: src/libs6dns/s6dns_message_parse_init.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_parse_next.o src/libs6dns/s6dns_message_parse_next.lo: src/libs6dns/s6dns_message_parse_next.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_message_parse_question.o src/libs6dns/s6dns_message_parse_question.lo: src/libs6dns/s6dns_message_parse_question.c src/include/s6-dns/s6dns-constants.h src/include/s6-dns/s6dns-message.h
-src/libs6dns/s6dns_message_parse_skipqd.o src/libs6dns/s6dns_message_parse_skipqd.lo: src/libs6dns/s6dns_message_parse_skipqd.c src/include/s6-dns/s6dns-message.h src/libs6dns/s6dns-message-internal.h
+src/libs6dns/s6dns_message_parse_skipqd.o src/libs6dns/s6dns_message_parse_skipqd.lo: src/libs6dns/s6dns_message_parse_skipqd.c src/include/s6-dns/s6dns-message.h
src/libs6dns/s6dns_rci_free.o src/libs6dns/s6dns_rci_free.lo: src/libs6dns/s6dns_rci_free.c src/include/s6-dns/s6dns-rci.h
src/libs6dns/s6dns_rci_here.o src/libs6dns/s6dns_rci_here.lo: src/libs6dns/s6dns_rci_here.c src/include/s6-dns/s6dns-rci.h
src/libs6dns/s6dns_rci_init.o src/libs6dns/s6dns_rci_init.lo: src/libs6dns/s6dns_rci_init.c src/include/s6-dns/s6dns-constants.h src/include/s6-dns/s6dns-rci.h
@@ -201,12 +201,12 @@ s6-dnstxt: src/clients/s6-dnstxt.o ${LIBS6DNS}
s6-randomip: EXTRA_LIBS := -lskarnet ${SOCKET_LIB} ${SYSCLOCK_LIB}
s6-randomip: src/clients/s6-randomip.o
ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),)
-libs6dns.a.xyzzy: src/libs6dns/s6dns_constants_error.o src/libs6dns/s6dns_constants_error_str.o src/libs6dns/s6dns_debughook_zero.o src/libs6dns/s6dns_domain_arpafromip4.o src/libs6dns/s6dns_domain_arpafromip6.o src/libs6dns/s6dns_domain_decode.o src/libs6dns/s6dns_domain_encode.o src/libs6dns/s6dns_domain_encodelist.o src/libs6dns/s6dns_domain_fromstring.o src/libs6dns/s6dns_domain_fromstring_noqualify_encode.o src/libs6dns/s6dns_domain_fromstring_qualify_encode.o src/libs6dns/s6dns_domain_noqualify.o src/libs6dns/s6dns_domain_qualify.o src/libs6dns/s6dns_domain_tostring.o src/libs6dns/s6dns_engine.o src/libs6dns/s6dns_engine_free.o src/libs6dns/s6dns_engine_freen.o src/libs6dns/s6dns_engine_here.o src/libs6dns/s6dns_engine_nextdeadline.o src/libs6dns/s6dns_engine_zero.o src/libs6dns/s6dns_fmt_domainlist.o src/libs6dns/s6dns_fmt_hinfo.o src/libs6dns/s6dns_fmt_mx.o src/libs6dns/s6dns_fmt_soa.o src/libs6dns/s6dns_fmt_srv.o src/libs6dns/s6dns_fmt_caa.o src/libs6dns/s6dns_message_counts_next.o src/libs6dns/s6dns_message_counts_pack.o src/libs6dns/s6dns_message_counts_unpack.o src/libs6dns/s6dns_message_counts_zero.o src/libs6dns/s6dns_message_get_domain.o src/libs6dns/s6dns_message_get_domain_internal.o src/libs6dns/s6dns_message_get_hinfo.o src/libs6dns/s6dns_message_get_string.o src/libs6dns/s6dns_message_get_string_internal.o src/libs6dns/s6dns_message_get_strings.o src/libs6dns/s6dns_message_get_mx.o src/libs6dns/s6dns_message_get_soa.o src/libs6dns/s6dns_message_get_srv.o src/libs6dns/s6dns_message_get_caa.o src/libs6dns/s6dns_message_header_pack.o src/libs6dns/s6dns_message_header_unpack.o src/libs6dns/s6dns_message_header_zero.o src/libs6dns/s6dns_message_parse_answer_aaaa.o src/libs6dns/s6dns_message_parse_answer_a.o src/libs6dns/s6dns_message_parse_answer_domain.o src/libs6dns/s6dns_message_parse_answer_hinfo.o src/libs6dns/s6dns_message_parse_answer_mx.o src/libs6dns/s6dns_message_parse_answer_soa.o src/libs6dns/s6dns_message_parse_answer_srv.o src/libs6dns/s6dns_message_parse_answer_caa.o src/libs6dns/s6dns_message_parse_answer_strings.o src/libs6dns/s6dns_message_parse.o src/libs6dns/s6dns_message_parse_getrr.o src/libs6dns/s6dns_message_parse_init.o src/libs6dns/s6dns_message_parse_next.o src/libs6dns/s6dns_message_parse_question.o src/libs6dns/s6dns_message_parse_skipqd.o src/libs6dns/s6dns_rci_free.o src/libs6dns/s6dns_rci_here.o src/libs6dns/s6dns_rci_init.o src/libs6dns/s6dns_rci_zero.o src/libs6dns/s6dns_resolve_core.o src/libs6dns/s6dns_resolve_parse.o src/libs6dns/s6dns_resolven_loop.o src/libs6dns/s6dns_resolven_parse.o src/libs6dns/s6dns_resolve_dpag.o src/libs6dns/s6dns_resolve_mpag.o src/libs6dns/s6dns_resolve_name4.o src/libs6dns/s6dns_resolve_name6.o src/libs6dns/s6dns_resolvenoq.o src/libs6dns/s6dns_resolveq.o src/libs6dns/s6dns_resolvenoq_aaaaa.o src/libs6dns/s6dns_resolveq_aaaaa.o src/libs6dns/s6dns_analyze_packet.o src/libs6dns/s6dns_analyze_qtype_parse.o src/libs6dns/s6dns_analyze_record.o src/libs6dns/s6dns_analyze_record_a.o src/libs6dns/s6dns_analyze_record_aaaa.o src/libs6dns/s6dns_analyze_record_hinfo.o src/libs6dns/s6dns_analyze_record_mx.o src/libs6dns/s6dns_analyze_record_soa.o src/libs6dns/s6dns_analyze_record_srv.o src/libs6dns/s6dns_analyze_record_caa.o src/libs6dns/s6dns_analyze_record_domain.o src/libs6dns/s6dns_analyze_record_strings.o src/libs6dns/s6dns_analyze_record_unknown.o src/libs6dns/s6dns_analyze_rtypetable.o src/libs6dns/s6dns_debug_dumpdt_stdout.o src/libs6dns/s6dns_debug_dumpdt_stderr.o src/libs6dns/s6dns_debug_dumpdt_post_recv.o src/libs6dns/s6dns_debug_dumpdt_pre_send.o src/libs6dns/s6dns_debug_dumpdt_post_send.o src/libs6dns/s6dns_init.o src/libs6dns/s6dns_finish.o
+libs6dns.a.xyzzy: src/libs6dns/s6dns_constants_error.o src/libs6dns/s6dns_constants_error_str.o src/libs6dns/s6dns_debughook_zero.o src/libs6dns/s6dns_domain_arpafromip4.o src/libs6dns/s6dns_domain_arpafromip6.o src/libs6dns/s6dns_domain_decode.o src/libs6dns/s6dns_domain_encode.o src/libs6dns/s6dns_domain_encodelist.o src/libs6dns/s6dns_domain_fromstring.o src/libs6dns/s6dns_domain_fromstring_noqualify_encode.o src/libs6dns/s6dns_domain_fromstring_qualify_encode.o src/libs6dns/s6dns_domain_noqualify.o src/libs6dns/s6dns_domain_qualify.o src/libs6dns/s6dns_domain_tostring.o src/libs6dns/s6dns_engine.o src/libs6dns/s6dns_engine_free.o src/libs6dns/s6dns_engine_freen.o src/libs6dns/s6dns_engine_here.o src/libs6dns/s6dns_engine_nextdeadline.o src/libs6dns/s6dns_engine_zero.o src/libs6dns/s6dns_fmt_domainlist.o src/libs6dns/s6dns_fmt_hinfo.o src/libs6dns/s6dns_fmt_mx.o src/libs6dns/s6dns_fmt_soa.o src/libs6dns/s6dns_fmt_srv.o src/libs6dns/s6dns_fmt_caa.o src/libs6dns/s6dns_message_counts_next.o src/libs6dns/s6dns_message_counts_pack.o src/libs6dns/s6dns_message_counts_unpack.o src/libs6dns/s6dns_message_counts_zero.o src/libs6dns/s6dns_message_get_domain.o src/libs6dns/s6dns_message_get_domain_nodecode.o src/libs6dns/s6dns_message_get_hinfo.o src/libs6dns/s6dns_message_get_string.o src/libs6dns/s6dns_message_get_string_internal.o src/libs6dns/s6dns_message_get_strings.o src/libs6dns/s6dns_message_get_mx.o src/libs6dns/s6dns_message_get_soa.o src/libs6dns/s6dns_message_get_srv.o src/libs6dns/s6dns_message_get_caa.o src/libs6dns/s6dns_message_header_pack.o src/libs6dns/s6dns_message_header_unpack.o src/libs6dns/s6dns_message_header_zero.o src/libs6dns/s6dns_message_parse_answer_aaaa.o src/libs6dns/s6dns_message_parse_answer_a.o src/libs6dns/s6dns_message_parse_answer_domain.o src/libs6dns/s6dns_message_parse_answer_hinfo.o src/libs6dns/s6dns_message_parse_answer_mx.o src/libs6dns/s6dns_message_parse_answer_soa.o src/libs6dns/s6dns_message_parse_answer_srv.o src/libs6dns/s6dns_message_parse_answer_caa.o src/libs6dns/s6dns_message_parse_answer_strings.o src/libs6dns/s6dns_message_parse.o src/libs6dns/s6dns_message_parse_getrr.o src/libs6dns/s6dns_message_parse_init.o src/libs6dns/s6dns_message_parse_next.o src/libs6dns/s6dns_message_parse_question.o src/libs6dns/s6dns_message_parse_skipqd.o src/libs6dns/s6dns_rci_free.o src/libs6dns/s6dns_rci_here.o src/libs6dns/s6dns_rci_init.o src/libs6dns/s6dns_rci_zero.o src/libs6dns/s6dns_resolve_core.o src/libs6dns/s6dns_resolve_parse.o src/libs6dns/s6dns_resolven_loop.o src/libs6dns/s6dns_resolven_parse.o src/libs6dns/s6dns_resolve_dpag.o src/libs6dns/s6dns_resolve_mpag.o src/libs6dns/s6dns_resolve_name4.o src/libs6dns/s6dns_resolve_name6.o src/libs6dns/s6dns_resolvenoq.o src/libs6dns/s6dns_resolveq.o src/libs6dns/s6dns_resolvenoq_aaaaa.o src/libs6dns/s6dns_resolveq_aaaaa.o src/libs6dns/s6dns_analyze_packet.o src/libs6dns/s6dns_analyze_qtype_parse.o src/libs6dns/s6dns_analyze_record.o src/libs6dns/s6dns_analyze_record_a.o src/libs6dns/s6dns_analyze_record_aaaa.o src/libs6dns/s6dns_analyze_record_hinfo.o src/libs6dns/s6dns_analyze_record_mx.o src/libs6dns/s6dns_analyze_record_soa.o src/libs6dns/s6dns_analyze_record_srv.o src/libs6dns/s6dns_analyze_record_caa.o src/libs6dns/s6dns_analyze_record_domain.o src/libs6dns/s6dns_analyze_record_strings.o src/libs6dns/s6dns_analyze_record_unknown.o src/libs6dns/s6dns_analyze_rtypetable.o src/libs6dns/s6dns_debug_dumpdt_stdout.o src/libs6dns/s6dns_debug_dumpdt_stderr.o src/libs6dns/s6dns_debug_dumpdt_post_recv.o src/libs6dns/s6dns_debug_dumpdt_pre_send.o src/libs6dns/s6dns_debug_dumpdt_post_send.o src/libs6dns/s6dns_init.o src/libs6dns/s6dns_finish.o
else
-libs6dns.a.xyzzy: src/libs6dns/s6dns_constants_error.lo src/libs6dns/s6dns_constants_error_str.lo src/libs6dns/s6dns_debughook_zero.lo src/libs6dns/s6dns_domain_arpafromip4.lo src/libs6dns/s6dns_domain_arpafromip6.lo src/libs6dns/s6dns_domain_decode.lo src/libs6dns/s6dns_domain_encode.lo src/libs6dns/s6dns_domain_encodelist.lo src/libs6dns/s6dns_domain_fromstring.lo src/libs6dns/s6dns_domain_fromstring_noqualify_encode.lo src/libs6dns/s6dns_domain_fromstring_qualify_encode.lo src/libs6dns/s6dns_domain_noqualify.lo src/libs6dns/s6dns_domain_qualify.lo src/libs6dns/s6dns_domain_tostring.lo src/libs6dns/s6dns_engine.lo src/libs6dns/s6dns_engine_free.lo src/libs6dns/s6dns_engine_freen.lo src/libs6dns/s6dns_engine_here.lo src/libs6dns/s6dns_engine_nextdeadline.lo src/libs6dns/s6dns_engine_zero.lo src/libs6dns/s6dns_fmt_domainlist.lo src/libs6dns/s6dns_fmt_hinfo.lo src/libs6dns/s6dns_fmt_mx.lo src/libs6dns/s6dns_fmt_soa.lo src/libs6dns/s6dns_fmt_srv.lo src/libs6dns/s6dns_fmt_caa.lo src/libs6dns/s6dns_message_counts_next.lo src/libs6dns/s6dns_message_counts_pack.lo src/libs6dns/s6dns_message_counts_unpack.lo src/libs6dns/s6dns_message_counts_zero.lo src/libs6dns/s6dns_message_get_domain.lo src/libs6dns/s6dns_message_get_domain_internal.lo src/libs6dns/s6dns_message_get_hinfo.lo src/libs6dns/s6dns_message_get_string.lo src/libs6dns/s6dns_message_get_string_internal.lo src/libs6dns/s6dns_message_get_strings.lo src/libs6dns/s6dns_message_get_mx.lo src/libs6dns/s6dns_message_get_soa.lo src/libs6dns/s6dns_message_get_srv.lo src/libs6dns/s6dns_message_get_caa.lo src/libs6dns/s6dns_message_header_pack.lo src/libs6dns/s6dns_message_header_unpack.lo src/libs6dns/s6dns_message_header_zero.lo src/libs6dns/s6dns_message_parse_answer_aaaa.lo src/libs6dns/s6dns_message_parse_answer_a.lo src/libs6dns/s6dns_message_parse_answer_domain.lo src/libs6dns/s6dns_message_parse_answer_hinfo.lo src/libs6dns/s6dns_message_parse_answer_mx.lo src/libs6dns/s6dns_message_parse_answer_soa.lo src/libs6dns/s6dns_message_parse_answer_srv.lo src/libs6dns/s6dns_message_parse_answer_caa.lo src/libs6dns/s6dns_message_parse_answer_strings.lo src/libs6dns/s6dns_message_parse.lo src/libs6dns/s6dns_message_parse_getrr.lo src/libs6dns/s6dns_message_parse_init.lo src/libs6dns/s6dns_message_parse_next.lo src/libs6dns/s6dns_message_parse_question.lo src/libs6dns/s6dns_message_parse_skipqd.lo src/libs6dns/s6dns_rci_free.lo src/libs6dns/s6dns_rci_here.lo src/libs6dns/s6dns_rci_init.lo src/libs6dns/s6dns_rci_zero.lo src/libs6dns/s6dns_resolve_core.lo src/libs6dns/s6dns_resolve_parse.lo src/libs6dns/s6dns_resolven_loop.lo src/libs6dns/s6dns_resolven_parse.lo src/libs6dns/s6dns_resolve_dpag.lo src/libs6dns/s6dns_resolve_mpag.lo src/libs6dns/s6dns_resolve_name4.lo src/libs6dns/s6dns_resolve_name6.lo src/libs6dns/s6dns_resolvenoq.lo src/libs6dns/s6dns_resolveq.lo src/libs6dns/s6dns_resolvenoq_aaaaa.lo src/libs6dns/s6dns_resolveq_aaaaa.lo src/libs6dns/s6dns_analyze_packet.lo src/libs6dns/s6dns_analyze_qtype_parse.lo src/libs6dns/s6dns_analyze_record.lo src/libs6dns/s6dns_analyze_record_a.lo src/libs6dns/s6dns_analyze_record_aaaa.lo src/libs6dns/s6dns_analyze_record_hinfo.lo src/libs6dns/s6dns_analyze_record_mx.lo src/libs6dns/s6dns_analyze_record_soa.lo src/libs6dns/s6dns_analyze_record_srv.lo src/libs6dns/s6dns_analyze_record_caa.lo src/libs6dns/s6dns_analyze_record_domain.lo src/libs6dns/s6dns_analyze_record_strings.lo src/libs6dns/s6dns_analyze_record_unknown.lo src/libs6dns/s6dns_analyze_rtypetable.lo src/libs6dns/s6dns_debug_dumpdt_stdout.lo src/libs6dns/s6dns_debug_dumpdt_stderr.lo src/libs6dns/s6dns_debug_dumpdt_post_recv.lo src/libs6dns/s6dns_debug_dumpdt_pre_send.lo src/libs6dns/s6dns_debug_dumpdt_post_send.lo src/libs6dns/s6dns_init.lo src/libs6dns/s6dns_finish.lo
+libs6dns.a.xyzzy: src/libs6dns/s6dns_constants_error.lo src/libs6dns/s6dns_constants_error_str.lo src/libs6dns/s6dns_debughook_zero.lo src/libs6dns/s6dns_domain_arpafromip4.lo src/libs6dns/s6dns_domain_arpafromip6.lo src/libs6dns/s6dns_domain_decode.lo src/libs6dns/s6dns_domain_encode.lo src/libs6dns/s6dns_domain_encodelist.lo src/libs6dns/s6dns_domain_fromstring.lo src/libs6dns/s6dns_domain_fromstring_noqualify_encode.lo src/libs6dns/s6dns_domain_fromstring_qualify_encode.lo src/libs6dns/s6dns_domain_noqualify.lo src/libs6dns/s6dns_domain_qualify.lo src/libs6dns/s6dns_domain_tostring.lo src/libs6dns/s6dns_engine.lo src/libs6dns/s6dns_engine_free.lo src/libs6dns/s6dns_engine_freen.lo src/libs6dns/s6dns_engine_here.lo src/libs6dns/s6dns_engine_nextdeadline.lo src/libs6dns/s6dns_engine_zero.lo src/libs6dns/s6dns_fmt_domainlist.lo src/libs6dns/s6dns_fmt_hinfo.lo src/libs6dns/s6dns_fmt_mx.lo src/libs6dns/s6dns_fmt_soa.lo src/libs6dns/s6dns_fmt_srv.lo src/libs6dns/s6dns_fmt_caa.lo src/libs6dns/s6dns_message_counts_next.lo src/libs6dns/s6dns_message_counts_pack.lo src/libs6dns/s6dns_message_counts_unpack.lo src/libs6dns/s6dns_message_counts_zero.lo src/libs6dns/s6dns_message_get_domain.lo src/libs6dns/s6dns_message_get_domain_nodecode.lo src/libs6dns/s6dns_message_get_hinfo.lo src/libs6dns/s6dns_message_get_string.lo src/libs6dns/s6dns_message_get_string_internal.lo src/libs6dns/s6dns_message_get_strings.lo src/libs6dns/s6dns_message_get_mx.lo src/libs6dns/s6dns_message_get_soa.lo src/libs6dns/s6dns_message_get_srv.lo src/libs6dns/s6dns_message_get_caa.lo src/libs6dns/s6dns_message_header_pack.lo src/libs6dns/s6dns_message_header_unpack.lo src/libs6dns/s6dns_message_header_zero.lo src/libs6dns/s6dns_message_parse_answer_aaaa.lo src/libs6dns/s6dns_message_parse_answer_a.lo src/libs6dns/s6dns_message_parse_answer_domain.lo src/libs6dns/s6dns_message_parse_answer_hinfo.lo src/libs6dns/s6dns_message_parse_answer_mx.lo src/libs6dns/s6dns_message_parse_answer_soa.lo src/libs6dns/s6dns_message_parse_answer_srv.lo src/libs6dns/s6dns_message_parse_answer_caa.lo src/libs6dns/s6dns_message_parse_answer_strings.lo src/libs6dns/s6dns_message_parse.lo src/libs6dns/s6dns_message_parse_getrr.lo src/libs6dns/s6dns_message_parse_init.lo src/libs6dns/s6dns_message_parse_next.lo src/libs6dns/s6dns_message_parse_question.lo src/libs6dns/s6dns_message_parse_skipqd.lo src/libs6dns/s6dns_rci_free.lo src/libs6dns/s6dns_rci_here.lo src/libs6dns/s6dns_rci_init.lo src/libs6dns/s6dns_rci_zero.lo src/libs6dns/s6dns_resolve_core.lo src/libs6dns/s6dns_resolve_parse.lo src/libs6dns/s6dns_resolven_loop.lo src/libs6dns/s6dns_resolven_parse.lo src/libs6dns/s6dns_resolve_dpag.lo src/libs6dns/s6dns_resolve_mpag.lo src/libs6dns/s6dns_resolve_name4.lo src/libs6dns/s6dns_resolve_name6.lo src/libs6dns/s6dns_resolvenoq.lo src/libs6dns/s6dns_resolveq.lo src/libs6dns/s6dns_resolvenoq_aaaaa.lo src/libs6dns/s6dns_resolveq_aaaaa.lo src/libs6dns/s6dns_analyze_packet.lo src/libs6dns/s6dns_analyze_qtype_parse.lo src/libs6dns/s6dns_analyze_record.lo src/libs6dns/s6dns_analyze_record_a.lo src/libs6dns/s6dns_analyze_record_aaaa.lo src/libs6dns/s6dns_analyze_record_hinfo.lo src/libs6dns/s6dns_analyze_record_mx.lo src/libs6dns/s6dns_analyze_record_soa.lo src/libs6dns/s6dns_analyze_record_srv.lo src/libs6dns/s6dns_analyze_record_caa.lo src/libs6dns/s6dns_analyze_record_domain.lo src/libs6dns/s6dns_analyze_record_strings.lo src/libs6dns/s6dns_analyze_record_unknown.lo src/libs6dns/s6dns_analyze_rtypetable.lo src/libs6dns/s6dns_debug_dumpdt_stdout.lo src/libs6dns/s6dns_debug_dumpdt_stderr.lo src/libs6dns/s6dns_debug_dumpdt_post_recv.lo src/libs6dns/s6dns_debug_dumpdt_pre_send.lo src/libs6dns/s6dns_debug_dumpdt_post_send.lo src/libs6dns/s6dns_init.lo src/libs6dns/s6dns_finish.lo
endif
libs6dns.so.xyzzy: EXTRA_LIBS := -lskarnet
-libs6dns.so.xyzzy: src/libs6dns/s6dns_constants_error.lo src/libs6dns/s6dns_constants_error_str.lo src/libs6dns/s6dns_debughook_zero.lo src/libs6dns/s6dns_domain_arpafromip4.lo src/libs6dns/s6dns_domain_arpafromip6.lo src/libs6dns/s6dns_domain_decode.lo src/libs6dns/s6dns_domain_encode.lo src/libs6dns/s6dns_domain_encodelist.lo src/libs6dns/s6dns_domain_fromstring.lo src/libs6dns/s6dns_domain_fromstring_noqualify_encode.lo src/libs6dns/s6dns_domain_fromstring_qualify_encode.lo src/libs6dns/s6dns_domain_noqualify.lo src/libs6dns/s6dns_domain_qualify.lo src/libs6dns/s6dns_domain_tostring.lo src/libs6dns/s6dns_engine.lo src/libs6dns/s6dns_engine_free.lo src/libs6dns/s6dns_engine_freen.lo src/libs6dns/s6dns_engine_here.lo src/libs6dns/s6dns_engine_nextdeadline.lo src/libs6dns/s6dns_engine_zero.lo src/libs6dns/s6dns_fmt_domainlist.lo src/libs6dns/s6dns_fmt_hinfo.lo src/libs6dns/s6dns_fmt_mx.lo src/libs6dns/s6dns_fmt_soa.lo src/libs6dns/s6dns_fmt_srv.lo src/libs6dns/s6dns_fmt_caa.lo src/libs6dns/s6dns_message_counts_next.lo src/libs6dns/s6dns_message_counts_pack.lo src/libs6dns/s6dns_message_counts_unpack.lo src/libs6dns/s6dns_message_counts_zero.lo src/libs6dns/s6dns_message_get_domain.lo src/libs6dns/s6dns_message_get_domain_internal.lo src/libs6dns/s6dns_message_get_hinfo.lo src/libs6dns/s6dns_message_get_string.lo src/libs6dns/s6dns_message_get_string_internal.lo src/libs6dns/s6dns_message_get_strings.lo src/libs6dns/s6dns_message_get_mx.lo src/libs6dns/s6dns_message_get_soa.lo src/libs6dns/s6dns_message_get_srv.lo src/libs6dns/s6dns_message_get_caa.lo src/libs6dns/s6dns_message_header_pack.lo src/libs6dns/s6dns_message_header_unpack.lo src/libs6dns/s6dns_message_header_zero.lo src/libs6dns/s6dns_message_parse_answer_aaaa.lo src/libs6dns/s6dns_message_parse_answer_a.lo src/libs6dns/s6dns_message_parse_answer_domain.lo src/libs6dns/s6dns_message_parse_answer_hinfo.lo src/libs6dns/s6dns_message_parse_answer_mx.lo src/libs6dns/s6dns_message_parse_answer_soa.lo src/libs6dns/s6dns_message_parse_answer_srv.lo src/libs6dns/s6dns_message_parse_answer_caa.lo src/libs6dns/s6dns_message_parse_answer_strings.lo src/libs6dns/s6dns_message_parse.lo src/libs6dns/s6dns_message_parse_getrr.lo src/libs6dns/s6dns_message_parse_init.lo src/libs6dns/s6dns_message_parse_next.lo src/libs6dns/s6dns_message_parse_question.lo src/libs6dns/s6dns_message_parse_skipqd.lo src/libs6dns/s6dns_rci_free.lo src/libs6dns/s6dns_rci_here.lo src/libs6dns/s6dns_rci_init.lo src/libs6dns/s6dns_rci_zero.lo src/libs6dns/s6dns_resolve_core.lo src/libs6dns/s6dns_resolve_parse.lo src/libs6dns/s6dns_resolven_loop.lo src/libs6dns/s6dns_resolven_parse.lo src/libs6dns/s6dns_resolve_dpag.lo src/libs6dns/s6dns_resolve_mpag.lo src/libs6dns/s6dns_resolve_name4.lo src/libs6dns/s6dns_resolve_name6.lo src/libs6dns/s6dns_resolvenoq.lo src/libs6dns/s6dns_resolveq.lo src/libs6dns/s6dns_resolvenoq_aaaaa.lo src/libs6dns/s6dns_resolveq_aaaaa.lo src/libs6dns/s6dns_analyze_packet.lo src/libs6dns/s6dns_analyze_qtype_parse.lo src/libs6dns/s6dns_analyze_record.lo src/libs6dns/s6dns_analyze_record_a.lo src/libs6dns/s6dns_analyze_record_aaaa.lo src/libs6dns/s6dns_analyze_record_hinfo.lo src/libs6dns/s6dns_analyze_record_mx.lo src/libs6dns/s6dns_analyze_record_soa.lo src/libs6dns/s6dns_analyze_record_srv.lo src/libs6dns/s6dns_analyze_record_caa.lo src/libs6dns/s6dns_analyze_record_domain.lo src/libs6dns/s6dns_analyze_record_strings.lo src/libs6dns/s6dns_analyze_record_unknown.lo src/libs6dns/s6dns_analyze_rtypetable.lo src/libs6dns/s6dns_debug_dumpdt_stdout.lo src/libs6dns/s6dns_debug_dumpdt_stderr.lo src/libs6dns/s6dns_debug_dumpdt_post_recv.lo src/libs6dns/s6dns_debug_dumpdt_pre_send.lo src/libs6dns/s6dns_debug_dumpdt_post_send.lo src/libs6dns/s6dns_init.lo src/libs6dns/s6dns_finish.lo
+libs6dns.so.xyzzy: src/libs6dns/s6dns_constants_error.lo src/libs6dns/s6dns_constants_error_str.lo src/libs6dns/s6dns_debughook_zero.lo src/libs6dns/s6dns_domain_arpafromip4.lo src/libs6dns/s6dns_domain_arpafromip6.lo src/libs6dns/s6dns_domain_decode.lo src/libs6dns/s6dns_domain_encode.lo src/libs6dns/s6dns_domain_encodelist.lo src/libs6dns/s6dns_domain_fromstring.lo src/libs6dns/s6dns_domain_fromstring_noqualify_encode.lo src/libs6dns/s6dns_domain_fromstring_qualify_encode.lo src/libs6dns/s6dns_domain_noqualify.lo src/libs6dns/s6dns_domain_qualify.lo src/libs6dns/s6dns_domain_tostring.lo src/libs6dns/s6dns_engine.lo src/libs6dns/s6dns_engine_free.lo src/libs6dns/s6dns_engine_freen.lo src/libs6dns/s6dns_engine_here.lo src/libs6dns/s6dns_engine_nextdeadline.lo src/libs6dns/s6dns_engine_zero.lo src/libs6dns/s6dns_fmt_domainlist.lo src/libs6dns/s6dns_fmt_hinfo.lo src/libs6dns/s6dns_fmt_mx.lo src/libs6dns/s6dns_fmt_soa.lo src/libs6dns/s6dns_fmt_srv.lo src/libs6dns/s6dns_fmt_caa.lo src/libs6dns/s6dns_message_counts_next.lo src/libs6dns/s6dns_message_counts_pack.lo src/libs6dns/s6dns_message_counts_unpack.lo src/libs6dns/s6dns_message_counts_zero.lo src/libs6dns/s6dns_message_get_domain.lo src/libs6dns/s6dns_message_get_domain_nodecode.lo src/libs6dns/s6dns_message_get_hinfo.lo src/libs6dns/s6dns_message_get_string.lo src/libs6dns/s6dns_message_get_string_internal.lo src/libs6dns/s6dns_message_get_strings.lo src/libs6dns/s6dns_message_get_mx.lo src/libs6dns/s6dns_message_get_soa.lo src/libs6dns/s6dns_message_get_srv.lo src/libs6dns/s6dns_message_get_caa.lo src/libs6dns/s6dns_message_header_pack.lo src/libs6dns/s6dns_message_header_unpack.lo src/libs6dns/s6dns_message_header_zero.lo src/libs6dns/s6dns_message_parse_answer_aaaa.lo src/libs6dns/s6dns_message_parse_answer_a.lo src/libs6dns/s6dns_message_parse_answer_domain.lo src/libs6dns/s6dns_message_parse_answer_hinfo.lo src/libs6dns/s6dns_message_parse_answer_mx.lo src/libs6dns/s6dns_message_parse_answer_soa.lo src/libs6dns/s6dns_message_parse_answer_srv.lo src/libs6dns/s6dns_message_parse_answer_caa.lo src/libs6dns/s6dns_message_parse_answer_strings.lo src/libs6dns/s6dns_message_parse.lo src/libs6dns/s6dns_message_parse_getrr.lo src/libs6dns/s6dns_message_parse_init.lo src/libs6dns/s6dns_message_parse_next.lo src/libs6dns/s6dns_message_parse_question.lo src/libs6dns/s6dns_message_parse_skipqd.lo src/libs6dns/s6dns_rci_free.lo src/libs6dns/s6dns_rci_here.lo src/libs6dns/s6dns_rci_init.lo src/libs6dns/s6dns_rci_zero.lo src/libs6dns/s6dns_resolve_core.lo src/libs6dns/s6dns_resolve_parse.lo src/libs6dns/s6dns_resolven_loop.lo src/libs6dns/s6dns_resolven_parse.lo src/libs6dns/s6dns_resolve_dpag.lo src/libs6dns/s6dns_resolve_mpag.lo src/libs6dns/s6dns_resolve_name4.lo src/libs6dns/s6dns_resolve_name6.lo src/libs6dns/s6dns_resolvenoq.lo src/libs6dns/s6dns_resolveq.lo src/libs6dns/s6dns_resolvenoq_aaaaa.lo src/libs6dns/s6dns_resolveq_aaaaa.lo src/libs6dns/s6dns_analyze_packet.lo src/libs6dns/s6dns_analyze_qtype_parse.lo src/libs6dns/s6dns_analyze_record.lo src/libs6dns/s6dns_analyze_record_a.lo src/libs6dns/s6dns_analyze_record_aaaa.lo src/libs6dns/s6dns_analyze_record_hinfo.lo src/libs6dns/s6dns_analyze_record_mx.lo src/libs6dns/s6dns_analyze_record_soa.lo src/libs6dns/s6dns_analyze_record_srv.lo src/libs6dns/s6dns_analyze_record_caa.lo src/libs6dns/s6dns_analyze_record_domain.lo src/libs6dns/s6dns_analyze_record_strings.lo src/libs6dns/s6dns_analyze_record_unknown.lo src/libs6dns/s6dns_analyze_rtypetable.lo src/libs6dns/s6dns_debug_dumpdt_stdout.lo src/libs6dns/s6dns_debug_dumpdt_stderr.lo src/libs6dns/s6dns_debug_dumpdt_post_recv.lo src/libs6dns/s6dns_debug_dumpdt_pre_send.lo src/libs6dns/s6dns_debug_dumpdt_post_send.lo src/libs6dns/s6dns_init.lo src/libs6dns/s6dns_finish.lo
ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),)
libskadns.a.xyzzy: src/skadns/skadns_cancel.o src/skadns/skadns_end.o src/skadns/skadns_packet.o src/skadns/skadns_packetlen.o src/skadns/skadns_release.o src/skadns/skadns_send.o src/skadns/skadns_start.o src/skadns/skadns_startf.o src/skadns/skadns_update.o src/skadns/skadns_zero.o
else
diff --git a/package/info b/package/info
index cc9acb8..1f16492 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6-dns
-version=2.3.4.0
+version=2.3.5.0
category=web
package_macro_name=S6_DNS
diff --git a/src/include/s6-dns/s6dns-message.h b/src/include/s6-dns/s6dns-message.h
index 4a89196..0b75f62 100644
--- a/src/include/s6-dns/s6dns-message.h
+++ b/src/include/s6-dns/s6dns-message.h
@@ -67,6 +67,7 @@ extern void s6dns_message_header_unpack (char const *, s6dns_message_header_t *)
extern int s6dns_message_get_string (s6dns_domain_t *, char const *, unsigned int, unsigned int *) ;
extern int s6dns_message_get_strings (char *, unsigned int, char const *, unsigned int, unsigned int *) ;
extern int s6dns_message_get_domain (s6dns_domain_t *, char const *, unsigned int, unsigned int *) ;
+extern size_t s6dns_message_get_domain_nodecode (char *, size_t, char const *, unsigned int, unsigned int *) ;
typedef struct s6dns_message_rr_hinfo_s s6dns_message_rr_hinfo_t, *s6dns_message_rr_hinfo_t_ref ;
struct s6dns_message_rr_hinfo_s
diff --git a/src/libs6dns/deps-lib/s6dns b/src/libs6dns/deps-lib/s6dns
index e9646fa..fd74385 100644
--- a/src/libs6dns/deps-lib/s6dns
+++ b/src/libs6dns/deps-lib/s6dns
@@ -29,7 +29,7 @@ s6dns_message_counts_pack.o
s6dns_message_counts_unpack.o
s6dns_message_counts_zero.o
s6dns_message_get_domain.o
-s6dns_message_get_domain_internal.o
+s6dns_message_get_domain_nodecode.o
s6dns_message_get_hinfo.o
s6dns_message_get_string.o
s6dns_message_get_string_internal.o
diff --git a/src/libs6dns/s6dns-message-internal.h b/src/libs6dns/s6dns-message-internal.h
index 9b63bcf..f44dfd3 100644
--- a/src/libs6dns/s6dns-message-internal.h
+++ b/src/libs6dns/s6dns-message-internal.h
@@ -8,6 +8,5 @@
/* Low-level packet parsing */
extern int s6dns_message_get_string_internal (char *, size_t, char const *, unsigned int, unsigned int *) ;
-extern size_t s6dns_message_get_domain_internal (char *, size_t, char const *, unsigned int, unsigned int *) ;
#endif
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index a07b1dc..226bdcf 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -20,7 +20,6 @@
#include
#include
#include
-#include "s6dns-message-internal.h"
/* Utility functions */
@@ -45,7 +44,7 @@ static int relevant (char const *q, unsigned int qlen, char const *ans, unsigned
{
char buf[255] ;
unsigned int pos = 12 ;
- unsigned int n = s6dns_message_get_domain_internal(buf, 255, ans, anslen, &pos) ;
+ size_t n = s6dns_message_get_domain_nodecode(buf, 255, ans, anslen, &pos) ;
if (!n) return -1 ;
if (pos + 4 > anslen) return (errno = EPROTO, -1) ;
if (qdomain_diff(buf, n, q + 12, qlen - 16)) return 0 ;
diff --git a/src/libs6dns/s6dns_message_get_domain.c b/src/libs6dns/s6dns_message_get_domain.c
index 7d2cfc6..5632af9 100644
--- a/src/libs6dns/s6dns_message_get_domain.c
+++ b/src/libs6dns/s6dns_message_get_domain.c
@@ -2,10 +2,9 @@
#include
#include
-#include "s6dns-message-internal.h"
int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
{
- return s6dns_message_get_domain_internal(d->s, 255, packet, packetlen, pos)
+ return s6dns_message_get_domain_nodecode(d->s, 255, packet, packetlen, pos)
&& s6dns_domain_decode(d) ;
}
diff --git a/src/libs6dns/s6dns_message_get_domain_internal.c b/src/libs6dns/s6dns_message_get_domain_internal.c
deleted file mode 100644
index 154c42c..0000000
--- a/src/libs6dns/s6dns_message_get_domain_internal.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ISC license. */
-
-#include
-#include
-
-#include
-
-#include "s6dns-message-internal.h"
-
-size_t s6dns_message_get_domain_internal (char *out, size_t outmax, char const *s, unsigned int len, unsigned int *pos)
-{
- size_t w = 0 ; /* writing head */
- unsigned int r = *pos ; /* reading head */
- unsigned int jumps = 0 ;
- int hasjumped = 0 ;
- for (;;)
- {
- unsigned char c ;
- if (r >= len) return (errno = EPROTO, 0) ;
- c = s[r] ;
- if (c < 64) /* normal label */
- {
- if (r + ++c > len) return (errno = EPROTO, 0) ;
- if (out)
- {
- if (w + c > outmax) return (errno = ENAMETOOLONG, 0) ;
- memcpy(out + w, s + r, c) ;
- }
- w += c ; r += c ; if (!hasjumped) *pos += c ;
- if (c == 1) break ;
- }
- else if (c >= 192) /* pointer */
- {
- if (r + 1 >= len) return (errno = EPROTO, 0) ;
- if (hasjumped)
- {
- if (++jumps > 1000) return (errno = EPROTO, 0) ;
- }
- else
- {
- *pos += 2 ;
- hasjumped = 1 ;
- }
- r = (((unsigned int)c & 63) << 8) | (unsigned char)(s[r + 1]) ;
- }
- else return (errno = EPROTONOSUPPORT, 0) ; /* unsupported extension */
- }
- return w ;
-}
diff --git a/src/libs6dns/s6dns_message_get_domain_nodecode.c b/src/libs6dns/s6dns_message_get_domain_nodecode.c
new file mode 100644
index 0000000..9774527
--- /dev/null
+++ b/src/libs6dns/s6dns_message_get_domain_nodecode.c
@@ -0,0 +1,49 @@
+/* ISC license. */
+
+#include
+#include
+
+#include
+
+#include
+
+size_t s6dns_message_get_domain_nodecode (char *out, size_t outmax, char const *s, unsigned int len, unsigned int *pos)
+{
+ size_t w = 0 ; /* writing head */
+ unsigned int r = *pos ; /* reading head */
+ unsigned int jumps = 0 ;
+ int hasjumped = 0 ;
+ for (;;)
+ {
+ unsigned char c ;
+ if (r >= len) return (errno = EPROTO, 0) ;
+ c = s[r] ;
+ if (c < 64) /* normal label */
+ {
+ if (r + ++c > len) return (errno = EPROTO, 0) ;
+ if (out)
+ {
+ if (w + c > outmax) return (errno = ENAMETOOLONG, 0) ;
+ memcpy(out + w, s + r, c) ;
+ }
+ w += c ; r += c ; if (!hasjumped) *pos += c ;
+ if (c == 1) break ;
+ }
+ else if (c >= 192) /* pointer */
+ {
+ if (r + 1 >= len) return (errno = EPROTO, 0) ;
+ if (hasjumped)
+ {
+ if (++jumps > 1000) return (errno = EPROTO, 0) ;
+ }
+ else
+ {
+ *pos += 2 ;
+ hasjumped = 1 ;
+ }
+ r = (((unsigned int)c & 63) << 8) | (unsigned char)(s[r + 1]) ;
+ }
+ else return (errno = EPROTONOSUPPORT, 0) ; /* unsupported extension */
+ }
+ return w ;
+}
diff --git a/src/libs6dns/s6dns_message_parse_skipqd.c b/src/libs6dns/s6dns_message_parse_skipqd.c
index 95a4e40..65f97af 100644
--- a/src/libs6dns/s6dns_message_parse_skipqd.c
+++ b/src/libs6dns/s6dns_message_parse_skipqd.c
@@ -1,7 +1,6 @@
/* ISC license. */
#include
-#include "s6dns-message-internal.h"
unsigned int s6dns_message_parse_skipqd (s6dns_message_counts_t *counts, char const *packet, unsigned int packetlen, unsigned int *pos)
{
@@ -9,7 +8,7 @@ unsigned int s6dns_message_parse_skipqd (s6dns_message_counts_t *counts, char co
{
unsigned int r = s6dns_message_counts_next(counts) ;
if (r != 1) return r ;
- if (!s6dns_message_get_domain_internal(0, 255, packet, packetlen, pos)) return 0 ;
+ if (!s6dns_message_get_domain_nodecode(0, 255, packet, packetlen, pos)) return 0 ;
*pos += 4 ;
}
}
--
cgit v1.2.3