diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-19 01:51:12 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-19 01:51:12 +0000 |
commit | f75a69f25b0fa3467bd1eaee60444875dc900998 (patch) | |
tree | 8892dcca3d9d831e059b2574f5089928700ec05b /doc/libs6dns/s6dns-resolve.html | |
parent | bd13a4ee07b9ca8d24f1cf071393c2f8adf8e85e (diff) | |
download | s6-dns-f75a69f25b0fa3467bd1eaee60444875dc900998.tar.xz |
struct taia -> tain_t doc fixes
Diffstat (limited to 'doc/libs6dns/s6dns-resolve.html')
-rw-r--r-- | doc/libs6dns/s6dns-resolve.html | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/libs6dns/s6dns-resolve.html b/doc/libs6dns/s6dns-resolve.html index bbb3f57..bad7c15 100644 --- a/doc/libs6dns/s6dns-resolve.html +++ b/doc/libs6dns/s6dns-resolve.html @@ -35,9 +35,9 @@ to perform high level synchronous DNS resolution. they can block for a non-negligible amount of time. To avoid unbounded waiting times, they always take 2 arguments at the end, <em>deadline</em> and <em>stamp</em>. <em>deadline</em> is the read-only address of a -<a href="http://skarnet.org/software/skalibs/libstddjb/tai.h">struct taia</a> +<a href="http://skarnet.org/software/skalibs/libstddjb/tai.h">tain_t</a> containing an absolute time which is the deadline for the function, and -<em>stamp</em> is the read-write address of a <tt>struct taia</tt> being +<em>stamp</em> is the read-write address of a <tt>tain_t</tt> being an accurate enough representation of the current absolute time. If the function has not returned by *<em>deadline</em>, then it immediately returns with a failure code and errno set to ETIMEDOUT. In every case, @@ -108,7 +108,7 @@ function is declared in the <tt>s6dns-constants.h</tt> header. <h4> Basic wrapper around s6dns_engine </h4> <p> -<code> int s6dns_resolve_loop_r_g (s6dns_engine_t *dt, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_loop_r_g (s6dns_engine_t *dt, tain_t const *deadline) </code> <br /> Resolves the query stored in <tt>dt</tt>. Returns 1 on success or 0 on failure. </p> @@ -116,14 +116,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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_core_g (s6dns_domain_t const *d, uint16 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, struct taia const *deadline) </code> <br /> +<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 /> 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 @@ -140,7 +140,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, struct taia const *deadline) </code> <br /> +<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 /> 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, @@ -148,7 +148,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, struct taia const *deadline) </code> <br /> +<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 /> 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 @@ -156,7 +156,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, struct taia const *deadline) </code> <br /> +<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 /> 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 @@ -167,7 +167,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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_a_g (stralloc *ips, char const *name, unsigned int 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 @@ -175,7 +175,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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_aaaa_g (stralloc *ips, char const *name, unsigned int 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 @@ -183,7 +183,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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_aaaaa_g (genalloc *ips, char const *name, unsigned int 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 @@ -195,7 +195,7 @@ indiscriminately. </p> <p> -<code> int s6dns_resolve_ptr_g (genalloc *ds, char const *name, unsigned int len, int qualif, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_ptr_g (genalloc *ds, char const *name, unsigned int 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 @@ -203,7 +203,7 @@ appended to the genalloc *<em>ds</em>, which contains an array of <tt>s6dns_doma </p> <p> -<code> int s6dns_resolve_name4_g (genalloc *ds, char const *ip, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_name4_g (genalloc *ds, char const *ip, tain_t const *deadline) </code> <br /> Performs a PTR query on the <tt>in-addr.arpa.</tt> name representing the IPv4 address <em>ip</em> (4 network-order bytes). Returns -1 if an error occurs, or 0 if no answer @@ -212,7 +212,7 @@ appended to the genalloc *<em>ds</em>, which contains an array of <tt>s6dns_doma </p> <p> -<code> int s6dns_resolve_name6_g (genalloc *ds, char const *ip, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_name6_g (genalloc *ds, char const *ip, tain_t const *deadline) </code> <br /> Performs a PTR query on the <tt>ip6.arpa.</tt> name representing the IPv6 address <em>ip</em> (16 network-order bytes). Returns -1 if an error occurs, or 0 if no answer @@ -221,13 +221,13 @@ appended to the genalloc *<em>ds</em>, which contains an array of <tt>s6dns_doma </p> <p> -<code> int s6dns_resolve_name46_g (genalloc *ds, ip46_t const *ip, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_name46_g (genalloc *ds, ip46_t const *ip, tain_t const *deadline) </code> <br /> Calls <tt>s6dns_resolve_name6_g()</tt> or <tt>s6dns_resolve_name4_g()</tt> 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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_ns_g (genalloc *ds, char const *name, unsigned int 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 @@ -235,7 +235,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, struct taia const *deadline) </code> <br /> +<code> int s6dns_resolve_cname_g (genalloc *ds, char const *name, unsigned int 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 @@ -244,7 +244,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, struct taia const *deadline) </code> <br /> +unsigned int 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 @@ -254,7 +254,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, struct taia const *deadline) </code> <br /> +unsigned int 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 @@ -264,7 +264,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, struct taia const *deadline) </code> <br /> +unsigned int 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 @@ -274,7 +274,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, struct taia const *deadline) </code> <br /> +unsigned int 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 @@ -284,7 +284,7 @@ appended to the genalloc *<em>srvs</em>, which contains an array of <p> <code> int s6dns_resolve_txt_g (stralloc *sa, genalloc *offsets, char const *name, -unsigned int len, int qualif, struct taia const *deadline) </code> <br /> +unsigned int len, int qualif, tain_t const *deadline) </code> <br /> Performs an TXT 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: @@ -302,7 +302,7 @@ The number of appended integers is the total number of answers. </li> <p> <code> int s6dns_resolven_loop_g (s6dns_engine_t *dtl, unsigned int n, -unsigned int or, struct taia const *deadline) </code> <br /> +unsigned int or, tain_t const *deadline) </code> <br /> Resolves the <em>n</em> queries stored in the array pointed to by <em>dtl</em>, in parallel. If <em>or</em> is zero, it does not return before all answers have arrived. If <em>or</em> is 1, it returns when an answer arrives, but does @@ -338,7 +338,7 @@ initialized. Other codes report various network problems. <p> <code> int s6dns_resolven_parse_g (s6dns_resolve_t const *list, unsigned int n, -struct taia const *deadline) </code> <br /> +tain_t const *deadline) </code> <br /> Performs <em>n</em> complete resolutions in parallel, parsing the results. Returns 1 in case of success or 0 if a global error occurred. </p> @@ -356,7 +356,7 @@ A list of valid query types can be found in the <tt>s6dns-constants.h</tt> header. </li> <li> <tt>options</tt> : a <tt>uint32</tt> containing options passed to <a href="s6dns_engine.html">s6dns_engine_init()</a>. </li> - <li> <tt>deadline</tt> : a <tt>struct taia</tt> containing the + <li> <tt>deadline</tt> : a <tt>tain_t</tt> containing the deadline for this query, i.e. the query will fail with an ETIMEDOUT code if no answer has arrived by then. Note that the <em>deadline</em> argument given to s6dns_resolven_parse() is a global deadline that |