19#ifndef __PJLIB_UTIL_RESOLVER_H__
20#define __PJLIB_UTIL_RESOLVER_H__
Low level DNS message parsing and packetization.
#define PJ_DNS_MAX_IP_IN_A_REC
Definition: config.h:43
struct pj_ioqueue_t pj_ioqueue_t
unsigned short pj_uint16_t
struct pj_timer_heap_t pj_timer_heap_t
pj_status_t pj_dns_parse_addr_response(const pj_dns_parsed_packet *pkt, pj_dns_addr_record *rec)
pj_status_t pj_dns_resolver_destroy(pj_dns_resolver *resolver, pj_bool_t notify)
void pj_dns_resolver_dump(pj_dns_resolver *resolver, pj_bool_t detail)
pj_status_t pj_dns_resolver_start_query(pj_dns_resolver *resolver, const pj_str_t *name, int type, unsigned options, pj_dns_callback *cb, void *user_data, pj_dns_async_query **p_query)
pj_status_t pj_dns_resolver_set_ns(pj_dns_resolver *resolver, unsigned count, const pj_str_t servers[], const pj_uint16_t ports[])
void pj_dns_settings_default(pj_dns_settings *s)
struct pj_dns_resolver pj_dns_resolver
Definition: resolver.h:164
pj_status_t pj_dns_resolver_add_entry(pj_dns_resolver *resolver, const pj_dns_parsed_packet *pkt, pj_bool_t set_ttl)
void pj_dns_resolver_handle_events(pj_dns_resolver *resolver, const pj_time_val *timeout)
pj_status_t pj_dns_resolver_get_settings(pj_dns_resolver *resolver, pj_dns_settings *st)
pj_status_t pj_dns_resolver_create(pj_pool_factory *pf, const char *name, unsigned options, pj_timer_heap_t *timer, pj_ioqueue_t *ioqueue, pj_dns_resolver **p_resolver)
pj_status_t pj_dns_resolver_set_settings(pj_dns_resolver *resolver, const pj_dns_settings *st)
pj_status_t pj_dns_parse_a_response(const pj_dns_parsed_packet *pkt, pj_dns_a_record *rec)
unsigned pj_dns_resolver_get_cached_count(pj_dns_resolver *resolver)
pj_status_t pj_dns_resolver_cancel_query(pj_dns_async_query *query, pj_bool_t notify)
struct pj_dns_async_query pj_dns_async_query
Definition: resolver.h:169
void pj_dns_callback(void *user_data, pj_status_t status, pj_dns_parsed_packet *response)
Definition: resolver.h:181
struct in_addr pj_in_addr
struct in6_addr pj_in6_addr
Definition: resolver.h:206
unsigned addr_count
Definition: resolver.h:216
pj_in_addr addr[PJ_DNS_MAX_IP_IN_A_REC]
Definition: resolver.h:219
char buf_[128]
Definition: resolver.h:222
pj_str_t alias
Definition: resolver.h:213
pj_str_t name
Definition: resolver.h:208
Definition: resolver.h:233
pj_in_addr v4
Definition: resolver.h:254
char buf_[128]
Definition: resolver.h:263
union pj_dns_addr_record::@2::@3 ip
struct pj_dns_addr_record::@2 addr[PJ_DNS_MAX_IP_IN_A_REC]
pj_str_t name
Definition: resolver.h:235
pj_str_t alias
Definition: resolver.h:240
pj_in6_addr v6
Definition: resolver.h:257
int af
Definition: resolver.h:249
unsigned addr_count
Definition: resolver.h:243
Definition: resolver.h:190
unsigned good_ns_ttl
Definition: resolver.h:196
unsigned qretr_count
Definition: resolver.h:193
unsigned qretr_delay
Definition: resolver.h:192
unsigned bad_ns_ttl
Definition: resolver.h:197
unsigned options
Definition: resolver.h:191
unsigned cache_max_ttl
Definition: resolver.h:194