summaryrefslogtreecommitdiff
path: root/src/clients
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/clients
parentffed76f91e3623f40d1ebffffc0bc728722c84f5 (diff)
downloads6-dns-29f70f35a48241eef0a690a00d5211f487972cba.tar.xz
Adapt to skalibs-2.11
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/s6-dnsip.c14
-rw-r--r--src/clients/s6-dnsip4.c4
-rw-r--r--src/clients/s6-dnsip6.c4
-rw-r--r--src/clients/s6-dnsmx.c4
-rw-r--r--src/clients/s6-dnsname.c6
-rw-r--r--src/clients/s6-dnsns.c4
-rw-r--r--src/clients/s6-dnsq.c8
-rw-r--r--src/clients/s6-dnsqr.c6
-rw-r--r--src/clients/s6-dnssoa.c4
-rw-r--r--src/clients/s6-dnssrv.c4
-rw-r--r--src/clients/s6-dnstxt.c4
-rw-r--r--src/clients/s6-randomip.c2
-rw-r--r--src/clients/s6dns-generic-filter.h10
-rw-r--r--src/clients/s6dns_generic_filter_main.c8
14 files changed, 41 insertions, 41 deletions
diff --git a/src/clients/s6-dnsip.c b/src/clients/s6-dnsip.c
index 3b86fe0..06b8400 100644
--- a/src/clients/s6-dnsip.c
+++ b/src/clients/s6-dnsip.c
@@ -18,8 +18,8 @@
int main (int argc, char const *const *argv)
{
- genalloc ips = GENALLOC_ZERO ; /* ip46full_t */
- tain_t deadline ;
+ genalloc ips = GENALLOC_ZERO ; /* ip46full */
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -28,7 +28,7 @@ int main (int argc, char const *const *argv)
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
@@ -50,13 +50,13 @@ int main (int argc, char const *const *argv)
if (r < 0) strerr_diefu2sys((errno == ETIMEDOUT) ? 99 : 111, "resolve ", argv[0]) ;
if (!r && errno) strerr_diefu4x(2, "resolve ", argv[0], ": ", s6dns_constants_error_str(errno)) ;
}
- if (!genalloc_len(ip46full_t, &ips)) return 1 ;
+ if (!genalloc_len(ip46full, &ips)) return 1 ;
- if (flagunsort) random_unsort(ips.s, genalloc_len(ip46full_t, &ips), sizeof(ip46full_t)) ;
- for (i = 0 ; i < genalloc_len(ip46full_t, &ips) ; i++)
+ if (flagunsort) random_unsort(ips.s, genalloc_len(ip46full, &ips), sizeof(ip46full)) ;
+ for (i = 0 ; i < genalloc_len(ip46full, &ips) ; i++)
{
char fmt[IP6_FMT] ;
- size_t n = ip46full_fmt(fmt, genalloc_s(ip46full_t, &ips) + i) ;
+ size_t n = ip46full_fmt(fmt, genalloc_s(ip46full, &ips) + i) ;
fmt[n++] = '\n' ;
if (buffer_put(buffer_1small, fmt, n) < (ssize_t)n)
strerr_diefu1sys(111, "write to stdout") ;
diff --git a/src/clients/s6-dnsip4.c b/src/clients/s6-dnsip4.c
index b46f229..483bfbc 100644
--- a/src/clients/s6-dnsip4.c
+++ b/src/clients/s6-dnsip4.c
@@ -17,7 +17,7 @@
int main (int argc, char const *const *argv)
{
stralloc ips = STRALLOC_ZERO ;
- tain_t deadline ;
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -26,7 +26,7 @@ int main (int argc, char const *const *argv)
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnsip6.c b/src/clients/s6-dnsip6.c
index dd4e87e..5942904 100644
--- a/src/clients/s6-dnsip6.c
+++ b/src/clients/s6-dnsip6.c
@@ -17,7 +17,7 @@
int main (int argc, char const *const *argv)
{
stralloc ips = STRALLOC_ZERO ;
- tain_t deadline ;
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -26,7 +26,7 @@ int main (int argc, char const *const *argv)
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnsmx.c b/src/clients/s6-dnsmx.c
index c91cb44..37d6891 100644
--- a/src/clients/s6-dnsmx.c
+++ b/src/clients/s6-dnsmx.c
@@ -17,7 +17,7 @@
int main (int argc, char const *const *argv)
{
genalloc mxs = GENALLOC_ZERO ; /* array of s6dns_message_rr_mx_t */
- tain_t deadline ;
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -25,7 +25,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-dnsmx" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnsname.c b/src/clients/s6-dnsname.c
index 04e293f..b49718d 100644
--- a/src/clients/s6-dnsname.c
+++ b/src/clients/s6-dnsname.c
@@ -19,8 +19,8 @@
int main (int argc, char const *const *argv)
{
genalloc ds = GENALLOC_ZERO ; /* array of s6dns_domain_t */
- tain_t deadline ;
- ip46full_t ip = IP46FULL_ZERO ;
+ tain deadline ;
+ ip46full ip = IP46FULL_ZERO ;
unsigned int t = 0 ;
int flagunsort = 0 ;
int do4 = 0 ;
@@ -28,7 +28,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-dnsname" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "46rt:") ;
+ int opt = lgetopt(argc, argv, "46rt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnsns.c b/src/clients/s6-dnsns.c
index 2e343ca..8e803f3 100644
--- a/src/clients/s6-dnsns.c
+++ b/src/clients/s6-dnsns.c
@@ -18,14 +18,14 @@
int main (int argc, char const *const *argv)
{
genalloc ds = GENALLOC_ZERO ; /* array of s6dns_domain_t */
- tain_t deadline ;
+ tain deadline ;
unsigned int t = 0 ;
int flagqualify = 0 ;
int flagunsort = 0 ;
PROG = "s6-dnsns" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnsq.c b/src/clients/s6-dnsq.c
index 207c58f..d7d915e 100644
--- a/src/clients/s6-dnsq.c
+++ b/src/clients/s6-dnsq.c
@@ -20,13 +20,13 @@
int main (int argc, char const *const *argv)
{
- tain_t deadline ;
+ tain deadline ;
unsigned int debuglevel = 0 ;
uint16_t qtype ;
- genwrite_t *where = &genwrite_stderr ;
+ genwrite *where = &genwrite_stderr ;
PROG = "s6-dnsq" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
unsigned int t = 0 ;
for (;;)
{
@@ -58,7 +58,7 @@ int main (int argc, char const *const *argv)
memset(&servers, 0, sizeof(s6dns_ip46list_t)) ;
for (; (i < (unsigned int)(argc - 2)) && (j < S6DNS_MAX_SERVERS) ; i++)
{
- ip46_t z[S6DNS_MAX_SERVERS] ;
+ ip46 z[S6DNS_MAX_SERVERS] ;
size_t n ;
unsigned int k = 0 ;
if (!*argv[2+i]) continue ;
diff --git a/src/clients/s6-dnsqr.c b/src/clients/s6-dnsqr.c
index d32f3b6..cb3fb97 100644
--- a/src/clients/s6-dnsqr.c
+++ b/src/clients/s6-dnsqr.c
@@ -18,12 +18,12 @@
int main (int argc, char const *const *argv)
{
- tain_t deadline ;
+ tain deadline ;
unsigned int debuglevel = 0 ;
- genwrite_t *where = &genwrite_stderr ;
+ genwrite *where = &genwrite_stderr ;
PROG = "s6-dnsqr" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
unsigned int t = 0 ;
for (;;)
{
diff --git a/src/clients/s6-dnssoa.c b/src/clients/s6-dnssoa.c
index cb8dc55..426919a 100644
--- a/src/clients/s6-dnssoa.c
+++ b/src/clients/s6-dnssoa.c
@@ -18,7 +18,7 @@
int main (int argc, char const *const *argv)
{
genalloc soas = GENALLOC_ZERO ; /* array of s6dns_message_rr_soa_t */
- tain_t deadline ;
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -26,7 +26,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-dnssoa" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnssrv.c b/src/clients/s6-dnssrv.c
index e7d58f9..a3e0dc4 100644
--- a/src/clients/s6-dnssrv.c
+++ b/src/clients/s6-dnssrv.c
@@ -18,7 +18,7 @@
int main (int argc, char const *const *argv)
{
genalloc srvs = GENALLOC_ZERO ; /* array of s6dns_message_rr_srv_t */
- tain_t deadline ;
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -26,7 +26,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-dnssrv" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "qt:") ;
+ int opt = lgetopt(argc, argv, "qt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-dnstxt.c b/src/clients/s6-dnstxt.c
index 22e9776..c7c31cd 100644
--- a/src/clients/s6-dnstxt.c
+++ b/src/clients/s6-dnstxt.c
@@ -21,7 +21,7 @@ int main (int argc, char const *const *argv)
stralloc quoted = STRALLOC_ZERO ;
stralloc sa = STRALLOC_ZERO ;
genalloc offsets = GENALLOC_ZERO ; /* array of size_t */
- tain_t deadline ;
+ tain deadline ;
size_t n ;
size_t i = 0 ;
unsigned int t = 0 ;
@@ -30,7 +30,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-dnstxt" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6-randomip.c b/src/clients/s6-randomip.c
index 7103443..9419454 100644
--- a/src/clients/s6-randomip.c
+++ b/src/clients/s6-randomip.c
@@ -23,7 +23,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-randomip" ;
for (;;)
{
- int opt = subgetopt(argc, argv, "46n:") ;
+ int opt = lgetopt(argc, argv, "46n:") ;
if (opt == -1) break ;
switch (opt)
{
diff --git a/src/clients/s6dns-generic-filter.h b/src/clients/s6dns-generic-filter.h
index 8b2c738..29f758e 100644
--- a/src/clients/s6dns-generic-filter.h
+++ b/src/clients/s6dns-generic-filter.h
@@ -8,14 +8,14 @@
#include <skalibs/stralloc.h>
#include <s6-dns/s6dns-domain.h>
-typedef size_t scan_func_t (s6dns_domain_t *, char const *) ;
-typedef scan_func_t *scan_func_t_ref ;
-typedef int fmt_func_t (stralloc *, char const *, unsigned int) ;
-typedef fmt_func_t *fmt_func_t_ref ;
+typedef size_t scan_func (s6dns_domain_t *, char const *) ;
+typedef scan_func *scan_func_ref ;
+typedef int fmt_func (stralloc *, char const *, unsigned int) ;
+typedef fmt_func *fmt_func_ref ;
extern size_t s6dns_namescanner (s6dns_domain_t *, char const *) ;
extern int s6dns_domainformatter (stralloc *, char const *, unsigned int) ;
-extern int s6dns_generic_filter_main (int, char const *const *, char const *const *, uint16_t, scan_func_t_ref, fmt_func_t_ref, char const *) ;
+extern int s6dns_generic_filter_main (int, char const *const *, char const *const *, uint16_t, scan_func_ref, fmt_func_ref, char const *) ;
extern int flag4 ;
extern int flag6 ;
diff --git a/src/clients/s6dns_generic_filter_main.c b/src/clients/s6dns_generic_filter_main.c
index 8d97780..32eaee6 100644
--- a/src/clients/s6dns_generic_filter_main.c
+++ b/src/clients/s6dns_generic_filter_main.c
@@ -43,16 +43,16 @@ static void line_recycle (line_t *l)
int flag4 = 0 ;
int flag6 = 0 ;
-int s6dns_generic_filter_main (int argc, char const *const *argv, char const *const *envp, uint16_t qtype, scan_func_t_ref scanner, fmt_func_t_ref formatter, char const *USAGE)
+int s6dns_generic_filter_main (int argc, char const *const *argv, char const *const *envp, uint16_t qtype, scan_func_ref scanner, fmt_func_ref formatter, char const *USAGE)
{
skadns_t a = SKADNS_ZERO ;
- tain_t deadline, tto ;
+ tain deadline, tto ;
char const *normalformat = "%s=%d%w%r" ;
char const *errorformat = "%s=<%e>%w%r" ;
uint16_t maxlines = 256 ;
uint16_t maxconn = 128 ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
unsigned int t = 0 ;
for (;;)
{
@@ -185,7 +185,7 @@ int s6dns_generic_filter_main (int argc, char const *const *argv, char const *co
}
else
{
- tain_t sendlimit ;
+ tain sendlimit ;
uint16_t id ;
line->w[0] = line->swrd.s[line->wpos] ;
line->swrd.s[line->wpos] = 0 ;