summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-11-22 23:06:11 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-11-22 23:06:11 +0000
commit2b3e28f88c8e8cd0e21621344ae7705f352dc44e (patch)
tree7c5e171b00a804de54b6f4650d799fa068fa9c88 /include
parentd777e15792ee1f61b1cb77929dda24872cdd7742 (diff)
Fix dnsmgr entries to ask for the same address family each time.
The dnsmgr refresh would always get the first address found regardless of the original address family requested. So if you asked for only IPv4 addresses originally, you might get an IPv6 address on refresh. * Saved the original address family requested by ast_dnsmgr_lookup() to be used when the address is refreshed. ........ Merged revisions 345976 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345977 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/dnsmgr.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asterisk/dnsmgr.h b/include/asterisk/dnsmgr.h
index da8303064..b62c2a14b 100644
--- a/include/asterisk/dnsmgr.h
+++ b/include/asterisk/dnsmgr.h
@@ -44,6 +44,7 @@ struct ast_dnsmgr_entry;
* \param result where the DNS manager should store the IP address as it refreshes it.
* \param service
*
+ * \details
* This function allocates a new DNS manager entry object, and fills it with the
* provided hostname and IP address. This function does not force an initial lookup
* of the IP address. So, generally, this should be used when the initial address
@@ -56,6 +57,24 @@ struct ast_dnsmgr_entry;
struct ast_dnsmgr_entry *ast_dnsmgr_get(const char *name, struct ast_sockaddr *result, const char *service);
/*!
+ * \brief Allocate a new DNS manager entry
+ *
+ * \param name the hostname
+ * \param result where the DNS manager should store the IP address as it refreshes it.
+ * \param service
+ * \param family Address family to filter DNS addresses.
+ *
+ * \details
+ * This function allocates a new DNS manager entry object, and fills it with the
+ * provided hostname and IP address. This function does not force an initial lookup
+ * of the IP address. So, generally, this should be used when the initial address
+ * is already known.
+ *
+ * \return a DNS manager entry
+ */
+struct ast_dnsmgr_entry *ast_dnsmgr_get_family(const char *name, struct ast_sockaddr *result, const char *service, unsigned int family);
+
+/*!
* \brief Free a DNS manager entry
*
* \param entry the DNS manager entry to free