unknown dns as type
This commit is contained in:
parent
1743555d07
commit
f082cd36ca
3
Makefile
3
Makefile
|
@ -18,7 +18,8 @@ GOFILES=\
|
|||
nsec3.go\
|
||||
resolver.go\
|
||||
config.go\
|
||||
server.go
|
||||
rfc3597.go\
|
||||
server.go \
|
||||
# y.go\
|
||||
|
||||
include $(GOROOT)/src/Make.pkg
|
||||
|
|
1
TODO
1
TODO
|
@ -6,6 +6,7 @@ Todo:
|
|||
* Test impl of nameserver, with a small zone, 1 KSK and online signing
|
||||
* NSEC and nsec3 closest encloser helper functions
|
||||
* Tsig generation for replies (request MAC)
|
||||
* unknown records
|
||||
* pack/Unpack smaller. EDNS 'n stuff can be folded in
|
||||
|
||||
Longer term:
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package dns
|
||||
|
||||
// Unknown Resource Records
|
||||
|
||||
import "strconv"
|
||||
|
||||
func unknownClass(class int) string {
|
||||
return "CLASS" + strconv.Itoa(class)
|
||||
}
|
||||
|
||||
func unknownType(t int) string {
|
||||
return "TYPE" + strconv.Itoa(t)
|
||||
}
|
17
types.go
17
types.go
|
@ -533,7 +533,6 @@ func (rr *RR_TA) String() string {
|
|||
" " + strings.ToUpper(rr.Digest)
|
||||
}
|
||||
|
||||
|
||||
type RR_TALINK struct {
|
||||
Hdr RR_Header
|
||||
PreviousName string "domain"
|
||||
|
@ -673,6 +672,22 @@ func (rr *RR_TKEY) String() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
// Unknown RR representation
|
||||
type RR_RFC3597 struct {
|
||||
Hdr RR_Header
|
||||
Rdata string "hex"
|
||||
}
|
||||
|
||||
func (rr *RR_RFC3597) Header() *RR_Header {
|
||||
return &rr.Hdr
|
||||
}
|
||||
|
||||
func (rr *RR_RFC3597) String() string {
|
||||
s := rr.Hdr.String()
|
||||
s += "\\# " + strconv.Itoa(len(rr.Rdata)/2) + " " + rr.Rdata
|
||||
return s
|
||||
}
|
||||
|
||||
// Translate the RRSIG's incep. and expir. time to the correct date.
|
||||
// Taking into account serial arithmetic (RFC 1982)
|
||||
func timeToDate(t uint32) string {
|
||||
|
|
Loading…
Reference in New Issue