summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-11 16:44:23 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-11 16:44:23 +0000
commit22cf41f697ff6de1eb4d6c5f66e5de70e86c9f74 (patch)
treeca8e781d5f8ee611c4adaaaf0b7892120e21e298
parent5ad27a3dc4b957191e2e657d41656810138ba789 (diff)
downloads6-dns-22cf41f697ff6de1eb4d6c5f66e5de70e86c9f74.tar.xz
Update documentation, fix wrong types
-rw-r--r--doc/libs6dns/s6dns-domain.html8
-rw-r--r--doc/libs6dns/s6dns-engine.html2
-rw-r--r--doc/libs6dns/s6dns-fmt.html12
-rw-r--r--doc/libs6dns/s6dns-resolve.html30
-rw-r--r--doc/skadns/index.html10
-rw-r--r--src/include/s6-dns/s6dns-resolve.h8
-rw-r--r--src/libs6dns/s6dns_resolvenoq.c2
-rw-r--r--src/libs6dns/s6dns_resolvenoq_aaaaa.c2
-rw-r--r--src/libs6dns/s6dns_resolveq.c2
-rw-r--r--src/libs6dns/s6dns_resolveq_aaaaa.c2
10 files changed, 39 insertions, 39 deletions
diff --git a/doc/libs6dns/s6dns-domain.html b/doc/libs6dns/s6dns-domain.html
index 88b9621..8badbb0 100644
--- a/doc/libs6dns/s6dns-domain.html
+++ b/doc/libs6dns/s6dns-domain.html
@@ -49,7 +49,7 @@ on the stack.
<h2> Functions </h2>
<p>
-<code> int s6dns_domain_fromstring (s6dns_domain_t *d, char const *s, unsigned int len) </code> <br />
+<code> int s6dns_domain_fromstring (s6dns_domain_t *d, char const *s, size_t len) </code> <br />
Makes a (string form) domain from string <em>s</em> of length <em>len</em>,
and stores it into *<em>d</em>. Returns 1 if it succeeds, otherwise it
returns 0 and sets errno appropriately - most likely ENAMETOOLONG, i.e.
@@ -104,20 +104,20 @@ valid packet form (EPROTO).
</p>
<p>
-<code> int s6dns_domain_fromstring_noqualify_encode (s6dns_domain_t *d, char const *s, unsigned int len) </code> <br />
+<code> int s6dns_domain_fromstring_noqualify_encode (s6dns_domain_t *d, char const *s, size_t len) </code> <br />
Higher-level function wrapping some of the above. Makes an encoded, fully qualified
(without resorting to qualification) domain from string <em>s</em> of
length <em>len</em>. Returns 1 if it succeeds and 0 if it fails.
</p>
<p>
-<code> unsigned int s6dns_domain_fromstring_qualify_encode (s6dns_domain_t *list, char const *s, unsigned int len, char const *rules, unsigned int rulesnum) </code> <br />
+<code> unsigned int s6dns_domain_fromstring_qualify_encode (s6dns_domain_t *list, char const *s, size_t len, char const *rules, unsigned int rulesnum) </code> <br />
Another wrapping function. It makes a list of encoded, fully qualified domains,
from string <em>s</em> of length <em>len</em> using <em>rulesnum</em> qualification
rules in <em>rules</em>. It writes at most <em>rulesnum</em> domains into the array
pointed to by <em>list</em> and returns the number of written domains, or 0 on an
error.
-</p>
+ </p>
<p>
<code> void s6dns_domain_arpafromip4 (s6dns_domain_t *d, char const *ip) </code> <br />
diff --git a/doc/libs6dns/s6dns-engine.html b/doc/libs6dns/s6dns-engine.html
index 61b966e..24105c9 100644
--- a/doc/libs6dns/s6dns-engine.html
+++ b/doc/libs6dns/s6dns-engine.html
@@ -79,7 +79,7 @@ after each use. It contains a stralloc, so it must be freed with
<h3> <tt>s6dns_engine_t</tt> life cycle </h3>
<p>
-<code> int s6dns_engine_init (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, uint32 options, char const *q, unsigned int qlen, uint16 qtype, tain_t const *deadline, tain_t const *stamp) </code>
+<code> int s6dns_engine_init (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, uint32_t options, char const *q, unsigned int qlen, uint16_t qtype, tain_t const *deadline, tain_t const *stamp) </code>
</p>
<p>
diff --git a/doc/libs6dns/s6dns-fmt.html b/doc/libs6dns/s6dns-fmt.html
index f77e925..7bd44b8 100644
--- a/doc/libs6dns/s6dns-fmt.html
+++ b/doc/libs6dns/s6dns-fmt.html
@@ -34,7 +34,7 @@ printable strings.
<h2> Functions </h2>
<p>
-<code> unsigned int s6dns_fmt_domain (char *s, unsigned int max, s6dns_domain_t const *d) </code> <br />
+<code> size_t s6dns_fmt_domain (char *s, size_t max, s6dns_domain_t const *d) </code> <br />
Writes into string <em>s</em> the domain contained in *<em>d</em> (in string
form). Returns the number of bytes written, or 0 in case of failure. If
the output would be more than <em>max</em> bytes, 0 ENAMETOOLONG is returned.
@@ -43,7 +43,7 @@ This function is actually an alias to <tt>s6dns_domain_tostring</tt>.
</p>
<p>
-<code> unsigned int s6dns_fmt_domainlist (char *s, unsigned int max, s6dns_domain_t const *list, unsigned int n, char const *delin, unsigned int delimlen) </code> <br />
+<code> size_t s6dns_fmt_domainlist (char *s, size_t max, s6dns_domain_t const *list, unsigned int n, char const *delim, size_t delimlen) </code> <br />
Writes into string <em>s</em> the list of <em>n</em> domains (in string form)
pointed to by <em>list</em>. Between each domain (and not after the last one),
string <em>delim</em> of length <em>delimlen</em> is appended.
@@ -53,7 +53,7 @@ To avoid that, S6DNS_FMT_DOMAINLIST(n) is a suitable number of bytes to prealloc
</p>
<p>
-<code> unsigned int s6dns_fmt_hinfo (char *s, unsigned int max, s6dns_message_rr_hinfo_t const *p) </code> <br />
+<code> size_t s6dns_fmt_hinfo (char *s, size_t max, s6dns_message_rr_hinfo_t const *p) </code> <br />
Writes into string <em>s</em> the HINFO contained in *<em>p</em>: cpu, then os,
separated by a space.
Returns the number of bytes written, or 0 in case of failure. If
@@ -62,7 +62,7 @@ To avoid that, S6DNS_FMT_HINFO is a suitable number of bytes to preallocate <em>
</p>
<p>
-<code> unsigned int s6dns_fmt_mx (char *s, unsigned int max, s6dns_message_rr_mx_t const *p) </code> <br />
+<code> size_t s6dns_fmt_mx (char *s, size_t max, s6dns_message_rr_mx_t const *p) </code> <br />
Writes into string <em>s</em> the MX contained in *<em>p</em>: preference, then
exchanger name, separated by a space.
Returns the number of bytes written, or 0 in case of failure. If
@@ -71,7 +71,7 @@ To avoid that, S6DNS_FMT_MX is a suitable number of bytes to preallocate <em>s</
</p>
<p>
-<code> unsigned int s6dns_fmt_soa (char *s, unsigned int max, s6dns_message_rr_soa_t const *p) </code> <br />
+<code> size_t s6dns_fmt_soa (char *s, size_t max, s6dns_message_rr_soa_t const *p) </code> <br />
Writes into string <em>s</em> the SOA contained in *<em>p</em>:
mname, then rname, then serial number, refresh time, retry time, expiration time
and minimum time, separated by spaces.
@@ -81,7 +81,7 @@ To avoid that, S6DNS_FMT_SOA is a suitable number of bytes to preallocate <em>s<
</p>
<p>
-<code> unsigned int s6dns_fmt_srv (char *s, unsigned int max, s6dns_message_rr_srv_t const *p) </code> <br />
+<code> size_t s6dns_fmt_srv (char *s, size_t max, s6dns_message_rr_srv_t const *p) </code> <br />
Writes into string <em>s</em> the SRV contained in *<em>p</em>: priority,
then weight, then port, then target, separated by spaces.
Returns the number of bytes written, or 0 in case of failure. If
diff --git a/doc/libs6dns/s6dns-resolve.html b/doc/libs6dns/s6dns-resolve.html
index bd770d3..e83d078 100644
--- a/doc/libs6dns/s6dns-resolve.html
+++ b/doc/libs6dns/s6dns-resolve.html
@@ -117,14 +117,14 @@ Returns 1 on success or 0 on failure.
<h4> Generic resolution functions </h4>
<p>
-<code> int s6dns_resolve_core_g (s6dns_domain_t const *d, uint16 qtype, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_core_g (s6dns_domain_t const *d, uint16_t qtype, tain_t const *deadline) </code> <br />
Resolves the query on domain *<em>d</em> (in packet form), of type <em>qtype</em>.
Returns 0 on failure, or 1 on success, in which case
<tt>s6dns_engine_here</tt> contains the answer.
</p>
<p>
-<code> int s6dns_resolve_parse_g (s6dns_domain_t const *d, uint16 qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_parse_g (s6dns_domain_t const *d, uint16_t qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
Resolves the query on domain *<em>d</em> (in packet form), of type <em>qtype</em>,
then parses the answer with function <em>f</em> and stores the result into <em>data</em>.
Returns 1 if it succeeds, 0 if no data can be extracted from the answer, or -1 if an
@@ -141,7 +141,7 @@ here as a return code of 0 with errno set to ENOENT.
</p>
<p>
-<code> int s6dns_resolvenoq_g (char const *name, unsigned int len, uint16 qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolvenoq_g (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
Performs a query of type <em>qtype</em> on name <em>name</em> of length <em>len</em>,
without qualifying it. Parses the answer with function <em>f</em> and stores the
result into <em>data</em>. Returns 1 if it succeeds, 0 if no data can be extracted,
@@ -149,7 +149,7 @@ or -1 if an error occurs. Sets errno in the last two cases.
</p>
<p>
-<code> int s6dns_resolveq_g (char const *name, unsigned int len, uint16 qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolveq_g (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_t *f, void *data, tain_t const *deadline) </code> <br />
Performs a query of type <em>qtype</em> on name <em>name</em> of length <em>len</em>,
qualifying it first. Parses the answer with function <em>f</em> and stores the
result into <em>data</em>. Returns 1 if it succeeds, 0 if none of the FQDNs can
@@ -157,7 +157,7 @@ get a positive answer, or -1 if an error occurs. Sets errno in the last two case
</p>
<p>
-<code> int s6dns_resolve_g (char const *name, unsigned int len, uint16 qtype, s6dns_message_rr_func_t *f, void *data, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_g (char const *name, size_t len, uint16_t qtype, s6dns_message_rr_func_t *f, void *data, int qualif, tain_t const *deadline) </code> <br />
Performs a query of type <em>qtype</em> on name <em>name</em> of length <em>len</em>.
Qualifies <em>name</em> first if <em>qualif</em> is nonzero; else, does not
qualify it. Parses the answer with function <em>f</em> and stores the
@@ -168,7 +168,7 @@ get a positive answer, or -1 if an error occurs. Sets errno in the last two case
<h4> High-level type-specific functions </h4>
<p>
-<code> int s6dns_resolve_a_g (stralloc *ips, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_a_g (stralloc *ips, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an A query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the IPs are
@@ -176,7 +176,7 @@ appended to the stralloc *<em>ips</em>, using 4 bytes per answer.
</p>
<p>
-<code> int s6dns_resolve_aaaa_g (stralloc *ips, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_aaaa_g (stralloc *ips, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an AAAA query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the IPs are
@@ -184,7 +184,7 @@ appended to the stralloc *<em>ips</em>, using 16 bytes per answer.
</p>
<p>
-<code> int s6dns_resolve_aaaaa_g (genalloc *ips, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_aaaaa_g (genalloc *ips, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an AAAA query and an A query at the same time on name <em>name</em>
of length <em>len</em>, qualifying it first iff <em>qualif</em> is nonzero.
Returns -1 if an error occurs, or 0 if no answer
@@ -196,7 +196,7 @@ indiscriminately.
</p>
<p>
-<code> int s6dns_resolve_ptr_g (genalloc *ds, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_ptr_g (genalloc *ds, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs a PTR query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -228,7 +228,7 @@ depending on which <em>ip</em> is an IPv6 or IPv4 address.
</p>
<p>
-<code> int s6dns_resolve_ns_g (genalloc *ds, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_ns_g (genalloc *ds, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs a NS query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -236,7 +236,7 @@ appended to the genalloc *<em>ds</em>, which contains an array of <tt>s6dns_doma
</p>
<p>
-<code> int s6dns_resolve_cname_g (genalloc *ds, char const *name, unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+<code> int s6dns_resolve_cname_g (genalloc *ds, char const *name, size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs a CNAME query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -245,7 +245,7 @@ appended to the genalloc *<em>ds</em>, which contains an array of <tt>s6dns_doma
<p>
<code> int s6dns_resolve_hinfo_g (genalloc *hinfos, char const *name,
-unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an HINFO query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -255,7 +255,7 @@ appended to the genalloc *<em>hinfos</em>, which contains an array of
<p>
<code> int s6dns_resolve_mx_g (genalloc *mxs, char const *name,
-unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an MX query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -265,7 +265,7 @@ appended to the genalloc *<em>mxs</em>, which contains an array of
<p>
<code> int s6dns_resolve_soa_g (genalloc *soas, char const *name,
-unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an SOA query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
@@ -275,7 +275,7 @@ appended to the genalloc *<em>soas</em>, which contains an array of
<p>
<code> int s6dns_resolve_srv_g (genalloc *srvs, char const *name,
-unsigned int len, int qualif, tain_t const *deadline) </code> <br />
+size_t len, int qualif, tain_t const *deadline) </code> <br />
Performs an SRV query on name <em>name</em> of length <em>len</em>, qualifying it
iff <em>qualif</em> is nonzero. Returns -1 if an error occurs, or 0 if no answer
can be obtained from servers, or 1 if it succeeds, in which case the domains are
diff --git a/doc/skadns/index.html b/doc/skadns/index.html
index c79bc9e..23d8226 100644
--- a/doc/skadns/index.html
+++ b/doc/skadns/index.html
@@ -135,8 +135,8 @@ skadns_end(&amp;a) ;
<pre>
s6dns_domain_t d ;
-uint16 qtype ;
-uint16 id ;
+uint16_t qtype ;
+uint16_t id ;
tain_t limit, deadline, stamp ;
skadns_send(&amp;a, &amp;id, &amp;d, qtype, &amp;limit, &amp;deadline, &amp;stamp) ;
@@ -213,8 +213,8 @@ following functions.
</p>
<pre>
-char const *skadns_packet (skadns_t *a, uint16 id)
-int skadns_packetlen (skadns_t *a, uint16 id)
+char const *skadns_packet (skadns_t *a, uint16_t id)
+int skadns_packetlen (skadns_t *a, uint16_t id)
</pre>
<p>
@@ -237,7 +237,7 @@ using invalid ids is a programming error and may result in a crash. </li>
</ul>
<pre>
-int skadns_release (skadns_t *a, uint16 id)
+int skadns_release (skadns_t *a, uint16_t id)
</pre>
<p>
diff --git a/src/include/s6-dns/s6dns-resolve.h b/src/include/s6-dns/s6dns-resolve.h
index 4ee566a..fe1425a 100644
--- a/src/include/s6-dns/s6dns-resolve.h
+++ b/src/include/s6-dns/s6dns-resolve.h
@@ -68,7 +68,7 @@ extern int s6dns_resolve_parse_r (s6dns_domain_t const *, uint16_t, s6dns_messag
#define s6dns_resolvenoq(name, len, qtype, parsefunc, parsedata, deadline, stamp) s6dns_resolvenoq_r(name, len, qtype, parsefunc, parsedata, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp)
#define s6dns_resolvenoq_g(name, len, qtype, parsefunc, parsedata, deadline) s6dns_resolvenoq(name, len, qtype, parsefunc, parsedata, (deadline), &STAMP)
-extern int s6dns_resolvenoq_r (char const *, unsigned int, uint16_t, s6dns_message_rr_func_t_ref, void *, s6dns_engine_t *, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
+extern int s6dns_resolvenoq_r (char const *, size_t, uint16_t, s6dns_message_rr_func_t_ref, void *, s6dns_engine_t *, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
#define s6dns_resolvenoq_r_g(name, len, qtype, parsefunc, parsedata, dt, servers, dbh, deadline) s6dns_resolvenoq_r(name, len, qtype, parsefunc, parsedata, dt, servers, dbh, (deadline), &STAMP)
@@ -79,7 +79,7 @@ extern int s6dns_resolvenoq_r (char const *, unsigned int, uint16_t, s6dns_messa
#define s6dns_resolveq(name, len, qtype, parsefunc, parsedata, deadline, stamp) s6dns_resolveq_r(name, len, qtype, parsefunc, parsedata, &s6dns_rci_here, &s6dns_debughook_zero, deadline, stamp)
#define s6dns_resolveq_g(name, len, qtype, parsefunc, parsedata, deadline) s6dns_resolveq(name, len, qtype, parsefunc, parsedata, (deadline), &STAMP)
-extern int s6dns_resolveq_r (char const *, unsigned int, uint16_t, s6dns_message_rr_func_t_ref, void *, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
+extern int s6dns_resolveq_r (char const *, size_t, uint16_t, s6dns_message_rr_func_t_ref, void *, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
#define s6dns_resolveq_r_g(name, len, qtype, parsefunc, parsedata, rci, dbh, deadline) s6dns_resolveq_r(name, len, qtype, parsefunc, parsedata, rci, dbh, (deadline), &STAMP)
@@ -98,12 +98,12 @@ extern int s6dns_resolveq_r (char const *, unsigned int, uint16_t, s6dns_message
#define s6dns_resolvenoq_aaaaa(ips, name, len, deadline, stamp) s6dns_resolvenoq_aaaaa_r(ips, name, len, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp)
#define s6dns_resolvenoq_aaaaa_g(ips, name, len, deadline) s6dns_resolvenoq_aaaaa(ips, name, len, (deadline), &STAMP)
-extern int s6dns_resolvenoq_aaaaa_r(genalloc *, char const *, unsigned int, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
+extern int s6dns_resolvenoq_aaaaa_r(genalloc *, char const *, size_t, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
#define s6dns_resolvenoq_aaaaa_r_g(ips, name, len, servers, dbh, deadline) s6dns_resolvenoq_aaaaa_r(ips, name, len, servers, dbh, (deadline), &STAMP)
#define s6dns_resolveq_aaaaa(ips, name, len, deadline, stamp) s6dns_resolveq_aaaaa_r(ips, name, len, &s6dns_rci_here, &s6dns_debughook_zero, deadline, stamp)
#define s6dns_resolveq_aaaaa_g(ips, name, len, deadline) s6dns_resolveq_aaaaa(ips, name, len, (deadline), &STAMP)
-extern int s6dns_resolveq_aaaaa_r(genalloc *, char const *, unsigned int, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
+extern int s6dns_resolveq_aaaaa_r(genalloc *, char const *, size_t, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ;
#define s6dns_resolveq_aaaaa_r_g(ips, name, len, rci, dbh, deadline) s6dns_resolvenoq_aaaaa_r(ips, name, len, rci, dbh, (deadline), &STAMP)
diff --git a/src/libs6dns/s6dns_resolvenoq.c b/src/libs6dns/s6dns_resolvenoq.c
index 5269655..567eabd 100644
--- a/src/libs6dns/s6dns_resolvenoq.c
+++ b/src/libs6dns/s6dns_resolvenoq.c
@@ -8,7 +8,7 @@
#include <s6-dns/s6dns-engine.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolvenoq_r (char const *name, unsigned int 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_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)
{
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 295be1b..2123530 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, unsigned int 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_t const *deadline, tain_t *stamp)
{
stralloc sa[2] = { STRALLOC_ZERO, STRALLOC_ZERO } ;
s6dns_resolve_t blob[2] ;
diff --git a/src/libs6dns/s6dns_resolveq.c b/src/libs6dns/s6dns_resolveq.c
index eeb7335..ff774b8 100644
--- a/src/libs6dns/s6dns_resolveq.c
+++ b/src/libs6dns/s6dns_resolveq.c
@@ -10,7 +10,7 @@
#include <s6-dns/s6dns-rci.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolveq_r (char const *name, unsigned int 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_t_ref parsefunc, void *data, s6dns_rci_t const *rci, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *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 df65edf..61872d7 100644
--- a/src/libs6dns/s6dns_resolveq_aaaaa.c
+++ b/src/libs6dns/s6dns_resolveq_aaaaa.c
@@ -13,7 +13,7 @@
#include <s6-dns/s6dns-rci.h>
#include <s6-dns/s6dns-resolve.h>
-int s6dns_resolveq_aaaaa_r (genalloc *ips, char const *name, unsigned int 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_t const *deadline, tain_t *stamp)
{
s6dns_engine_t dtl[rci->rulesnum << 1] ;
stralloc data = STRALLOC_ZERO ;