diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/s6-dns/s6dns-analyze.h | 4 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-domain.h | 21 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-engine.h | 9 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-fmt.h | 11 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-message.h | 45 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-rci.h | 4 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-resolve.h | 27 | ||||
-rw-r--r-- | src/include/s6-dns/skadns.h | 14 |
8 files changed, 67 insertions, 68 deletions
diff --git a/src/include/s6-dns/s6dns-analyze.h b/src/include/s6-dns/s6dns-analyze.h index 2908763..ff74025 100644 --- a/src/include/s6-dns/s6dns-analyze.h +++ b/src/include/s6-dns/s6dns-analyze.h @@ -3,7 +3,7 @@ #ifndef S6DNS_ANALYZE_H #define S6DNS_ANALYZE_H -#include <skalibs/uint16.h> +#include <stdint.h> #include <skalibs/genwrite.h> #include <s6-dns/s6dns-message.h> @@ -13,7 +13,7 @@ typedef s6dns_analyze_record_func_t *s6dns_analyze_record_func_t_ref ; typedef struct s6dns_analyze_rtypetable_s s6dns_analyze_rtypetable_t, *s6dns_analyze_rtypetable_t_ref ; struct s6dns_analyze_rtypetable_s { - uint16 rtype ; + uint16_t rtype ; char const *string ; s6dns_analyze_record_func_t_ref f ; } ; diff --git a/src/include/s6-dns/s6dns-domain.h b/src/include/s6-dns/s6dns-domain.h index 3faae07..d5ed077 100644 --- a/src/include/s6-dns/s6dns-domain.h +++ b/src/include/s6-dns/s6dns-domain.h @@ -3,6 +3,7 @@ #ifndef S6DNS_DOMAIN_H #define S6DNS_DOMAIN_H +#include <sys/types.h> #include <skalibs/ip46.h> typedef struct s6dns_domain_s s6dns_domain_t, *s6dns_domain_t_ref ; @@ -15,33 +16,33 @@ struct s6dns_domain_s /* Conversions from/to user strings */ -extern int s6dns_domain_fromstring (s6dns_domain_t_ref, char const *, unsigned int) ; -extern unsigned int s6dns_domain_tostring (char *, unsigned int, s6dns_domain_t const *) ; +extern int s6dns_domain_fromstring (s6dns_domain_t *, char const *, size_t) ; +extern unsigned int s6dns_domain_tostring (char *, size_t, s6dns_domain_t const *) ; /* Qualification */ -extern int s6dns_domain_noqualify (s6dns_domain_t_ref) ; +extern int s6dns_domain_noqualify (s6dns_domain_t *) ; extern unsigned int s6dns_domain_qualify (s6dns_domain_t *, s6dns_domain_t const *, char const *, unsigned int) ; /* Internal coding/encoding to/from protocol form */ -extern int s6dns_domain_encode (s6dns_domain_t_ref) ; -extern unsigned int s6dns_domain_encodelist (s6dns_domain_t_ref, unsigned int) ; -extern int s6dns_domain_decode (s6dns_domain_t_ref) ; +extern int s6dns_domain_encode (s6dns_domain_t *) ; +extern unsigned int s6dns_domain_encodelist (s6dns_domain_t *, unsigned int) ; +extern int s6dns_domain_decode (s6dns_domain_t *) ; /* Useful shortcuts */ -extern int s6dns_domain_fromstring_noqualify_encode (s6dns_domain_t_ref, char const *, unsigned int) ; -extern unsigned int s6dns_domain_fromstring_qualify_encode (s6dns_domain_t *, char const *, unsigned int, char const *, unsigned int) ; +extern int s6dns_domain_fromstring_noqualify_encode (s6dns_domain_t *, char const *, size_t) ; +extern unsigned int s6dns_domain_fromstring_qualify_encode (s6dns_domain_t *, char const *, size_t, char const *, unsigned int) ; /* Helpers for PTR */ -extern void s6dns_domain_arpafromip4 (s6dns_domain_t_ref, char const *) ; -extern void s6dns_domain_arpafromip6 (s6dns_domain_t_ref, char const *, unsigned int) ; +extern void s6dns_domain_arpafromip4 (s6dns_domain_t *, char const *) ; +extern void s6dns_domain_arpafromip6 (s6dns_domain_t *, char const *, unsigned int) ; #define s6dns_domain_arpafromip46(d, i) (ip46_is6(i) ? s6dns_domain_arpafromip6(d, (i)->ip, 128) : s6dns_domain_arpafromip4(d, (i)->ip)) #endif diff --git a/src/include/s6-dns/s6dns-engine.h b/src/include/s6-dns/s6dns-engine.h index d6b0503..bcb1a46 100644 --- a/src/include/s6-dns/s6dns-engine.h +++ b/src/include/s6-dns/s6dns-engine.h @@ -3,9 +3,8 @@ #ifndef S6DNS_ENGINE_H #define S6DNS_ENGINE_H +#include <stdint.h> #include <errno.h> -#include <skalibs/uint16.h> -#include <skalibs/uint32.h> #include <skalibs/tai.h> #include <skalibs/stralloc.h> #include <s6-dns/s6dns-constants.h> @@ -45,7 +44,7 @@ struct s6dns_engine_s tain_t localdeadline ; unsigned int querylen ; int fd ; - uint32 protostate ; + uint32_t protostate ; s6dns_ip46list_t servers ; s6dns_debughook_t const *debughook ; unsigned int curserver ; @@ -84,7 +83,7 @@ extern void s6dns_engine_freen (s6dns_engine_t *, unsigned int) ; #define s6dns_engine_init(dt, servers, options, q, qlen, qtype, deadline, stamp) s6dns_engine_init_r(dt, servers, options, q, qlen, qtype, &s6dns_debughook_zero, deadline, stamp) #define s6dns_engine_init_g(dt, servers, options, q, qlen, qtype, deadline) s6dns_engine_init(dt, servers, options, q, qlen, qtype, (deadline), &STAMP) -extern int s6dns_engine_init_r (s6dns_engine_t *, s6dns_ip46list_t const *, uint32, char const *, unsigned int, uint16, s6dns_debughook_t const *, tain_t const *, tain_t const *) ; +extern int s6dns_engine_init_r (s6dns_engine_t *, s6dns_ip46list_t const *, uint32_t, char const *, unsigned int, uint16_t, s6dns_debughook_t const *, tain_t const *, tain_t const *) ; #define s6dns_engine_init_r_g(dt, servers, options, q, qlen, qtype, dbh, deadline) s6dns_engine_init_r(dt, servers, options, q, qlen, qtype, dbh, (deadline), &STAMP) @@ -103,6 +102,6 @@ extern int s6dns_engine_event (s6dns_engine_t *, tain_t const *) ; #define s6dns_engine_event_g(dt) s6dns_engine_event((dt), &STAMP) #define s6dns_engine_packet(dt) ((dt)->sa.s + (dt)->querylen) -#define s6dns_engine_packetlen(dt) ((dt)->sa.len - (dt)->querylen) +#define s6dns_engine_packetlen(dt) ((unsigned int)((dt)->sa.len - (dt)->querylen)) #endif diff --git a/src/include/s6-dns/s6dns-fmt.h b/src/include/s6-dns/s6dns-fmt.h index fd4dfc5..e9d379b 100644 --- a/src/include/s6-dns/s6dns-fmt.h +++ b/src/include/s6-dns/s6dns-fmt.h @@ -3,6 +3,7 @@ #ifndef S6DNS_FMT_H #define S6DNS_FMT_H +#include <sys/types.h> #include <skalibs/uint16.h> #include <skalibs/uint32.h> #include <s6-dns/s6dns-domain.h> @@ -12,18 +13,18 @@ #define s6dns_fmt_domain(s, max, d) s6dns_domain_tostring(s, max, d) #define S6DNS_FMT_DOMAINLIST(n) ((n) * S6DNS_FMT_DOMAIN) -extern unsigned int s6dns_fmt_domainlist (char *, unsigned int, s6dns_domain_t const *, unsigned int, char const *, unsigned int) ; +extern size_t s6dns_fmt_domainlist (char *, size_t, s6dns_domain_t const *, unsigned int, char const *, size_t) ; #define S6DNS_FMT_HINFO 512 -extern unsigned int s6dns_fmt_hinfo (char *, unsigned int, s6dns_message_rr_hinfo_t const *) ; +extern size_t s6dns_fmt_hinfo (char *, size_t, s6dns_message_rr_hinfo_t const *) ; #define S6DNS_FMT_MX (S6DNS_FMT_DOMAIN + UINT16_FMT) -extern unsigned int s6dns_fmt_mx (char *, unsigned int, s6dns_message_rr_mx_t const *) ; +extern size_t s6dns_fmt_mx (char *, size_t, s6dns_message_rr_mx_t const *) ; #define S6DNS_FMT_SOA (S6DNS_FMT_DOMAIN * 2 + 5 * UINT32_FMT) -extern unsigned int s6dns_fmt_soa (char *, unsigned int, s6dns_message_rr_soa_t const *) ; +extern size_t s6dns_fmt_soa (char *, size_t, s6dns_message_rr_soa_t const *) ; #define S6DNS_FMT_SRV (S6DNS_FMT_DOMAIN + 3 * UINT16_FMT) -extern unsigned int s6dns_fmt_srv (char *, unsigned int, s6dns_message_rr_srv_t const *) ; +extern size_t s6dns_fmt_srv (char *, size_t, s6dns_message_rr_srv_t const *) ; #endif diff --git a/src/include/s6-dns/s6dns-message.h b/src/include/s6-dns/s6dns-message.h index d26106b..cc3e68e 100644 --- a/src/include/s6-dns/s6dns-message.h +++ b/src/include/s6-dns/s6dns-message.h @@ -3,8 +3,7 @@ #ifndef S6DNS_MESSAGE_H #define S6DNS_MESSAGE_H -#include <skalibs/uint16.h> -#include <skalibs/uint32.h> +#include <stdint.h> #include <skalibs/stralloc.h> #include <skalibs/genalloc.h> #include <s6-dns/s6dns-domain.h> @@ -15,10 +14,10 @@ typedef struct s6dns_message_counts_s s6dns_message_counts_t, *s6dns_message_counts_t_ref ; struct s6dns_message_counts_s { - uint16 qd ; - uint16 an ; - uint16 ns ; - uint16 nr ; + uint16_t qd ; + uint16_t an ; + uint16_t ns ; + uint16_t nr ; } ; #define S6DNS_MESSAGE_COUNTS_ZERO { .qd = 0, .an = 0, .ns = 0, .nr = 0 } @@ -31,7 +30,7 @@ extern unsigned int s6dns_message_counts_next (s6dns_message_counts_t *) ; typedef struct s6dns_message_header_s s6dns_message_header_t, *s6dns_message_header_t_ref ; struct s6dns_message_header_s { - uint16 id ; + uint16_t id ; unsigned int qr : 1 ; unsigned int opcode : 4 ; unsigned int aa : 1 ; @@ -79,7 +78,7 @@ extern int s6dns_message_get_hinfo (s6dns_message_rr_hinfo_t *, char const *, un typedef struct s6dns_message_rr_mx_s s6dns_message_rr_mx_t, *s6dns_message_rr_mx_t_ref ; struct s6dns_message_rr_mx_s { - uint16 preference ; + uint16_t preference ; s6dns_domain_t exchange ; } ; @@ -90,11 +89,11 @@ struct s6dns_message_rr_soa_s { s6dns_domain_t mname ; s6dns_domain_t rname ; - uint32 serial ; - uint32 refresh ; - uint32 retry ; - uint32 expire ; - uint32 minimum ; + uint32_t serial ; + uint32_t refresh ; + uint32_t retry ; + uint32_t expire ; + uint32_t minimum ; } ; extern int s6dns_message_get_soa (s6dns_message_rr_soa_t *, char const *, unsigned int, unsigned int *) ; @@ -102,9 +101,9 @@ extern int s6dns_message_get_soa (s6dns_message_rr_soa_t *, char const *, unsign typedef struct s6dns_message_rr_srv_s s6dns_message_rr_srv_t, *s6dns_message_rr_srv_t_ref ; struct s6dns_message_rr_srv_s { - uint16 priority ; - uint16 weight ; - uint16 port ; + uint16_t priority ; + uint16_t weight ; + uint16_t port ; s6dns_domain_t target ; } ; @@ -117,10 +116,10 @@ typedef struct s6dns_message_rr_s s6dns_message_rr_t, *s6dns_message_rr_t_ref ; struct s6dns_message_rr_s { s6dns_domain_t name ; - uint16 rtype ; - uint16 rclass ; - uint32 ttl ; - uint16 rdlength ; + uint16_t rtype ; + uint16_t rclass ; + uint32_t ttl ; + uint16_t rdlength ; } ; typedef int s6dns_message_rr_func_t (s6dns_message_rr_t const *, char const *, unsigned int, unsigned int, unsigned int, void *) ; @@ -133,8 +132,8 @@ typedef struct s6dns_mpag_s s6dns_mpag_t, *s6dns_mpag_t_ref ; struct s6dns_mpag_s { stralloc sa ; - genalloc offsets ; /* array of unsigned int */ - uint16 rtype ; + genalloc offsets ; /* array of size_t */ + uint16_t rtype ; } ; #define S6DNS_MPAG_ZERO { .sa = STRALLOC_ZERO, .offsets = GENALLOC_ZERO, .rtype = 0 } @@ -145,7 +144,7 @@ typedef struct s6dns_dpag_s s6dns_dpag_t, *s6dns_dpag_t_ref ; struct s6dns_dpag_s { genalloc ds ; /* array of s6dns_domain_t */ - uint16 rtype ; + uint16_t rtype ; } ; #define S6DNS_DPAG_ZERO { .ds = GENALLOC_ZERO, .rtype = 0 } diff --git a/src/include/s6-dns/s6dns-rci.h b/src/include/s6-dns/s6dns-rci.h index 326e029..bad364c 100644 --- a/src/include/s6-dns/s6dns-rci.h +++ b/src/include/s6-dns/s6dns-rci.h @@ -21,8 +21,8 @@ struct s6dns_rci_s extern s6dns_rci_t const s6dns_rci_zero ; extern s6dns_rci_t s6dns_rci_here ; -extern int s6dns_rci_init (s6dns_rci_t_ref, char const *) ; -extern void s6dns_rci_free (s6dns_rci_t_ref) ; +extern int s6dns_rci_init (s6dns_rci_t *, char const *) ; +extern void s6dns_rci_free (s6dns_rci_t *) ; #define s6dns_qualify(list, d) s6dns_domain_qualify(list, (d), s6dns_rci_here.rules.s, s6dns_rci_here.rulesnum) diff --git a/src/include/s6-dns/s6dns-resolve.h b/src/include/s6-dns/s6dns-resolve.h index 805ea2a..4ee566a 100644 --- a/src/include/s6-dns/s6dns-resolve.h +++ b/src/include/s6-dns/s6dns-resolve.h @@ -3,9 +3,8 @@ #ifndef S6DNS_RESOLVE_H #define S6DNS_RESOLVE_H +#include <stdint.h> #include <errno.h> -#include <skalibs/uint16.h> -#include <skalibs/uint32.h> #include <skalibs/tai.h> #include <skalibs/stralloc.h> #include <skalibs/genalloc.h> @@ -46,7 +45,7 @@ #define s6dns_resolve_core(d, qtype, deadline, stamp) s6dns_resolve_core_r(d, qtype, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_core_g(d, qtype, deadline) s6dns_resolve_core(d, qtype, (deadline), &STAMP) -extern int s6dns_resolve_core_r (s6dns_domain_t const *, uint16, s6dns_engine_t_ref, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_core_r (s6dns_domain_t const *, uint16_t, s6dns_engine_t *, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolve_core_r_g(d, qtype, dt, servers, dbh, deadline) s6dns_resolve_core_r(d, qtype, dt, servers, dbh, (deadline), &STAMP) @@ -59,7 +58,7 @@ extern int s6dns_resolve_core_r (s6dns_domain_t const *, uint16, s6dns_engine_t_ #define s6dns_resolve_parse(d, qtype, parsefunc, parsedata, deadline, stamp) s6dns_resolve_parse_r(d, qtype, parsefunc, parsedata, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_parse_g(d, qtype, parsefunc, parsedata, deadline) s6dns_resolve_parse(d, qtype, parsefunc, parsedata, (deadline), &STAMP) -extern int s6dns_resolve_parse_r (s6dns_domain_t const *, uint16, s6dns_message_rr_func_t_ref, void *, s6dns_engine_t_ref, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_parse_r (s6dns_domain_t const *, 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_resolve_parse_r_g(d, qtype, parsefunc, parsedata, dt, servers, dbh, deadline) s6dns_resolve_parse_r(d, qtype, parsefunc, parsedata, dt, servers, dbh, (deadline), &STAMP) @@ -69,7 +68,7 @@ extern int s6dns_resolve_parse_r (s6dns_domain_t const *, uint16, s6dns_message_ #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, s6dns_message_rr_func_t_ref, void *, s6dns_engine_t_ref, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +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 *) ; #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) @@ -80,7 +79,7 @@ extern int s6dns_resolvenoq_r (char const *, unsigned int, uint16, s6dns_message #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, 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 *, unsigned int, 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) @@ -146,12 +145,12 @@ extern int s6dns_resolveq_aaaaa_r(genalloc *, char const *, unsigned int, s6dns_ #define s6dns_resolve_name4(ds, ip, deadline, stamp) s6dns_resolve_name4_r(ds, ip, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_name4_g(ds, ip, deadline) s6dns_resolve_name4(ds, ip, (deadline), &STAMP) -extern int s6dns_resolve_name4_r (genalloc *, char const *, s6dns_engine_t_ref, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_name4_r (genalloc *, char const *, s6dns_engine_t *, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolve_name4_r_g(ds, ip, dt, servers, dbh, deadline) s6dns_resolve_name4_r(ds, ip, dt, servers, dbh, (deadline), &STAMP) #define s6dns_resolve_name6(ds, ip6, deadline, stamp) s6dns_resolve_name6_r(ds, ip6, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_name6_g(ds, ip6, deadline) s6dns_resolve_name6(ds, ip6, (deadline), &STAMP) -extern int s6dns_resolve_name6_r (genalloc *, char const *, s6dns_engine_t_ref, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_name6_r (genalloc *, char const *, s6dns_engine_t *, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolve_name6_r_g(ds, ip6, dt, servers, dbh, deadline) s6dns_resolve_name6_r(ds, ip6, dt, servers, dbh, (deadline), &STAMP) #define s6dns_resolve_name46(ds, i, deadline, stamp) s6dns_resolve_name46_r(ds, i, &s6dns_engine_here, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) @@ -202,12 +201,12 @@ extern int s6dns_resolve_name6_r (genalloc *, char const *, s6dns_engine_t_ref, #define s6dns_resolve_dpag(ds, name, len, qtype, qualif, deadline, stamp) s6dns_resolve_dpag_r(ds, name, len, qtype, qualif, &s6dns_engine_here, &s6dns_rci_here, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_dpag_g(ds, name, len, qtype, qualif, deadline) s6dns_resolve_dpag(ds, name, len, qtype, qualif, (deadline), &STAMP) -extern int s6dns_resolve_dpag_r (genalloc *, char const *, unsigned int, uint16, int, s6dns_engine_t_ref, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_dpag_r (genalloc *, char const *, unsigned int, uint16_t, int, s6dns_engine_t *, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolve_dpag_r_g(ds, name, len, qtype, qualif, dt, rci, dbh, deadline) s6dns_resolve_dpag_r(ds, name, len, qtype, qualif, dt, rci, dbh, (deadline), &STAMP) #define s6dns_resolve_mpag(sa, offsets, name, len, qtype, parsefunc, qualif, deadline, stamp) s6dns_resolve_mpag_r(sa, offsets, name, len, qtype, parsefunc, qualif, &s6dns_engine_here, &s6dns_rci_here, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolve_mpag_g(sa, offsets, name, len, qtype, parsefunc, qualif, deadline) s6dns_resolve_mpag(sa, offsets, name, len, qtype, parsefunc, qualif, (deadline), &STAMP) -extern int s6dns_resolve_mpag_r (stralloc *, genalloc *, char const *, unsigned int, uint16, s6dns_message_rr_func_t_ref, int, s6dns_engine_t_ref, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolve_mpag_r (stralloc *, genalloc *, char const *, unsigned int, uint16_t, s6dns_message_rr_func_t_ref, int, s6dns_engine_t *, s6dns_rci_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolve_mpag_r_g(sa, offsets, name, len, qtype, parsefunc, qualif, dt, rci, dbh, deadline) s6dns_resolve_mpag_r(sa, offsets, name, len, qtype, parsefunc, qualif, dt, rci, dbh, (deadline), &STAMP) @@ -219,7 +218,7 @@ extern int s6dns_resolve_mpag_r (stralloc *, genalloc *, char const *, unsigned asynchronous resolution, use the skadns library. */ -extern int s6dns_resolven_loop (s6dns_engine_t_ref, unsigned int, unsigned int, tain_t const *, tain_t *) ; +extern int s6dns_resolven_loop (s6dns_engine_t *, unsigned int, unsigned int, tain_t const *, tain_t *) ; #define s6dns_resolven_loop_g(list, n, zor, deadline) s6dns_resolven(list, n, zor, (deadline), &STAMP) typedef struct s6dns_resolve_s s6dns_resolve_t, *s6dns_resolve_t_ref ; @@ -229,14 +228,14 @@ struct s6dns_resolve_s tain_t deadline ; s6dns_message_rr_func_t_ref parsefunc ; void *data ; - uint32 options ; + uint32_t options ; int status ; - uint16 qtype ; + uint16_t qtype ; } ; #define s6dns_resolven_parse(list, n, deadline, stamp) s6dns_resolven_parse_r(list, n, &s6dns_rci_here.servers, &s6dns_debughook_zero, deadline, stamp) #define s6dns_resolven_parse_g(list, n, deadline) s6dns_resolven_parse(list, n, (deadline), &STAMP) -extern int s6dns_resolven_parse_r (s6dns_resolve_t_ref, unsigned int, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; +extern int s6dns_resolven_parse_r (s6dns_resolve_t *, unsigned int, s6dns_ip46list_t const *, s6dns_debughook_t const *, tain_t const *, tain_t *) ; #define s6dns_resolven_parse_r_g(list, n, servers, dbh, deadline) s6dns_resolven_parse_r(list, n, servers, dbh, (deadline), &STAMP) #endif diff --git a/src/include/s6-dns/skadns.h b/src/include/s6-dns/skadns.h index b58363a..04803ea 100644 --- a/src/include/s6-dns/skadns.h +++ b/src/include/s6-dns/skadns.h @@ -3,8 +3,8 @@ #ifndef SKADNS_H #define SKADNS_H +#include <stdint.h> #include <errno.h> -#include <skalibs/uint16.h> #include <skalibs/tai.h> #include <skalibs/genalloc.h> #include <skalibs/gensetdyn.h> @@ -32,7 +32,7 @@ typedef struct skadns_s skadns_t, *skadns_t_ref ; struct skadns_s { skaclient_t connection ; - genalloc list ; /* array of uint16 */ + genalloc list ; /* array of uint16_t */ gensetdyn q ; /* set of skadnsanswer_t */ skaclient_buffer_t buffers ; } ; @@ -51,9 +51,9 @@ extern void skadns_end (skadns_t *) ; /* Synchronous functions */ -extern int skadns_send (skadns_t *, uint16 *, s6dns_domain_t const *, uint16, tain_t const *, tain_t const *, tain_t *) ; +extern int skadns_send (skadns_t *, uint16_t *, s6dns_domain_t const *, uint16_t, tain_t const *, tain_t const *, tain_t *) ; #define skadns_send_g(a, id, d, qtype, limit, deadline) skadns_send(a, id, d, qtype, limit, (deadline), &STAMP) -extern int skadns_cancel (skadns_t *, uint16, tain_t const *, tain_t *) ; +extern int skadns_cancel (skadns_t *, uint16_t, tain_t const *, tain_t *) ; #define skadns_cancel_g(a, id, deadline) skadns_cancel(a, id, (deadline), &STAMP) @@ -61,10 +61,10 @@ extern int skadns_cancel (skadns_t *, uint16, tain_t const *, tain_t *) ; #define skadns_fd(a) skaclient_fd(&(a)->connection) extern int skadns_update (skadns_t *) ; -#define skadns_list(a) genalloc_s(uint16 const, &(a)->list) +#define skadns_list(a) genalloc_s(uint16_t const, &(a)->list) #define skadns_clearlist(a) ((a)->list.len = 0) -extern int skadns_packetlen (skadns_t const *, uint16) ; -extern char const *skadns_packet (skadns_t const *, uint16) ; +extern int skadns_packetlen (skadns_t const *, uint16_t) ; +extern char const *skadns_packet (skadns_t const *, uint16_t) ; extern int skadns_release (skadns_t *, uint16) ; #endif |