Legend:
Library
Module
Module type
Parameter
Class
Class type
The main purpose of this module is to provide an implementation of a standard DNS server based on Dns.Query and Dns.Loader.
For a basic DNS server, call process_of_zonebuf, pass the result to processor_of_process, and then invoke the resulting processor function for each received packet.
This module also provides a way to override the parsing and marshaling of DNS packets to allow extensions of DNS to be implemented, such as DNSCurve.
A type of function that takes an abstract request plus source and destination endpoint addresses, and asynchronously produces an answer to the request, or None if no answer is possible. For most applications the type 'a will be Dns.Packet.t, but may be different if a custom parsing/marshalling layer is required.
val processor_of_process : Dns.Packet.t process->Dns.Packet.t processor
Returns a packet processor module by combining Dns.Protocol.Server with the specified packet processing function.
val process_of_zonebufs : string list->Dns.Packet.t process
Given a list of DNS zone files as strings, parses them using Dns.Loader and returns a processing function that answers requests through the use of Dns.Query.
val process_of_zonebuf : string ->Dns.Packet.t process
This is a convenience function that is equivalent to calling process_of_zonebufs with a list containing a single zone file string.