| GSK Reference Manual |
|---|
struct GskDnsLocalResolverClass; struct GskDnsLocalResolver; GskDnsResolver* gsk_dns_local_resolver_new (GskDnsRRCache *rr_cache); enum GskDnsLocalResult; GskDnsLocalResult gsk_dns_local_resolver_answer (GskDnsRRCache *rr_cache, GskDnsQuestion *question, GskDnsMessage *results);
A DNS resolver which uses nothing more than a GskDnsRRCache. This can be used to provide a backend for a server.
GskDnsResolver* gsk_dns_local_resolver_new (GskDnsRRCache *rr_cache);
Create a new local resolver based on an optional resource-record cache.
| rr_cache : | resource-record cache to use. |
| Returns : | the newly allocated resolver. |
typedef enum
{
GSK_DNS_LOCAL_NO_DATA,
GSK_DNS_LOCAL_PARTIAL_DATA,
GSK_DNS_LOCAL_NEGATIVE,
GSK_DNS_LOCAL_SUCCESS
} GskDnsLocalResult;Possible results from a local DNS query.
| GSK_DNS_LOCAL_NO_DATA | No relevant data was found. |
| GSK_DNS_LOCAL_PARTIAL_DATA | Some data was found, but not a complete answer. |
| GSK_DNS_LOCAL_NEGATIVE | A definite negative answer was found. |
| GSK_DNS_LOCAL_SUCCESS | All requested data was found successfully. |
GskDnsLocalResult gsk_dns_local_resolver_answer (GskDnsRRCache *rr_cache, GskDnsQuestion *question, GskDnsMessage *results);
Attempt to compute an answer to a DNS question, using only information locally available in the resource-record cache.
| rr_cache : | resource-record cache to use to derive the answer to the question. |
| question : | question to answer. |
| results : | message to store results in. |
| Returns : | the result of the query. |
| "resource-cache" (GskDnsRRCache : Read / Write) | cache of resource data used to answer queries. |
| <<< gskdnsclient | gskdnsresolver >>> |