24 #ifndef _ASTERISK_DNS_RESOLVER_H 25 #define _ASTERISK_DNS_RESOLVER_H 27 #if defined(__cplusplus) || defined(c_plusplus) 101 unsigned int rcode,
const char *canonical,
const char *
answer,
size_t answer_size);
142 #if defined(__cplusplus) || defined(c_plusplus) int ast_dns_resolver_add_record(struct ast_dns_query *query, int rr_type, int rr_class, int ttl, const char *data, const size_t size)
Add a DNS record to the result of a DNS query.
void ast_dns_resolver_unregister(struct ast_dns_resolver *resolver)
Unregister a DNS resolver.
int rr_type
Resource record type.
int rr_class
Resource record class.
AST_RWLIST_ENTRY(ast_dns_resolver) next
Linked list information.
void * ast_dns_resolver_get_data(const struct ast_dns_query *query)
Retrieve resolver specific data.
const char * name
The name of the resolver implementation.
int ast_dns_resolver_register(struct ast_dns_resolver *resolver)
Register a DNS resolver.
static int answer(void *data)
void ast_dns_resolver_completed(struct ast_dns_query *query)
Mark a DNS query as having been completed.
int ast_dns_resolver_set_data(struct ast_dns_query *query, void *data)
Set resolver specific data on a query.
int(* resolve)(struct ast_dns_query *query)
Perform resolution of a DNS query.
DNS resolver implementation.
unsigned int priority
Priority for this resolver if multiple exist, lower being higher priority.
struct ast_dns_resolver * resolver
The resolver in use for this query.
int ast_dns_resolver_set_result(struct ast_dns_query *query, unsigned int secure, unsigned int bogus, unsigned int rcode, const char *canonical, const char *answer, size_t answer_size)
Set result information for a DNS query.
int(* cancel)(struct ast_dns_query *query)
Cancel resolution of a DNS query.