Documentation
¶
Overview ¶
Package dnsmsg contains common constants, functions, and types for inspecting and constructing DNS messages.
Index ¶
- type DefaultMessageConstructor
- func (DefaultMessageConstructor) NewMsgNODATA(req *dns.Msg) (resp *dns.Msg)
- func (DefaultMessageConstructor) NewMsgNOTIMPLEMENTED(req *dns.Msg) (resp *dns.Msg)
- func (DefaultMessageConstructor) NewMsgNXDOMAIN(req *dns.Msg) (resp *dns.Msg)
- func (DefaultMessageConstructor) NewMsgSERVFAIL(req *dns.Msg) (resp *dns.Msg)
- type MessageConstructor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultMessageConstructor ¶
type DefaultMessageConstructor struct{}
DefaultMessageConstructor is a default implementation of MessageConstructor.
func (DefaultMessageConstructor) NewMsgNODATA ¶
func (DefaultMessageConstructor) NewMsgNODATA(req *dns.Msg) (resp *dns.Msg)
NewMsgNODATA implements the MessageConstructor interface for DefaultMessageConstructor.
func (DefaultMessageConstructor) NewMsgNOTIMPLEMENTED ¶
func (DefaultMessageConstructor) NewMsgNOTIMPLEMENTED(req *dns.Msg) (resp *dns.Msg)
NewMsgNOTIMPLEMENTED implements the MessageConstructor interface for DefaultMessageConstructor.
func (DefaultMessageConstructor) NewMsgNXDOMAIN ¶
func (DefaultMessageConstructor) NewMsgNXDOMAIN(req *dns.Msg) (resp *dns.Msg)
NewMsgNXDOMAIN implements the MessageConstructor interface for DefaultMessageConstructor.
func (DefaultMessageConstructor) NewMsgSERVFAIL ¶
func (DefaultMessageConstructor) NewMsgSERVFAIL(req *dns.Msg) (resp *dns.Msg)
NewMsgSERVFAIL implements the MessageConstructor interface for DefaultMessageConstructor.
type MessageConstructor ¶
type MessageConstructor interface {
// NewMsgNXDOMAIN creates a new response message replying to req with the
// NXDOMAIN code.
NewMsgNXDOMAIN(req *dns.Msg) (resp *dns.Msg)
// NewMsgSERVFAIL creates a new response message replying to req with the
// SERVFAIL code.
NewMsgSERVFAIL(req *dns.Msg) (resp *dns.Msg)
// NewMsgNOTIMPLEMENTED creates a new response message replying to req with
// the NOTIMPLEMENTED code.
NewMsgNOTIMPLEMENTED(req *dns.Msg) (resp *dns.Msg)
// NewMsgNODATA creates a new empty response message replying to req with
// the NOERROR code.
//
// See https://www.rfc-editor.org/rfc/rfc2308#section-2.2.
NewMsgNODATA(req *dns.Msg) (resp *dns.Msg)
}
MessageConstructor creates DNS messages.
Click to show internal directories.
Click to hide internal directories.