Add even more rcodes

This commit is contained in:
Miek Gieben 2011-01-03 10:44:00 +01:00
parent b052387f0d
commit d4059485d5
3 changed files with 12 additions and 1 deletions

3
dns.go
View File

@ -29,11 +29,12 @@ import (
const Year68 = 2 << (32 - 1)
//&DNSError{Error: "name too long", Name: name}
type DNSError struct {
Error string
Name string
Server string
IsTimeout bool
}
func (e *DNSError) String() string {

5
msg.go
View File

@ -120,6 +120,11 @@ var rcode_str = map[int]string{
RcodeNameError: "NXDOMAIN",
RcodeNotImplemented: "NOTIMPL",
RcodeRefused: "REFUSED",
RcodeYXDomain: "YXDOMAIN", // From RFC 2136
RcodeYXRrset: "YXRRSET",
RcodeNXRrset: "NXRRSET",
RcodeNotAuth: "NOTAUTH",
RcodeNotZone: "NOTZONE",
}
// Pack a domain name s into msg[off:].

View File

@ -82,6 +82,11 @@ const (
RcodeNameError = 3
RcodeNotImplemented = 4
RcodeRefused = 5
RcodeYXDomain = 6
RcodeYXRrset = 7
RcodeNXRrset = 8
RcodeNotAuth = 9
RcodeNotZone = 10
// Tsig errors
TsigBadSig = 16
TsigBadKey = 17