1 #ifndef __DNS_PRIVATE_H__
2 #define __DNS_PRIVATE_H__
8 #define MDNS_HANDLE_NAME "*MDNS*"
10 #define DNS_FLAG_DEBUG 0x00000001
11 #define DNS_FLAG_CHECK_RESOLVER_DIR 0x00000002
12 #define DNS_FLAG_HAVE_IPV6_SERVER 0x00000004
13 #define DNS_FLAG_OK_TO_SKIP_AAAA 0x00000008
14 #define DNS_FLAG_DEFAULT_RESOLVER 0x00000010
15 #define DNS_FLAG_FORWARD_TO_MDNSRESPONDER 0x00000020
22 uint32_t search_count
;
26 uint32_t total_timeout
;
27 uint32_t send_timeout
;
28 uint32_t search_order
;
30 void *reserved_pointer1
;
35 pdns_handle_t
*pdns_primary
;
36 uint32_t client_count
;
37 pdns_handle_t
**client
;
40 uint32_t stat_latency
;
42 int notify_sys_config_token
;
44 int notify_delay_token
;
47 void *reserved_pointer1
;
50 typedef struct __dns_handle_private_struct
59 void *reserved_pointer1
;
60 void *reserved_pointer2
;
61 } dns_private_handle_t
;
67 * Returns the number of nameserver addresses available to the input
68 * DNS client. Returns zero if the input handle is a "Super" DNS handle.
70 extern uint32_t dns_server_list_count(dns_handle_t d
);
73 * Returns the nameserver address at the given index. Returns NULL
74 * if the index is out of range. Caller should free the returned sockaddr.
76 extern struct sockaddr
*dns_server_list_address(dns_handle_t d
, uint32_t i
);
79 * Returns a list of all server addresses for all clients.
80 * Caller must free each list entry, and the returned list.
82 extern void dns_all_server_addrs(dns_handle_t d
, struct sockaddr
***addrs
, uint32_t *count
);
85 * Returns the number of names in the search list.
87 uint32_t dns_search_list_count(dns_handle_t d
);
91 #endif /* __DNS_PRIVATE_H__ */