From 1a1a2ad3e82589d25d813d92936eb0403c68d62a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 18 Apr 2000 08:30:24 +0000 Subject: [PATCH] add dns_resolver_dispatchv4(), dns_resolver_dispatchv6() and dns_resolver_socketmgr(). --- lib/dns/include/dns/resolver.h | 4 ++++ lib/dns/resolver.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h index e0aab783ba..b39887fe42 100644 --- a/lib/dns/include/dns/resolver.h +++ b/lib/dns/include/dns/resolver.h @@ -85,6 +85,7 @@ typedef struct dns_fetchevent { #define DNS_FETCHOPT_UNSHARED 0x02 /* See below. */ #define DNS_FETCHOPT_RECURSIVE 0x04 /* Set RD? */ #define DNS_FETCHOPT_NOEDNS0 0x08 /* Do not use EDNS. */ +#define DNS_FETCHOPT_FORWARDONLY 0x10 /* only use forwarders */ /* * XXXRTH Should this API be made semi-private? (I.e. @@ -342,6 +343,9 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp); * *fetchp == NULL. */ +dns_dispatch_t * dns_resolver_dispatchv4(dns_resolver_t *resolver); +dns_dispatch_t * dns_resolver_dispatchv6(dns_resolver_t *resolver); +isc_socketmgr_t * dns_resolver_socketmgr(dns_resolver_t *resolver); ISC_LANG_ENDDECLS #endif /* DNS_RESOLVER_H */ diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index d977db8a94..ab57464341 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -4513,3 +4513,21 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) { if (bucket_empty) empty_bucket(res); } + +dns_dispatch_t * +dns_resolver_dispatchv4(dns_resolver_t *resolver) { + REQUIRE(VALID_RESOLVER(resolver)); + return (resolver->dispatchv4); +} + +dns_dispatch_t * +dns_resolver_dispatchv6(dns_resolver_t *resolver) { + REQUIRE(VALID_RESOLVER(resolver)); + return (resolver->dispatchv6); +} + +isc_socketmgr_t * +dns_resolver_socketmgr(dns_resolver_t *resolver) { + REQUIRE(VALID_RESOLVER(resolver)); + return (resolver->socketmgr); +}