GSK Reference Manual | ||||
---|---|---|---|---|
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);
"packet-queue" GskPacketQueue : Read / Write / Construct Only "resolver" GskDnsResolver : Read / Write / Construct Only
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.
typedef struct _GskDnsServer GskDnsServer;
Base instance for DNS servers. A DNS server is packet-based and must handle an arbitrary number of requests.
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. |
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. |
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. |
packet-queue
" property"packet-queue" GskPacketQueue : Read / Write / Construct Only
raw i/o handle to use for requests/responses.
resolver
" property"resolver" GskDnsResolver : Read / Write / Construct Only
DNS resolver to obtain responses from.