Add the NID record
This commit is contained in:
parent
bf85adb03e
commit
0c3a90193a
|
@ -86,6 +86,7 @@ also be build with: `go build`.
|
||||||
* 5702 - SHA2 in the DNS
|
* 5702 - SHA2 in the DNS
|
||||||
* 5936 - AXFR
|
* 5936 - AXFR
|
||||||
* 6605 - ECDSA
|
* 6605 - ECDSA
|
||||||
|
* 6742 - ILNP DNS
|
||||||
* xxxx - URI record (draft)
|
* xxxx - URI record (draft)
|
||||||
* xxxx - EDNS0 DNS Update Lease (draft)
|
* xxxx - EDNS0 DNS Update Lease (draft)
|
||||||
|
|
||||||
|
|
4
msg.go
4
msg.go
|
@ -124,6 +124,10 @@ var Rr_str = map[uint16]string{
|
||||||
TypeNSEC3PARAM: "NSEC3PARAM",
|
TypeNSEC3PARAM: "NSEC3PARAM",
|
||||||
TypeTALINK: "TALINK",
|
TypeTALINK: "TALINK",
|
||||||
TypeSPF: "SPF",
|
TypeSPF: "SPF",
|
||||||
|
TypeNID: "NID",
|
||||||
|
TypeL32 "L32",
|
||||||
|
TypeL64 "L64",
|
||||||
|
TypeLP "LP",
|
||||||
TypeTKEY: "TKEY", // Meta RR
|
TypeTKEY: "TKEY", // Meta RR
|
||||||
TypeTSIG: "TSIG", // Meta RR
|
TypeTSIG: "TSIG", // Meta RR
|
||||||
TypeAXFR: "AXFR", // Meta RR
|
TypeAXFR: "AXFR", // Meta RR
|
||||||
|
|
32
types.go
32
types.go
|
@ -62,6 +62,10 @@ const (
|
||||||
TypeHIP uint16 = 55
|
TypeHIP uint16 = 55
|
||||||
TypeTALINK uint16 = 58
|
TypeTALINK uint16 = 58
|
||||||
TypeSPF uint16 = 99
|
TypeSPF uint16 = 99
|
||||||
|
TypeNID uint16 = 104
|
||||||
|
TypeL32 uint16 = 105
|
||||||
|
TypeL64 uint16 = 106
|
||||||
|
TypeLP uint16 = 107
|
||||||
|
|
||||||
TypeTKEY uint16 = 249
|
TypeTKEY uint16 = 249
|
||||||
TypeTSIG uint16 = 250
|
TypeTSIG uint16 = 250
|
||||||
|
@ -1371,6 +1375,30 @@ func (rr *RR_WKS) Copy() RR {
|
||||||
return &RR_WKS{*rr.Hdr.CopyHeader(), rr.Address, rr.Protocol, rr.BitMap}
|
return &RR_WKS{*rr.Hdr.CopyHeader(), rr.Address, rr.Protocol, rr.BitMap}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RR_NID struct {
|
||||||
|
Hdr RR_Header
|
||||||
|
Preference uint16
|
||||||
|
NodeID uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rr *RR_NID) Header() *RR_Header {
|
||||||
|
return &rr.Hdr
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rr *RR_NID) String() string {
|
||||||
|
s := rr.Hdr.String() + strconv.Itoa(int(rr.Preference))
|
||||||
|
return s
|
||||||
|
// TODO(mg): hexadecimal
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rr *RR_NID) Len() int {
|
||||||
|
return rr.Hdr.Len() + 2 + 8
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rr *RR_NID) Copy() RR {
|
||||||
|
return &RR_NID{*rr.Hdr.CopyHeader(), rr.Preference, rr.NodeID}
|
||||||
|
}
|
||||||
|
|
||||||
// TimeToString translates the RRSIG's incep. and expir. times to the
|
// TimeToString translates the RRSIG's incep. and expir. times to the
|
||||||
// string representation used when printing the record.
|
// string representation used when printing the record.
|
||||||
// It takes serial arithmetic (RFC 1982) into account.
|
// It takes serial arithmetic (RFC 1982) into account.
|
||||||
|
@ -1469,4 +1497,8 @@ var rr_mk = map[uint16]func() RR{
|
||||||
TypeDLV: func() RR { return new(RR_DLV) },
|
TypeDLV: func() RR { return new(RR_DLV) },
|
||||||
TypeTLSA: func() RR { return new(RR_TLSA) },
|
TypeTLSA: func() RR { return new(RR_TLSA) },
|
||||||
TypeHIP: func() RR { return new(RR_HIP) },
|
TypeHIP: func() RR { return new(RR_HIP) },
|
||||||
|
TypeNID: func() RR { return new(RR_NID) },
|
||||||
|
TypeL32: func() RR { return new(RR_L32) },
|
||||||
|
TypeL64: func() RR { return new(RR_L64) },
|
||||||
|
TypeLP: func() RR { return new(RR_LP) },
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue