26 #ifndef _ASTERISK_DNS_INTERNAL_H 27 #define _ASTERISK_DNS_INTERNAL_H 280 char *
dns_find_record(
const char *record,
size_t record_size,
const char *response,
size_t response_size);
struct ast_dns_query * query
The underlying DNS query.
int dns_parse_string(char *cur, uint8_t *size, char **val)
Parse a DNS string from a DNS record.
ast_dns_resolve_callback callback
Callback to invoke upon completion.
void dns_srv_sort(struct ast_dns_result *result)
Sort the SRV records on a result.
void dns_naptr_sort(struct ast_dns_result *result)
Sort the NAPTR records on a result.
const char * replacement
The replacement from the NAPTR record.
void(* ast_dns_resolve_callback)(const struct ast_dns_query *query)
Callback invoked when a query completes.
char * data_ptr
pointer to record-specific data.
void * user_data
User-specific data.
unsigned int rcode
Optional rcode, set if an error occurred.
int rr_type
Resource record type.
unsigned int secure
Whether the result is secure.
const char * flags
The flags from the NAPTR record.
int rr_class
Resource record class.
int rr_class
Resource record class.
int dns_parse_short(unsigned char *cur, uint16_t *val)
Parse a 16-bit unsigned value from a DNS record.
struct ast_dns_record::@253 list
Linked list information.
struct ast_dns_record * dns_srv_alloc(struct ast_dns_query *query, const char *data, const size_t size)
Allocate and parse a DNS SRV record.
unsigned short port
The port in the SRV record.
const char * canonical
The canonical name.
struct ast_dns_record * dns_txt_alloc(struct ast_dns_query *query, const char *data, const size_t size)
Allocate and parse a DNS TXT record.
const char * regexp
The regular expression from the NAPTR record.
void * user_data
User-specific data.
struct ast_sched_context * ast_dns_get_sched(void)
Retrieve the DNS scheduler context.
struct ast_dns_query * dns_query_alloc(const char *name, int rr_type, int rr_class, ast_dns_resolve_callback callback, void *data)
Allocate a DNS query (but do not start resolution)
struct ast_dns_query_active * active
Current active query.
A set of macros to manage forward-linked lists.
#define AST_VECTOR(name, type)
Define a vector structure.
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
char data[0]
The raw DNS record.
const char * service
The service from the NAPTR record.
The result of a DNS query.
void * user_data
User-specific data.
unsigned int cancelled
The recurring query has been cancelled.
size_t data_len
The size of the raw DNS record.
struct ast_dns_result * result
Result of the DNS query.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
DNS resolver implementation.
ast_dns_resolve_callback callback
Callback to invoke upon completion.
A DNS query set query, which includes its state.
unsigned short weight
The weight of the SRV record.
unsigned short preference
The preference of the NAPTR record.
static struct queries queries
int queries_completed
The total number of completed queries.
unsigned int bogus
Whether the result is bogus.
Vector container support.
struct ast_dns_resolver * resolver
The resolver in use for this query.
size_t count
The number of character strings in the TXT record.
const char * host
The hostname in the SRV record.
int in_progress
Whether the query set is in progress or not.
struct ast_dns_record * dns_naptr_alloc(struct ast_dns_query *query, const char *data, const size_t size)
Allocate and parse a DNS NAPTR record.
int queries_cancelled
The total number of cancelled queries.
unsigned int started
Whether the query started successfully or not.
ast_dns_query_set_callback callback
Callback to invoke upon completion.
void * resolver_data
Resolver-specific data.
unsigned int weight_sum
The running weight sum.
char * dns_find_record(const char *record, size_t record_size, const char *response, size_t response_size)
Find the location of a DNS record within the entire DNS answer.
size_t answer_size
The size of the raw DNS answer.
int ttl
Time-to-live of the record.
const char * answer
The raw DNS answer.
struct ast_dns_query * query
The query itself.
int rr_type
Resource record type.
void(* ast_dns_query_set_callback)(const struct ast_dns_query_set *query_set)
Callback invoked when a query set completes.
int rr_type
Resource record type.
unsigned short order
The order for the NAPTR record.
unsigned short priority
The priority of the SRV record.
int rr_class
Resource record class.
int timer
Scheduled timer for next resolution.