1 #ifndef __DNS_PRIVATE_H__
2 #define __DNS_PRIVATE_H__
6 #define DNS_FLAG_DEBUG 0x00000001
7 #define DNS_FLAG_CHECK_RESOLVER_DIR 0x00000002
8 #define DNS_FLAG_HAVE_IPV6_SERVER 0x00000004
9 #define DNS_FLAG_OK_TO_SKIP_AAAA 0x00000008
10 #define DNS_FLAG_DEFAULT_RESOLVER 0x00000010
11 #define DNS_FLAG_FORWARD_TO_MDNSRESPONDER 0x00000020
18 uint32_t search_count
;
22 uint32_t total_timeout
;
23 uint32_t send_timeout
;
24 uint32_t search_order
;
26 void *reserved_pointer1
;
31 pdns_handle_t
*pdns_primary
;
32 uint32_t client_count
;
33 pdns_handle_t
**client
;
36 uint32_t stat_latency
;
38 int notify_sys_config_token
;
40 int notify_delay_token
;
43 void *reserved_pointer1
;
46 typedef struct __dns_handle_private_struct
55 void *reserved_pointer1
;
56 void *reserved_pointer2
;
57 } dns_private_handle_t
;
63 * Returns the number of nameserver addresses available to the input
64 * DNS client. Returns zero if the input handle is a "Super" DNS handle.
66 extern uint32_t dns_server_list_count(dns_handle_t d
);
69 * Returns the nameserver address at the given index. Returns NULL
70 * if the index is out of range. Caller should free the returned sockaddr.
72 extern struct sockaddr
*dns_server_list_address(dns_handle_t d
, uint32_t i
);
75 * Returns a list of all server addresses for all clients.
76 * Caller must free each list entry, and the returned list.
78 extern void dns_all_server_addrs(dns_handle_t d
, struct sockaddr
***addrs
, uint32_t *count
);
81 * Returns the number of names in the search list.
83 uint32_t dns_search_list_count(dns_handle_t d
);
87 #endif /* __DNS_PRIVATE_H__ */