Shuffle the dns constant to dns.go
This commit is contained in:
parent
5c6f9f613e
commit
e6dc03baeb
|
@ -96,6 +96,10 @@ Flags:
|
|||
if *nsid {
|
||||
opt.SetNsid("")
|
||||
}
|
||||
println("Setting ", *tcp, dns.MaxMsgSize-1)
|
||||
if *tcp {
|
||||
opt.SetUDPSize(dns.MaxMsgSize-1)
|
||||
}
|
||||
m.Extra = make([]dns.RR, 1)
|
||||
m.Extra[0] = opt
|
||||
}
|
||||
|
|
7
dns.go
7
dns.go
|
@ -19,8 +19,11 @@ import (
|
|||
"strconv"
|
||||
)
|
||||
|
||||
// For RFC1982 (Serial Arithmetic) calculations in 32 bits.
|
||||
const Year68 = 2 << (32 - 1)
|
||||
const (
|
||||
Year68 = 2 << (32 - 1) // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
|
||||
DefaultMsgSize = 4096 // A standard default for larger than 512 packets.
|
||||
MaxMsgSize = 65536 // Largest possible DNS packet.
|
||||
)
|
||||
|
||||
// Error represents a DNS error
|
||||
type Error struct {
|
||||
|
|
Loading…
Reference in New Issue