dns.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Written by Thorsten Lockert <tholo@trollphone.org>
  5. *
  6. * Funding provided by Troll Phone Networks AS
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*! \file
  19. * \brief DNS support for Asterisk
  20. * \author Thorsten Lockert <tholo@trollphone.org>
  21. */
  22. #ifndef _ASTERISK_DNS_H
  23. #define _ASTERISK_DNS_H
  24. /*! \brief Perform DNS lookup (used by DNS, enum and SRV lookups)
  25. \param context
  26. \param dname Domain name to lookup (host, SRV domain, TXT record name)
  27. \param class Record Class (see "man res_search")
  28. \param type Record type (see "man res_search")
  29. \param callback Callback function for handling DNS result
  30. \note Asterisk DNS is synchronus at this time. This means that if your DNS
  31. services does not work, Asterisk may lock while waiting for response.
  32. */
  33. int ast_search_dns(void *context, const char *dname, int class, int type,
  34. int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer));
  35. /*! \brief Retrieve the configured nameservers of the system */
  36. struct ao2_container *ast_dns_get_nameservers(void);
  37. #endif /* _ASTERISK_DNS_H */