gskdnsserver

gskdnsserver — base class for a DNS server.

Synopsis




            GskDnsServerClass;
            GskDnsServer;
GskDnsServer* gsk_dns_server_new            (GskDnsResolver *resolver,
                                             GskPacketQueue *packet_queue);
GskDnsResolver* gsk_dns_server_peek_resolver
                                            (GskDnsServer *server);
void        gsk_dns_server_set_resolver     (GskDnsServer *server,
                                             GskDnsResolver *resolver);

Object Hierarchy


  GObject
   +----GskDnsServer

Properties


  "packet-queue"         GskPacketQueue        : Read / Write / Construct Only
  "resolver"             GskDnsResolver        : Read / Write / Construct Only

Description

A generic DNS server. This can be made to answer questions through a sensible resolver, or it can be used to implement wacky DNS hacks.

Details

GskDnsServerClass

typedef struct _GskDnsServerClass GskDnsServerClass;

Base class for DNS servers.


GskDnsServer

typedef struct _GskDnsServer GskDnsServer;

Base instance for DNS servers. A DNS server is packet-based and must handle an arbitrary number of requests.


gsk_dns_server_new ()

GskDnsServer* gsk_dns_server_new            (GskDnsResolver *resolver,
                                             GskPacketQueue *packet_queue);

Allocate a DNS server using the optional resolver to answer questions.

resolver : the resolver to query for answers to incoming questions.
packet_queue : transport for incoming DNS requests and outgoing responses.
Returns : the newly allocated DNS server.

gsk_dns_server_peek_resolver ()

GskDnsResolver* gsk_dns_server_peek_resolver
                                            (GskDnsServer *server);

Obtain a peeked reference at the resolver which this server is using to answer questions.

server : the server to inspect.
Returns : a GskDnsResolver if one is being used, or NULL.

gsk_dns_server_set_resolver ()

void        gsk_dns_server_set_resolver     (GskDnsServer *server,
                                             GskDnsResolver *resolver);

Set the DNS server's resolver.

server : the server to affect.
resolver : the DNS resolver to use, or NULL to stop using any resolver.

Property Details

The "packet-queue" property

  "packet-queue"         GskPacketQueue        : Read / Write / Construct Only

raw i/o handle to use for requests/responses.


The "resolver" property

  "resolver"             GskDnsResolver        : Read / Write / Construct Only

DNS resolver to obtain responses from.