summaryrefslogtreecommitdiff
path: root/src/resolv/async_resolv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolv/async_resolv.h')
-rw-r--r--src/resolv/async_resolv.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/resolv/async_resolv.h b/src/resolv/async_resolv.h
index d6cbe149..00e1bdfb 100644
--- a/src/resolv/async_resolv.h
+++ b/src/resolv/async_resolv.h
@@ -37,6 +37,10 @@
#include "resolv/ares/ares_data.h"
#endif /* HAVE_ARES_DATA */
+#ifndef RESOLV_DEFAULT_TTL
+#define RESOLV_DEFAULT_TTL 7200
+#endif /* RESOLV_DEFAULT_TTL */
+
/*
* An opaque structure which holds context for a module using the async
* resolver. Is should be used as a "local-global" variable - in sssd,
@@ -53,6 +57,31 @@ void resolv_reread_configuration(void);
const char *resolv_strerror(int ares_code);
+/* If resolv_hostent->family is AF_INET, then ipaddr points to
+ * struct in_addr, else if family is AF_INET6, ipaddr points to
+ * struct in6_addr
+ */
+struct resolv_addr {
+ uint8_t *ipaddr;
+ int ttl;
+};
+
+struct resolv_hostent {
+ char *name; /* official name of host */
+ char **aliases; /* alias list */
+ int family; /* host address type */
+
+ struct resolv_addr **addr_list; /* list of addresses */
+};
+
+struct resolv_hostent *
+resolv_copy_hostent2(TALLOC_CTX *mem_ctx, struct hostent *src);
+
+struct resolv_hostent *
+resolv_copy_hostent_ares(TALLOC_CTX *mem_ctx, struct hostent *src,
+ int family, void *ares_ttl_data,
+ int num_ares_ttl_data);
+
struct hostent *resolv_copy_hostent(TALLOC_CTX *mem_ctx,
struct hostent *src);