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)
static int answer(void *data)
int ast_dns_resolver_set_data(struct ast_dns_query *query, void *data)
Set resolver specific data on a 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.
void ast_dns_resolver_completed(struct ast_dns_query *query)
Mark a DNS query as having been completed.
void * ast_dns_resolver_get_data(const struct ast_dns_query *query)
Retrieve resolver specific data.
int ast_dns_resolver_register(struct ast_dns_resolver *resolver)
Register a DNS resolver.
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.
struct ast_dns_resolver * resolver
The resolver in use for this query.
int rr_class
Resource record class.
int rr_type
Resource record type.
DNS resolver implementation.
unsigned int priority
Priority for this resolver if multiple exist, lower being higher priority.
int(* cancel)(struct ast_dns_query *query)
Cancel resolution of a DNS query.
const char * name
The name of the resolver implementation.
int(* resolve)(struct ast_dns_query *query)
Perform resolution of a DNS query.
AST_RWLIST_ENTRY(ast_dns_resolver) next
Linked list information.