Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitSearch ¶
Types ¶
type Writer ¶
type Writer struct { dns.ResponseWriter Rcode int // contains filtered or unexported fields }
Writer implements a ResponseWriter that also does the following:
- reverts question section of a packet to its original state. This is done to avoid the 'Question section mismatch:' error in client.
- Defers write to the client if the response code is NXDOMAIN. This is needed to enable further search path probing if a search was not successful.
- Allow forced write to client regardless of response code. This is needed to write the packet to the client if the final search in the path fails to produce results.
- Overwrites response code with Writer.Rcode if the response code is NXDOMAIN (NameError). This is needed to support the AutoPath.OnNXDOMAIN function, which returns a NOERROR to client instead of NXDOMAIN if the final search in the path fails to produce results.
func NewWriter ¶
func NewWriter(w dns.ResponseWriter, r *dns.Msg) *Writer
NewWriter returns a pointer to a new Writer
Click to show internal directories.
Click to hide internal directories.