summaryrefslogtreecommitdiff
path: root/src/libs6dns
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-04 11:24:03 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-04 11:24:03 +0000
commit29f70f35a48241eef0a690a00d5211f487972cba (patch)
tree7153e8f6623aed91a7d98a4961730bd161ac8a1a /src/libs6dns
parentffed76f91e3623f40d1ebffffc0bc728722c84f5 (diff)
downloads6-dns-29f70f35a48241eef0a690a00d5211f487972cba.tar.xz
Adapt to skalibs-2.11
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6dns')
-rw-r--r--src/libs6dns/s6dns_analyze_packet.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_a.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_aaaa.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_caa.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_domain.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_hinfo.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_mx.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_soa.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_srv.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_strings.c2
-rw-r--r--src/libs6dns/s6dns_analyze_record_unknown.c2
-rw-r--r--src/libs6dns/s6dns_debug_dumpdt_post_recv.c2
-rw-r--r--src/libs6dns/s6dns_debug_dumpdt_post_send.c4
-rw-r--r--src/libs6dns/s6dns_debug_dumpdt_pre_send.c4
-rw-r--r--src/libs6dns/s6dns_engine.c22
-rw-r--r--src/libs6dns/s6dns_engine_nextdeadline.c2
-rw-r--r--src/libs6dns/s6dns_message_parse.c2
-rw-r--r--src/libs6dns/s6dns_rci_init.c2
-rw-r--r--src/libs6dns/s6dns_resolve_core.c2
-rw-r--r--src/libs6dns/s6dns_resolve_dpag.c2
-rw-r--r--src/libs6dns/s6dns_resolve_mpag.c2
-rw-r--r--src/libs6dns/s6dns_resolve_name4.c2
-rw-r--r--src/libs6dns/s6dns_resolve_name6.c2
-rw-r--r--src/libs6dns/s6dns_resolve_parse.c2
-rw-r--r--src/libs6dns/s6dns_resolven_loop.c4
-rw-r--r--src/libs6dns/s6dns_resolven_parse.c2
-rw-r--r--src/libs6dns/s6dns_resolvenoq.c2
-rw-r--r--src/libs6dns/s6dns_resolvenoq_aaaaa.c12
-rw-r--r--src/libs6dns/s6dns_resolveq.c2
-rw-r--r--src/libs6dns/s6dns_resolveq_aaaaa.c12
31 files changed, 54 insertions, 54 deletions
diff --git a/src/libs6dns/s6dns_analyze_packet.c b/src/libs6dns/s6dns_analyze_packet.c
index 24c2326..4ee1bd4 100644
--- a/src/libs6dns/s6dns_analyze_packet.c
+++ b/src/libs6dns/s6dns_analyze_packet.c
@@ -16,7 +16,7 @@
#define addfmt(n) if ((*gp->put)(gp->target, fmt, uint_fmt(fmt, (n))) < 0) return 0
#define addfmt16(n) if ((*gp->put)(gp->target, fmt, uint16_fmt(fmt, (n))) < 0) return 0
-int s6dns_analyze_packet (genwrite_t *gp, char const *packet, unsigned int packetlen, int rec)
+int s6dns_analyze_packet (genwrite *gp, char const *packet, unsigned int packetlen, int rec)
{
s6dns_message_header_t h ;
s6dns_message_counts_t counts ;
diff --git a/src/libs6dns/s6dns_analyze_record.c b/src/libs6dns/s6dns_analyze_record.c
index 13d0fa8..46a0517 100644
--- a/src/libs6dns/s6dns_analyze_record.c
+++ b/src/libs6dns/s6dns_analyze_record.c
@@ -13,7 +13,7 @@ static s6dns_analyze_rtypetable_t const *rtypelookup (uint16_t rtype)
return wut ;
}
-int s6dns_analyze_record (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
+int s6dns_analyze_record (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
{
s6dns_analyze_rtypetable_t const *wut = rtypelookup(rr->rtype) ;
{
diff --git a/src/libs6dns/s6dns_analyze_record_a.c b/src/libs6dns/s6dns_analyze_record_a.c
index 41ceee7..cc8354f 100644
--- a/src/libs6dns/s6dns_analyze_record_a.c
+++ b/src/libs6dns/s6dns_analyze_record_a.c
@@ -7,7 +7,7 @@
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_a (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
+int s6dns_analyze_record_a (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
{
char fmt[IP4_FMT] ;
if (rr->rdlength != 4) return (errno = EPROTO, 0) ;
diff --git a/src/libs6dns/s6dns_analyze_record_aaaa.c b/src/libs6dns/s6dns_analyze_record_aaaa.c
index e60e279..17cdebe 100644
--- a/src/libs6dns/s6dns_analyze_record_aaaa.c
+++ b/src/libs6dns/s6dns_analyze_record_aaaa.c
@@ -7,7 +7,7 @@
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_aaaa (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
+int s6dns_analyze_record_aaaa (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
{
char fmt[IP6_FMT] ;
if (rr->rdlength != 16) return (errno = EPROTO, 0) ;
diff --git a/src/libs6dns/s6dns_analyze_record_caa.c b/src/libs6dns/s6dns_analyze_record_caa.c
index 076f04b..9a44546 100644
--- a/src/libs6dns/s6dns_analyze_record_caa.c
+++ b/src/libs6dns/s6dns_analyze_record_caa.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_caa (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_caa (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_message_rr_caa_t caa ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_domain.c b/src/libs6dns/s6dns_analyze_record_domain.c
index a14dd98..c5231c9 100644
--- a/src/libs6dns/s6dns_analyze_record_domain.c
+++ b/src/libs6dns/s6dns_analyze_record_domain.c
@@ -10,7 +10,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_domain (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_domain (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_domain_t d ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_hinfo.c b/src/libs6dns/s6dns_analyze_record_hinfo.c
index d8e36b2..cf1df9b 100644
--- a/src/libs6dns/s6dns_analyze_record_hinfo.c
+++ b/src/libs6dns/s6dns_analyze_record_hinfo.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_hinfo (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_hinfo (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_message_rr_hinfo_t hinfo ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_mx.c b/src/libs6dns/s6dns_analyze_record_mx.c
index ab09c1a..aae3b9f 100644
--- a/src/libs6dns/s6dns_analyze_record_mx.c
+++ b/src/libs6dns/s6dns_analyze_record_mx.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_mx (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_mx (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_message_rr_mx_t mx ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_soa.c b/src/libs6dns/s6dns_analyze_record_soa.c
index 7f9d4f6..ecfb294 100644
--- a/src/libs6dns/s6dns_analyze_record_soa.c
+++ b/src/libs6dns/s6dns_analyze_record_soa.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_soa (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_soa (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_message_rr_soa_t soa ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_srv.c b/src/libs6dns/s6dns_analyze_record_srv.c
index 9af1b49..a03f202 100644
--- a/src/libs6dns/s6dns_analyze_record_srv.c
+++ b/src/libs6dns/s6dns_analyze_record_srv.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-fmt.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_srv (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_srv (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
s6dns_message_rr_srv_t srv ;
size_t len ;
diff --git a/src/libs6dns/s6dns_analyze_record_strings.c b/src/libs6dns/s6dns_analyze_record_strings.c
index f6f4c85..b3290cc 100644
--- a/src/libs6dns/s6dns_analyze_record_strings.c
+++ b/src/libs6dns/s6dns_analyze_record_strings.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-message.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_strings (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
+int s6dns_analyze_record_strings (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int start)
{
stralloc sa = STRALLOC_ZERO ;
char buf[rr->rdlength] ;
diff --git a/src/libs6dns/s6dns_analyze_record_unknown.c b/src/libs6dns/s6dns_analyze_record_unknown.c
index b7a276d..033434e 100644
--- a/src/libs6dns/s6dns_analyze_record_unknown.c
+++ b/src/libs6dns/s6dns_analyze_record_unknown.c
@@ -5,7 +5,7 @@
#include <skalibs/fmtscan.h>
#include <s6-dns/s6dns-analyze.h>
-int s6dns_analyze_record_unknown (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
+int s6dns_analyze_record_unknown (genwrite *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos)
{
char fmt[UINT16_FMT] ;
if ((*gp->put)(gp->target, "rtype ", 6) < 0) return 0 ;
diff --git a/src/libs6dns/s6dns_debug_dumpdt_post_recv.c b/src/libs6dns/s6dns_debug_dumpdt_post_recv.c
index 827fce8..8e64953 100644
--- a/src/libs6dns/s6dns_debug_dumpdt_post_recv.c
+++ b/src/libs6dns/s6dns_debug_dumpdt_post_recv.c
@@ -5,7 +5,7 @@
int s6dns_debug_dumpdt_post_recv (s6dns_engine_t const *dt, void *data)
{
- genwrite_t *gp = data ;
+ genwrite *gp = data ;
(void)dt ;
if ((*gp->put)(gp->target, "Received a packet\n", 19) < 19) return 0 ;
if ((*gp->put)(gp->target, "\n", 1) < 1) return 0 ;
diff --git a/src/libs6dns/s6dns_debug_dumpdt_post_send.c b/src/libs6dns/s6dns_debug_dumpdt_post_send.c
index 21692a0..8d18718 100644
--- a/src/libs6dns/s6dns_debug_dumpdt_post_send.c
+++ b/src/libs6dns/s6dns_debug_dumpdt_post_send.c
@@ -9,7 +9,7 @@
int s6dns_debug_dumpdt_post_send (s6dns_engine_t const *dt, void *data)
{
- genwrite_t *gp = data ;
+ genwrite *gp = data ;
size_t len ;
char buf[LOCALTMN_FMT] ;
if ((*gp->put)(gp->target, "Sent query ", 11) < 11) return 0 ;
@@ -21,7 +21,7 @@ int s6dns_debug_dumpdt_post_send (s6dns_engine_t const *dt, void *data)
if ((*gp->put)(gp->target, buf, len) < (ssize_t)len) return 0 ;
if ((*gp->put)(gp->target, " - next recv deadline is ", 25) < 25) return 0 ;
{
- localtmn_t l ;
+ localtmn l ;
if (!localtmn_from_tain(&l, &dt->localdeadline, 0)) return 0 ;
len = localtmn_fmt(buf, &l) ;
}
diff --git a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
index 25c887a..0d4ae19 100644
--- a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
+++ b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
@@ -24,7 +24,7 @@
int s6dns_debug_dumpdt_pre_send (s6dns_engine_t const *dt, void *data)
{
- genwrite_t *gp = data ;
+ genwrite *gp = data ;
size_t len ;
char buf[LOCALTMN_FMT] ;
if ((*gp->put)(gp->target, "Preparing to send via ", 22) < 22) return 0 ;
@@ -37,7 +37,7 @@ int s6dns_debug_dumpdt_pre_send (s6dns_engine_t const *dt, void *data)
if ((*gp->put)(gp->target, buf, len) < (ssize_t)len) return 0 ;
if ((*gp->put)(gp->target, " with deadline ", 15) < 15) return 0 ;
{
- localtmn_t l ;
+ localtmn l ;
if (!localtmn_from_tain(&l, &dt->localdeadline, 0))
{
if (errno != EOVERFLOW) return 0 ;
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index a4dc8bc..2d07357 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -115,7 +115,7 @@ static int randombind (int fd, int flag)
return (socketbind46(fd, S6DNS_ENGINE_LOCAL0, 0, flag) >= 0) ;
}
-static int thisudp (s6dns_engine_t *dt, tain_t const *stamp)
+static int thisudp (s6dns_engine_t *dt, tain const *stamp)
{
for (;; dt->curserver++)
{
@@ -148,7 +148,7 @@ static int thisudp (s6dns_engine_t *dt, tain_t const *stamp)
return 1 ;
}
-static int thistcp (s6dns_engine_t *dt, tain_t const *stamp)
+static int thistcp (s6dns_engine_t *dt, tain const *stamp)
{
for (; dt->curserver < S6DNS_MAX_SERVERS ; dt->curserver++)
if (memcmp(s6dns_ip46list_ip(&dt->servers, dt->curserver), S6DNS_ENGINE_LOCAL0, SKALIBS_IP_SIZE)) break ;
@@ -179,7 +179,7 @@ static int thistcp (s6dns_engine_t *dt, tain_t const *stamp)
/* all the rest is transport-agnostic */
-static int s6dns_engine_prepare (s6dns_engine_t *dt, tain_t const *stamp, int istcp)
+static int s6dns_engine_prepare (s6dns_engine_t *dt, tain const *stamp, int istcp)
{
for (;; dt->curserver++)
switch (istcp ? thistcp(dt, stamp) : thisudp(dt, stamp))
@@ -192,7 +192,7 @@ static int s6dns_engine_prepare (s6dns_engine_t *dt, tain_t const *stamp, int is
}
}
-static void prepare_next (s6dns_engine_t *dt, tain_t const *stamp, int istcp)
+static void prepare_next (s6dns_engine_t *dt, tain const *stamp, int istcp)
{
if (!error_isagain(errno))
{
@@ -202,7 +202,7 @@ static void prepare_next (s6dns_engine_t *dt, tain_t const *stamp, int istcp)
}
}
-static int s6dns_engine_write_udp (s6dns_engine_t *dt, tain_t const *stamp)
+static int s6dns_engine_write_udp (s6dns_engine_t *dt, tain const *stamp)
{
static unsigned int const s6dns_engine_udp_timeouts[4] = { 1, 3, 11, 45 } ;
if (fd_send(dt->fd, dt->sa.s + 2, dt->querylen - 2, 0) < (ssize_t)(dt->querylen - 2))
@@ -215,7 +215,7 @@ static int s6dns_engine_write_udp (s6dns_engine_t *dt, tain_t const *stamp)
return (errno = EAGAIN, 1) ;
}
-static int s6dns_engine_write_tcp (s6dns_engine_t *dt, tain_t const *stamp)
+static int s6dns_engine_write_tcp (s6dns_engine_t *dt, tain const *stamp)
{
size_t r ;
r = allwrite(dt->fd, dt->sa.s + dt->protostate, dt->querylen - dt->protostate) ;
@@ -236,7 +236,7 @@ static int s6dns_engine_write_tcp (s6dns_engine_t *dt, tain_t const *stamp)
return (errno = EAGAIN, 1) ;
}
-static int s6dns_engine_read_udp (s6dns_engine_t *dt, tain_t const *stamp)
+static int s6dns_engine_read_udp (s6dns_engine_t *dt, tain const *stamp)
{
s6dns_message_header_t h ;
char buf[513] ;
@@ -282,7 +282,7 @@ static int s6dns_engine_read_udp (s6dns_engine_t *dt, tain_t const *stamp)
return 1 ;
}
-static int s6dns_engine_read_tcp (s6dns_engine_t *dt, tain_t const *stamp)
+static int s6dns_engine_read_tcp (s6dns_engine_t *dt, tain const *stamp)
{
ssize_t r = sanitize_read(s6dns_mininetstring_read(dt->fd, &dt->sa, &dt->protostate)) ;
if (r < 0) return (prepare_next(dt, stamp, 1), 0) ;
@@ -336,7 +336,7 @@ void s6dns_engine_recycle (s6dns_engine_t *dt)
dt->flagstrict = dt->flagtcp = dt->flagconnecting = dt->flagreading = dt->flagwriting = 0 ;
}
-int s6dns_engine_timeout (s6dns_engine_t *dt, tain_t const *stamp)
+int s6dns_engine_timeout (s6dns_engine_t *dt, tain const *stamp)
{
if (!error_isagain(dt->status)) return (errno = EINVAL, -1) ;
else if (tain_less(&dt->deadline, stamp)) goto yes ;
@@ -358,7 +358,7 @@ int s6dns_engine_timeout (s6dns_engine_t *dt, tain_t const *stamp)
return 1 ;
}
-int s6dns_engine_event (s6dns_engine_t *dt, tain_t const *stamp)
+int s6dns_engine_event (s6dns_engine_t *dt, tain const *stamp)
{
if (!error_isagain(dt->status)) return (errno = EINVAL, -1) ;
if (dt->flagwriting)
@@ -378,7 +378,7 @@ int s6dns_engine_event (s6dns_engine_t *dt, tain_t const *stamp)
return -1 ;
}
-int s6dns_engine_init_r (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, uint32_t options, char const *q, unsigned int qlen, uint16_t qtype, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t const *stamp)
+int s6dns_engine_init_r (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, uint32_t options, char const *q, unsigned int qlen, uint16_t qtype, s6dns_debughook_t const *dbh, tain const *deadline, tain const *stamp)
{
s6dns_message_header_t h = S6DNS_MESSAGE_HEADER_ZERO ;
if (!stralloc_ready(&dt->sa, qlen + 18)) return 0 ;
diff --git a/src/libs6dns/s6dns_engine_nextdeadline.c b/src/libs6dns/s6dns_engine_nextdeadline.c
index 09102c7..fdf76eb 100644
--- a/src/libs6dns/s6dns_engine_nextdeadline.c
+++ b/src/libs6dns/s6dns_engine_nextdeadline.c
@@ -3,7 +3,7 @@
#include <skalibs/tai.h>
#include <s6-dns/s6dns-engine.h>
-void s6dns_engine_nextdeadline (s6dns_engine_t const *dt, tain_t *deadline)
+void s6dns_engine_nextdeadline (s6dns_engine_t const *dt, tain *deadline)
{
if (tain_less(&dt->deadline, deadline)) *deadline = dt->deadline ;
if (tain_less(&dt->localdeadline, deadline)) *deadline = dt->localdeadline ;
diff --git a/src/libs6dns/s6dns_message_parse.c b/src/libs6dns/s6dns_message_parse.c
index 4aaee9a..4bf6d7d 100644
--- a/src/libs6dns/s6dns_message_parse.c
+++ b/src/libs6dns/s6dns_message_parse.c
@@ -5,7 +5,7 @@
#include <s6-dns/s6dns-constants.h>
#include <s6-dns/s6dns-message.h>
-int s6dns_message_parse (s6dns_message_header_t *h, char const *packet, unsigned int packetlen, s6dns_message_rr_func_t_ref f, void *data)
+int s6dns_message_parse (s6dns_message_header_t *h, char const *packet, unsigned int packetlen, s6dns_message_rr_func_ref f, void *data)
{
s6dns_message_counts_t counts ;
unsigned int pos ;
diff --git a/src/libs6dns/s6dns_rci_init.c b/src/libs6dns/s6dns_rci_init.c
index 3a1c786..d0a9718 100644
--- a/src/libs6dns/s6dns_rci_init.c
+++ b/src/libs6dns/s6dns_rci_init.c
@@ -27,7 +27,7 @@ static size_t readit (char const *file, char *buf, size_t max)
static inline int s6dns_rci_init_servers (s6dns_rci_t *rci, char const *file, char *tmp, size_t max, size_t *size)
{
- ip46_t tmplist[S6DNS_MAX_SERVERS] ;
+ ip46 tmplist[S6DNS_MAX_SERVERS] ;
size_t num = 0 ;
char const *x = getenv("DNSCACHEIP") ;
if (x) ip46_scanlist(tmplist, S6DNS_MAX_SERVERS, x, &num) ;
diff --git a/src/libs6dns/s6dns_resolve_core.c b/src/libs6dns/s6dns_resolve_core.c
index 1c59edb..5785530 100644
--- a/src/libs6dns/s6dns_resolve_core.c
+++ b/src/libs6dns/s6dns_resolve_core.c
@@ -5,7 +5,7 @@
#include <s6-dns/s6dns-engine.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_core_r (s6dns_domain_t const *d, uint16_t qtype, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_core_r (s6dns_domain_t const *d, uint16_t qtype, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
if (!s6dns_engine_init_r(dt, servers, S6DNS_O_RECURSIVE, d->s, d->len, qtype, dbh, deadline, stamp)) return 0 ;
if (!s6dns_resolve_loop_r(dt, deadline, stamp))
diff --git a/src/libs6dns/s6dns_resolve_dpag.c b/src/libs6dns/s6dns_resolve_dpag.c
index d77890d..98c5f9b 100644
--- a/src/libs6dns/s6dns_resolve_dpag.c
+++ b/src/libs6dns/s6dns_resolve_dpag.c
@@ -2,7 +2,7 @@
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_dpag_r (genalloc *ds, char const *name, unsigned int len, uint16_t qtype, int qualif, s6dns_engine_t *dt, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_dpag_r (genalloc *ds, char const *name, unsigned int len, uint16_t qtype, int qualif, s6dns_engine_t *dt, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_dpag_t data ;
int r ;
diff --git a/src/libs6dns/s6dns_resolve_mpag.c b/src/libs6dns/s6dns_resolve_mpag.c
index 98282f3..6daa45c 100644
--- a/src/libs6dns/s6dns_resolve_mpag.c
+++ b/src/libs6dns/s6dns_resolve_mpag.c
@@ -2,7 +2,7 @@
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_mpag_r (stralloc *sa, genalloc *offsets, char const *name, unsigned int len, uint16_t qtype, s6dns_message_rr_func_t_ref parsefunc, int qualif, s6dns_engine_t *dt, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_mpag_r (stralloc *sa, genalloc *offsets, char const *name, unsigned int len, uint16_t qtype, s6dns_message_rr_func_ref parsefunc, int qualif, s6dns_engine_t *dt, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_mpag_t data ;
int r ;
diff --git a/src/libs6dns/s6dns_resolve_name4.c b/src/libs6dns/s6dns_resolve_name4.c
index a7d9cae..34f1eef 100644
--- a/src/libs6dns/s6dns_resolve_name4.c
+++ b/src/libs6dns/s6dns_resolve_name4.c
@@ -4,7 +4,7 @@
#include <s6-dns/s6dns-domain.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_name4_r (genalloc *list, char const *ip, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_name4_r (genalloc *list, char const *ip, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_dpag_t data ;
s6dns_domain_t d ;
diff --git a/src/libs6dns/s6dns_resolve_name6.c b/src/libs6dns/s6dns_resolve_name6.c
index 6fd1ce5..b1bcfa1 100644
--- a/src/libs6dns/s6dns_resolve_name6.c
+++ b/src/libs6dns/s6dns_resolve_name6.c
@@ -4,7 +4,7 @@
#include <s6-dns/s6dns-domain.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_name6_r (genalloc *list, char const *ip, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_name6_r (genalloc *list, char const *ip, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_dpag_t data ;
s6dns_domain_t d ;
diff --git a/src/libs6dns/s6dns_resolve_parse.c b/src/libs6dns/s6dns_resolve_parse.c
index b3ecaea..29d78f7 100644
--- a/src/libs6dns/s6dns_resolve_parse.c
+++ b/src/libs6dns/s6dns_resolve_parse.c
@@ -4,7 +4,7 @@
#include <s6-dns/s6dns-engine.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolve_parse_r (s6dns_domain_t const *d, uint16_t qtype, s6dns_message_rr_func_t_ref parsefunc, void *data, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolve_parse_r (s6dns_domain_t const *d, uint16_t qtype, s6dns_message_rr_func_ref parsefunc, void *data, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
int r ;
if (!s6dns_resolve_core_r(d, qtype, dt, servers, dbh, deadline, stamp)) return -1 ;
diff --git a/src/libs6dns/s6dns_resolven_loop.c b/src/libs6dns/s6dns_resolven_loop.c
index 2cc5da0..bfbda18 100644
--- a/src/libs6dns/s6dns_resolven_loop.c
+++ b/src/libs6dns/s6dns_resolven_loop.c
@@ -11,14 +11,14 @@
It resolves n dts at the same time.
*/
-int s6dns_resolven_loop (s6dns_engine_t *dt, unsigned int n, unsigned int or, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolven_loop (s6dns_engine_t *dt, unsigned int n, unsigned int or, tain const *deadline, tain *stamp)
{
iopause_fd x[n] ;
unsigned int count = 0 ;
unsigned int got = 0 ;
while (got < n)
{
- tain_t localdeadline = *deadline ;
+ tain localdeadline = *deadline ;
int r ;
unsigned int i = 0 ;
unsigned int j = 0 ;
diff --git a/src/libs6dns/s6dns_resolven_parse.c b/src/libs6dns/s6dns_resolven_parse.c
index d8b7435..7381e87 100644
--- a/src/libs6dns/s6dns_resolven_parse.c
+++ b/src/libs6dns/s6dns_resolven_parse.c
@@ -5,7 +5,7 @@
#include <s6-dns/s6dns-engine.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolven_parse_r (s6dns_resolve_t *list, unsigned int n, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolven_parse_r (s6dns_resolve_t *list, unsigned int n, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_engine_t dtl[n] ;
unsigned int i = 0 ;
diff --git a/src/libs6dns/s6dns_resolvenoq.c b/src/libs6dns/s6dns_resolvenoq.c
index f5fc56b..b2b9eaf 100644
--- a/src/libs6dns/s6dns_resolvenoq.c
+++ b/src/libs6dns/s6dns_resolvenoq.c
@@ -3,7 +3,7 @@
#include <s6-dns/s6dns-domain.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolvenoq_r (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_t_ref parsefunc, void *data, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolvenoq_r (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_ref parsefunc, void *data, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_domain_t d ;
if (!s6dns_domain_fromstring_noqualify_encode(&d, name, len)) return -1 ;
diff --git a/src/libs6dns/s6dns_resolvenoq_aaaaa.c b/src/libs6dns/s6dns_resolvenoq_aaaaa.c
index 378a70a..7069304 100644
--- a/src/libs6dns/s6dns_resolvenoq_aaaaa.c
+++ b/src/libs6dns/s6dns_resolvenoq_aaaaa.c
@@ -11,7 +11,7 @@
#include <s6-dns/s6dns-message.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolvenoq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolvenoq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
stralloc sa[2] = { STRALLOC_ZERO, STRALLOC_ZERO } ;
s6dns_resolve_t blob[2] ;
@@ -33,7 +33,7 @@ int s6dns_resolvenoq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns
errno = blob[1].status ? blob[1].status : blob[0].status ;
return 0 ;
}
- if (!genalloc_readyplus(ip46full_t, ips, (sa[0].len >> 4) + (sa[1].len >> 2)))
+ if (!genalloc_readyplus(ip46full, ips, (sa[0].len >> 4) + (sa[1].len >> 2)))
{
stralloc_free(&sa[0]) ;
stralloc_free(&sa[1]) ;
@@ -41,15 +41,15 @@ int s6dns_resolvenoq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns
}
{
int e = (!!sa[0].len << 1) | !!sa[1].len ;
- size_t n = genalloc_len(ip46full_t, ips) ;
+ size_t n = genalloc_len(ip46full, ips) ;
size_t i = 0 ;
for (; i < (sa[0].len >> 4) ; i++)
- ip46full_from_ip6(genalloc_s(ip46full_t, ips) + n + i, sa[0].s + (i << 4)) ;
+ ip46full_from_ip6(genalloc_s(ip46full, ips) + n + i, sa[0].s + (i << 4)) ;
n += i ;
for (i = 0 ; i < (sa[1].len >> 2) ; i++)
- ip46full_from_ip4(genalloc_s(ip46full_t, ips) + n + i, sa[1].s + (i << 2)) ;
+ ip46full_from_ip4(genalloc_s(ip46full, ips) + n + i, sa[1].s + (i << 2)) ;
n += i ;
- genalloc_setlen(ip46full_t, ips, n) ;
+ genalloc_setlen(ip46full, ips, n) ;
stralloc_free(&sa[0]) ;
stralloc_free(&sa[1]) ;
return e ;
diff --git a/src/libs6dns/s6dns_resolveq.c b/src/libs6dns/s6dns_resolveq.c
index 3c1d22c..dbb3fc3 100644
--- a/src/libs6dns/s6dns_resolveq.c
+++ b/src/libs6dns/s6dns_resolveq.c
@@ -9,7 +9,7 @@
#include <s6-dns/s6dns-engine.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolveq_r (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_t_ref parsefunc, void *data, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolveq_r (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_ref parsefunc, void *data, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_engine_t dtl[rci->rulesnum] ;
unsigned int best = 0 ;
diff --git a/src/libs6dns/s6dns_resolveq_aaaaa.c b/src/libs6dns/s6dns_resolveq_aaaaa.c
index fe564ae..73e5966 100644
--- a/src/libs6dns/s6dns_resolveq_aaaaa.c
+++ b/src/libs6dns/s6dns_resolveq_aaaaa.c
@@ -15,19 +15,19 @@
static int addit (genalloc *ips, char const *s, size_t len, int is6)
{
- size_t base = genalloc_len(ip46full_t, ips) ;
+ size_t base = genalloc_len(ip46full, ips) ;
size_t n = len >> (is6 ? 4 : 2) ;
- ip46full_t *p ;
- if (!genalloc_readyplus(ip46full_t, ips, n)) return 0 ;
- p = genalloc_s(ip46full_t, ips) + base ;
+ ip46full *p ;
+ if (!genalloc_readyplus(ip46full, ips, n)) return 0 ;
+ p = genalloc_s(ip46full, ips) + base ;
for (size_t i = 0 ; i < n ; i++)
if (is6) ip46full_from_ip6(p + i, s + (i << 4)) ;
else ip46full_from_ip4(p + i, s + (i << 2)) ;
- genalloc_setlen(ip46full_t, ips, base + n) ;
+ genalloc_setlen(ip46full, ips, base + n) ;
return 1 ;
}
-int s6dns_resolveq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp)
+int s6dns_resolveq_aaaaa_r (genalloc *ips, char const *name, size_t len, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain const *deadline, tain *stamp)
{
s6dns_engine_t dtl[rci->rulesnum << 1] ;
stralloc data = STRALLOC_ZERO ;