parent
32c1cd51a9
commit
0fda12a2bb
|
@ -24,7 +24,9 @@ func (dns *Msg) SetReply(request *Msg) *Msg {
|
||||||
return dns
|
return dns
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetQuestion creates a question message.
|
// SetQuestion creates a question message, it sets the Question
|
||||||
|
// section, generates an Id and sets the RecursionDesired (RD)
|
||||||
|
// bit to true.
|
||||||
func (dns *Msg) SetQuestion(z string, t uint16) *Msg {
|
func (dns *Msg) SetQuestion(z string, t uint16) *Msg {
|
||||||
dns.Id = Id()
|
dns.Id = Id()
|
||||||
dns.RecursionDesired = true
|
dns.RecursionDesired = true
|
||||||
|
@ -33,7 +35,9 @@ func (dns *Msg) SetQuestion(z string, t uint16) *Msg {
|
||||||
return dns
|
return dns
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetNotify creates a notify message.
|
// SetNotify creates a notify message, it sets the Question
|
||||||
|
// section, generates an Id and sets the Authoritative (AA)
|
||||||
|
// bit to true.
|
||||||
func (dns *Msg) SetNotify(z string) *Msg {
|
func (dns *Msg) SetNotify(z string) *Msg {
|
||||||
dns.Opcode = OpcodeNotify
|
dns.Opcode = OpcodeNotify
|
||||||
dns.Authoritative = true
|
dns.Authoritative = true
|
||||||
|
|
Loading…
Reference in New Issue