mirror of
https://github.com/miekg/dns.git
synced 2025-10-14 19:31:01 +02:00
unknown dns as type
This commit is contained in:
parent
1743555d07
commit
f082cd36ca
3
Makefile
3
Makefile
@ -18,7 +18,8 @@ GOFILES=\
|
|||||||
nsec3.go\
|
nsec3.go\
|
||||||
resolver.go\
|
resolver.go\
|
||||||
config.go\
|
config.go\
|
||||||
server.go
|
rfc3597.go\
|
||||||
|
server.go \
|
||||||
# y.go\
|
# y.go\
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.pkg
|
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
|
* Test impl of nameserver, with a small zone, 1 KSK and online signing
|
||||||
* NSEC and nsec3 closest encloser helper functions
|
* NSEC and nsec3 closest encloser helper functions
|
||||||
* Tsig generation for replies (request MAC)
|
* Tsig generation for replies (request MAC)
|
||||||
|
* unknown records
|
||||||
* pack/Unpack smaller. EDNS 'n stuff can be folded in
|
* pack/Unpack smaller. EDNS 'n stuff can be folded in
|
||||||
|
|
||||||
Longer term:
|
Longer term:
|
||||||
|
13
rfc3597.go
Normal file
13
rfc3597.go
Normal file
@ -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)
|
" " + strings.ToUpper(rr.Digest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type RR_TALINK struct {
|
type RR_TALINK struct {
|
||||||
Hdr RR_Header
|
Hdr RR_Header
|
||||||
PreviousName string "domain"
|
PreviousName string "domain"
|
||||||
@ -673,6 +672,22 @@ func (rr *RR_TKEY) String() string {
|
|||||||
return ""
|
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.
|
// Translate the RRSIG's incep. and expir. time to the correct date.
|
||||||
// Taking into account serial arithmetic (RFC 1982)
|
// Taking into account serial arithmetic (RFC 1982)
|
||||||
func timeToDate(t uint32) string {
|
func timeToDate(t uint32) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user