diff --git a/README.markdown b/README.markdown index d9192e1f..27b2b1e3 100644 --- a/README.markdown +++ b/README.markdown @@ -86,6 +86,7 @@ also be build with: `go build`. * 5702 - SHA2 in the DNS * 5936 - AXFR * 6605 - ECDSA +* 6742 - ILNP DNS * xxxx - URI record (draft) * xxxx - EDNS0 DNS Update Lease (draft) diff --git a/msg.go b/msg.go index 230d64ea..4c2b11c9 100644 --- a/msg.go +++ b/msg.go @@ -124,6 +124,10 @@ var Rr_str = map[uint16]string{ TypeNSEC3PARAM: "NSEC3PARAM", TypeTALINK: "TALINK", TypeSPF: "SPF", + TypeNID: "NID", + TypeL32 "L32", + TypeL64 "L64", + TypeLP "LP", TypeTKEY: "TKEY", // Meta RR TypeTSIG: "TSIG", // Meta RR TypeAXFR: "AXFR", // Meta RR diff --git a/types.go b/types.go index 22db773b..5f4ca42e 100644 --- a/types.go +++ b/types.go @@ -62,6 +62,10 @@ const ( TypeHIP uint16 = 55 TypeTALINK uint16 = 58 TypeSPF uint16 = 99 + TypeNID uint16 = 104 + TypeL32 uint16 = 105 + TypeL64 uint16 = 106 + TypeLP uint16 = 107 TypeTKEY uint16 = 249 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} } +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 // string representation used when printing the record. // 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) }, TypeTLSA: func() RR { return new(RR_TLSA) }, 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) }, }