gskdnslocalresolver

gskdnslocalresolver — a DNS resolver which uses just a local resource-record cache.

Synopsis




            GskDnsLocalResolverClass;
            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);

Object Hierarchy


  GObject
   +----GskDnsLocalResolver

Properties


  "resource-cache"       GskDnsRRCache         : Read / Write

Description

A DNS resolver which uses nothing more than a GskDnsRRCache. This can be used to provide a backend for a server.

Details

GskDnsLocalResolverClass

typedef struct _GskDnsLocalResolverClass GskDnsLocalResolverClass;

Class for local DNS resolvers.


GskDnsLocalResolver

typedef struct _GskDnsLocalResolver GskDnsLocalResolver;

Instance for local DNS resolvers.


gsk_dns_local_resolver_new ()

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.

enum GskDnsLocalResult

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.

gsk_dns_local_resolver_answer ()

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.

Property Details

The "resource-cache" property

  "resource-cache"       GskDnsRRCache         : Read / Write

cache of resource data used to answer queries.