00001 /* 00002 * Asterisk -- An open source telephony toolkit. 00003 * 00004 * Written by Thorsten Lockert <tholo@trollphone.org> 00005 * 00006 * Funding provided by Troll Phone Networks AS 00007 * 00008 * See http://www.asterisk.org for more information about 00009 * the Asterisk project. Please do not directly contact 00010 * any of the maintainers of this project for assistance; 00011 * the project provides a web site, mailing lists and IRC 00012 * channels for your use. 00013 * 00014 * This program is free software, distributed under the terms of 00015 * the GNU General Public License Version 2. See the LICENSE file 00016 * at the top of the source tree. 00017 */ 00018 00019 /*! \file 00020 * \brief DNS support for Asterisk 00021 * \author Thorsten Lockert <tholo@trollphone.org> 00022 */ 00023 00024 #ifndef _ASTERISK_DNS_H 00025 #define _ASTERISK_DNS_H 00026 00027 /*! \brief Perform DNS lookup (used by DNS, enum and SRV lookups) 00028 \param context 00029 \param dname Domain name to lookup (host, SRV domain, TXT record name) 00030 \param class Record Class (see "man res_search") 00031 \param type Record type (see "man res_search") 00032 \param callback Callback function for handling DNS result 00033 \note Asterisk DNS is synchronus at this time. This means that if your DNS 00034 services does not work, Asterisk may lock while waiting for response. 00035 */ 00036 int ast_search_dns(void *context, const char *dname, int class, int type, 00037 int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer)); 00038 00039 #endif /* _ASTERISK_DNS_H */