Wed Jan 8 2020 09:49:46

Asterisk developer's documentation


dns.h
Go to the documentation of this file.
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 
19 /*! \file
20  * \brief DNS support for Asterisk
21  * \author Thorsten Lockert <tholo@trollphone.org>
22  */
23 
24 #ifndef _ASTERISK_DNS_H
25 #define _ASTERISK_DNS_H
26 
27 /*! \brief Perform DNS lookup (used by DNS, enum and SRV lookups)
28  \param context
29  \param dname Domain name to lookup (host, SRV domain, TXT record name)
30  \param class Record Class (see "man res_search")
31  \param type Record type (see "man res_search")
32  \param callback Callback function for handling DNS result
33  \note Asterisk DNS is synchronus at this time. This means that if your DNS
34  services does not work, Asterisk may lock while waiting for response.
35 */
36 int ast_search_dns(void *context, const char *dname, int class, int type,
37  int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer));
38 
39 #endif /* _ASTERISK_DNS_H */
int ast_search_dns(void *context, const char *dname, int class, int type, int(*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer))
Perform DNS lookup (used by DNS, enum and SRV lookups)
Definition: dns.c:259
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static const char type[]
Definition: chan_nbs.c:57
static char context[AST_MAX_CONTEXT]
Definition: chan_alsa.c:107