aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/dnsmgr.h
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-08 22:08:07 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-08 22:08:07 +0000
commitc3c2e5edfd715b3a99aac1567623a0b1b7d49de0 (patch)
treec05335b563c3f7cb9a3edbf3e101d8e1b80e0be4 /include/asterisk/dnsmgr.h
parentaf344f1a5be5b43f1d10b95ea6e57ebfa761cf50 (diff)
Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses within Asterisk. While many files have been updated to make use of the API, chan_sip and the RTP code are the files which actually support IPv6 addresses at the time of this commit. The way has been paved for easier upgrading for other files in the near future, though. Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne for their hard work on this. (closes issue #17565) Reported by: russell Patches: asteriskv6-test-report.pdf uploaded by russell (license 2) Review: https://reviewboard.asterisk.org/r/743 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274783 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/dnsmgr.h')
-rw-r--r--include/asterisk/dnsmgr.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asterisk/dnsmgr.h b/include/asterisk/dnsmgr.h
index bf960536d..2c96d8e40 100644
--- a/include/asterisk/dnsmgr.h
+++ b/include/asterisk/dnsmgr.h
@@ -27,7 +27,7 @@
extern "C" {
#endif
-#include "asterisk/network.h"
+#include "asterisk/netsock2.h"
#include "asterisk/srv.h"
/*!
@@ -51,8 +51,9 @@ struct ast_dnsmgr_entry;
*
* \return a DNS manager entry
* \version 1.6.1 result changed from struct in_addr to struct sockaddr_in to store port number
+ * \version 1.8.0 result changed from struct ast_sockaddr_in to ast_sockaddr for IPv6 support
*/
-struct ast_dnsmgr_entry *ast_dnsmgr_get(const char *name, struct sockaddr_in *result, const char *service);
+struct ast_dnsmgr_entry *ast_dnsmgr_get(const char *name, struct ast_sockaddr *result, const char *service);
/*!
* \brief Free a DNS manager entry
@@ -67,7 +68,8 @@ void ast_dnsmgr_release(struct ast_dnsmgr_entry *entry);
* \brief Allocate and initialize a DNS manager entry
*
* \param name the hostname
- * \param result where to store the IP address as the DNS manager refreshes it
+ * \param result where to store the IP address as the DNS manager refreshes it. The address family
+ * is used as an input parameter to filter the returned adresses. if it is 0, both IPv4 * and IPv6 addresses can be returned.
* \param dnsmgr Where to store the allocate DNS manager entry
* \param service
*
@@ -79,7 +81,7 @@ void ast_dnsmgr_release(struct ast_dnsmgr_entry *entry);
* \retval non-zero failure
* \version 1.6.1 result changed from struct in_addr to struct aockaddr_in to store port number
*/
-int ast_dnsmgr_lookup(const char *name, struct sockaddr_in *result, struct ast_dnsmgr_entry **dnsmgr, const char *service);
+int ast_dnsmgr_lookup(const char *name, struct ast_sockaddr *result, struct ast_dnsmgr_entry **dnsmgr, const char *service);
/*!
* \brief Force a refresh of a dnsmgr entry