* they will be cancelled.
*/
+#define ADNS_ADDR2TEXT_BUFLEN (INET6_ADDRSTRLEN +1/*%*/ +9/*uint32*/ +1/*nul*/)
+
+int adns_text2addr(const char *addr, uint16_t port, struct sockaddr *sa,
+ socklen_t *salen /* set if OK or ENOSPC; otherwise undef */);
+int adns_addr2text(const struct sockaddr *sa,
+ char *addr_buffer, int *addr_buflen /* set iff ENOSPC */,
+ int *port_r /* may be 0 */);
+ /* These DO NOT return an adns_status. Instead, 0 on success,
+ * or an errno value on failure. Error values are:
+ * EAFNOSUPPORT addr2text only
+ * EINVAL text2addr only: addr has invalid syntax
+ * ENOSPC only if *buflen < _BUFLEN or *salen < sizeof(adns_sockaddr)
+ * Extra errors are possible from text2addr if addr specifies a scope
+ * name suffix (ie, it has a "%" and the scope suffix is not numeric):
+ * ENOSYS address is not link local
+ * ENXIO if_nametoindex said it wasn't a valid name
+ * EIO if_nametoindex went crazy (adns prints a message to stderr)
+ * any other if_nametoindex failed
+ * port is always in host byte order and is simply copied to and
+ * from the appropriate sockaddr field (byteswapped as necessary).
+ */
void adns_forallqueries_begin(adns_state ads);
adns_query adns_forallqueries_next(adns_state ads, void **context_r);