diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-01-14 23:24:53 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-01-14 23:24:53 +0000 |
commit | f3d8514681a6a9a0664d3ad0b6b72eb87346f92f (patch) | |
tree | aa4c9c1110ab1e39b320f8e11e67196b70529f00 /src/libs6dns | |
parent | 033e162e95fb13196b3df93b708c535a3977e201 (diff) | |
download | s6-dns-f3d8514681a6a9a0664d3ad0b6b72eb87346f92f.tar.xz |
Prepare for 2.3.5.0, s6dns_message_get_domain_nodecode() now public
Diffstat (limited to 'src/libs6dns')
-rw-r--r-- | src/libs6dns/deps-lib/s6dns | 2 | ||||
-rw-r--r-- | src/libs6dns/s6dns-message-internal.h | 1 | ||||
-rw-r--r-- | src/libs6dns/s6dns_engine.c | 3 | ||||
-rw-r--r-- | src/libs6dns/s6dns_message_get_domain.c | 3 | ||||
-rw-r--r-- | src/libs6dns/s6dns_message_get_domain_nodecode.c (renamed from src/libs6dns/s6dns_message_get_domain_internal.c) | 4 | ||||
-rw-r--r-- | src/libs6dns/s6dns_message_parse_skipqd.c | 3 |
6 files changed, 6 insertions, 10 deletions
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 <s6-dns/s6dns-constants.h> #include <s6-dns/s6dns-message.h> #include <s6-dns/s6dns-engine.h> -#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 <s6-dns/s6dns-domain.h> #include <s6-dns/s6dns-message.h> -#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_nodecode.c index 154c42c..9774527 100644 --- a/src/libs6dns/s6dns_message_get_domain_internal.c +++ b/src/libs6dns/s6dns_message_get_domain_nodecode.c @@ -5,9 +5,9 @@ #include <skalibs/posixishard.h> -#include "s6dns-message-internal.h" +#include <s6-dns/s6dns-message.h> -size_t s6dns_message_get_domain_internal (char *out, size_t outmax, char const *s, unsigned int len, unsigned int *pos) +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 */ 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 <s6-dns/s6dns-message.h> -#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 ; } } |