|
@@ -12,6 +12,7 @@ var TypeToRR = map[uint16]func() RR{
|
|
TypeA: func() RR { return new(A) },
|
|
TypeA: func() RR { return new(A) },
|
|
TypeAAAA: func() RR { return new(AAAA) },
|
|
TypeAAAA: func() RR { return new(AAAA) },
|
|
TypeAFSDB: func() RR { return new(AFSDB) },
|
|
TypeAFSDB: func() RR { return new(AFSDB) },
|
|
|
|
+ TypeAMTRELAY: func() RR { return new(AMTRELAY) },
|
|
TypeANY: func() RR { return new(ANY) },
|
|
TypeANY: func() RR { return new(ANY) },
|
|
TypeAPL: func() RR { return new(APL) },
|
|
TypeAPL: func() RR { return new(APL) },
|
|
TypeAVC: func() RR { return new(AVC) },
|
|
TypeAVC: func() RR { return new(AVC) },
|
|
@@ -34,6 +35,7 @@ var TypeToRR = map[uint16]func() RR{
|
|
TypeHINFO: func() RR { return new(HINFO) },
|
|
TypeHINFO: func() RR { return new(HINFO) },
|
|
TypeHIP: func() RR { return new(HIP) },
|
|
TypeHIP: func() RR { return new(HIP) },
|
|
TypeHTTPS: func() RR { return new(HTTPS) },
|
|
TypeHTTPS: func() RR { return new(HTTPS) },
|
|
|
|
+ TypeIPSECKEY: func() RR { return new(IPSECKEY) },
|
|
TypeKEY: func() RR { return new(KEY) },
|
|
TypeKEY: func() RR { return new(KEY) },
|
|
TypeKX: func() RR { return new(KX) },
|
|
TypeKX: func() RR { return new(KX) },
|
|
TypeL32: func() RR { return new(L32) },
|
|
TypeL32: func() RR { return new(L32) },
|
|
@@ -90,6 +92,7 @@ var TypeToString = map[uint16]string{
|
|
TypeA: "A",
|
|
TypeA: "A",
|
|
TypeAAAA: "AAAA",
|
|
TypeAAAA: "AAAA",
|
|
TypeAFSDB: "AFSDB",
|
|
TypeAFSDB: "AFSDB",
|
|
|
|
+ TypeAMTRELAY: "AMTRELAY",
|
|
TypeANY: "ANY",
|
|
TypeANY: "ANY",
|
|
TypeAPL: "APL",
|
|
TypeAPL: "APL",
|
|
TypeATMA: "ATMA",
|
|
TypeATMA: "ATMA",
|
|
@@ -114,6 +117,7 @@ var TypeToString = map[uint16]string{
|
|
TypeHINFO: "HINFO",
|
|
TypeHINFO: "HINFO",
|
|
TypeHIP: "HIP",
|
|
TypeHIP: "HIP",
|
|
TypeHTTPS: "HTTPS",
|
|
TypeHTTPS: "HTTPS",
|
|
|
|
+ TypeIPSECKEY: "IPSECKEY",
|
|
TypeISDN: "ISDN",
|
|
TypeISDN: "ISDN",
|
|
TypeIXFR: "IXFR",
|
|
TypeIXFR: "IXFR",
|
|
TypeKEY: "KEY",
|
|
TypeKEY: "KEY",
|
|
@@ -176,6 +180,7 @@ var TypeToString = map[uint16]string{
|
|
func (rr *A) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *A) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AAAA) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AAAA) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AFSDB) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AFSDB) Header() *RR_Header { return &rr.Hdr }
|
|
|
|
+func (rr *AMTRELAY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *ANY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *ANY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *APL) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *APL) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AVC) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *AVC) Header() *RR_Header { return &rr.Hdr }
|
|
@@ -198,6 +203,7 @@ func (rr *GPOS) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HINFO) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HINFO) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HIP) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HIP) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HTTPS) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *HTTPS) Header() *RR_Header { return &rr.Hdr }
|
|
|
|
+func (rr *IPSECKEY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *KEY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *KEY) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *KX) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *KX) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *L32) Header() *RR_Header { return &rr.Hdr }
|
|
func (rr *L32) Header() *RR_Header { return &rr.Hdr }
|
|
@@ -257,6 +263,7 @@ func (rr *A) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AAAA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *AAAA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
if len(rr.AAAA) != 0 {
|
|
if len(rr.AAAA) != 0 {
|
|
@@ -264,16 +271,34 @@ func (rr *AAAA) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AFSDB) len(off int, compression map[string]struct{}) int {
|
|
func (rr *AFSDB) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Subtype
|
|
l += 2 // Subtype
|
|
l += domainNameLen(rr.Hostname, off+l, compression, false)
|
|
l += domainNameLen(rr.Hostname, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func (rr *AMTRELAY) len(off int, compression map[string]struct{}) int {
|
|
|
|
+ l := rr.Hdr.len(off, compression)
|
|
|
|
+ l++ // Precedence
|
|
|
|
+ l++ // GatewayType
|
|
|
|
+ switch rr.GatewayType {
|
|
|
|
+ case AMTRELAYIPv4:
|
|
|
|
+ l += net.IPv4len
|
|
|
|
+ case AMTRELAYIPv6:
|
|
|
|
+ l += net.IPv6len
|
|
|
|
+ case AMTRELAYHost:
|
|
|
|
+ l += len(rr.GatewayHost) + 1
|
|
|
|
+ }
|
|
|
|
+ return l
|
|
|
|
+}
|
|
|
|
+
|
|
func (rr *ANY) len(off int, compression map[string]struct{}) int {
|
|
func (rr *ANY) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *APL) len(off int, compression map[string]struct{}) int {
|
|
func (rr *APL) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
for _, x := range rr.Prefixes {
|
|
for _, x := range rr.Prefixes {
|
|
@@ -281,6 +306,7 @@ func (rr *APL) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AVC) len(off int, compression map[string]struct{}) int {
|
|
func (rr *AVC) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
for _, x := range rr.Txt {
|
|
for _, x := range rr.Txt {
|
|
@@ -288,6 +314,7 @@ func (rr *AVC) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CAA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *CAA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Flag
|
|
l++ // Flag
|
|
@@ -295,6 +322,7 @@ func (rr *CAA) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Value)
|
|
l += len(rr.Value)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CERT) len(off int, compression map[string]struct{}) int {
|
|
func (rr *CERT) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Type
|
|
l += 2 // Type
|
|
@@ -303,21 +331,25 @@ func (rr *CERT) len(off int, compression map[string]struct{}) int {
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Certificate))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Certificate))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CNAME) len(off int, compression map[string]struct{}) int {
|
|
func (rr *CNAME) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Target, off+l, compression, true)
|
|
l += domainNameLen(rr.Target, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DHCID) len(off int, compression map[string]struct{}) int {
|
|
func (rr *DHCID) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Digest))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Digest))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DNAME) len(off int, compression map[string]struct{}) int {
|
|
func (rr *DNAME) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Target, off+l, compression, false)
|
|
l += domainNameLen(rr.Target, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DNSKEY) len(off int, compression map[string]struct{}) int {
|
|
func (rr *DNSKEY) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Flags
|
|
l += 2 // Flags
|
|
@@ -326,6 +358,7 @@ func (rr *DNSKEY) len(off int, compression map[string]struct{}) int {
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DS) len(off int, compression map[string]struct{}) int {
|
|
func (rr *DS) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // KeyTag
|
|
l += 2 // KeyTag
|
|
@@ -334,26 +367,31 @@ func (rr *DS) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Digest) / 2
|
|
l += len(rr.Digest) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EID) len(off int, compression map[string]struct{}) int {
|
|
func (rr *EID) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Endpoint) / 2
|
|
l += len(rr.Endpoint) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EUI48) len(off int, compression map[string]struct{}) int {
|
|
func (rr *EUI48) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 6 // Address
|
|
l += 6 // Address
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EUI64) len(off int, compression map[string]struct{}) int {
|
|
func (rr *EUI64) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 8 // Address
|
|
l += 8 // Address
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *GID) len(off int, compression map[string]struct{}) int {
|
|
func (rr *GID) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 4 // Gid
|
|
l += 4 // Gid
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *GPOS) len(off int, compression map[string]struct{}) int {
|
|
func (rr *GPOS) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Longitude) + 1
|
|
l += len(rr.Longitude) + 1
|
|
@@ -361,12 +399,14 @@ func (rr *GPOS) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Altitude) + 1
|
|
l += len(rr.Altitude) + 1
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *HINFO) len(off int, compression map[string]struct{}) int {
|
|
func (rr *HINFO) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Cpu) + 1
|
|
l += len(rr.Cpu) + 1
|
|
l += len(rr.Os) + 1
|
|
l += len(rr.Os) + 1
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *HIP) len(off int, compression map[string]struct{}) int {
|
|
func (rr *HIP) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // HitLength
|
|
l++ // HitLength
|
|
@@ -379,12 +419,31 @@ func (rr *HIP) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func (rr *IPSECKEY) len(off int, compression map[string]struct{}) int {
|
|
|
|
+ l := rr.Hdr.len(off, compression)
|
|
|
|
+ l++ // Precedence
|
|
|
|
+ l++ // GatewayType
|
|
|
|
+ l++ // Algorithm
|
|
|
|
+ switch rr.GatewayType {
|
|
|
|
+ case IPSECGatewayIPv4:
|
|
|
|
+ l += net.IPv4len
|
|
|
|
+ case IPSECGatewayIPv6:
|
|
|
|
+ l += net.IPv6len
|
|
|
|
+ case IPSECGatewayHost:
|
|
|
|
+ l += len(rr.GatewayHost) + 1
|
|
|
|
+ }
|
|
|
|
+ l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
|
|
+ return l
|
|
|
|
+}
|
|
|
|
+
|
|
func (rr *KX) len(off int, compression map[string]struct{}) int {
|
|
func (rr *KX) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += domainNameLen(rr.Exchanger, off+l, compression, false)
|
|
l += domainNameLen(rr.Exchanger, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *L32) len(off int, compression map[string]struct{}) int {
|
|
func (rr *L32) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
@@ -393,12 +452,14 @@ func (rr *L32) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *L64) len(off int, compression map[string]struct{}) int {
|
|
func (rr *L64) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += 8 // Locator64
|
|
l += 8 // Locator64
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *LOC) len(off int, compression map[string]struct{}) int {
|
|
func (rr *LOC) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Version
|
|
l++ // Version
|
|
@@ -410,49 +471,58 @@ func (rr *LOC) len(off int, compression map[string]struct{}) int {
|
|
l += 4 // Altitude
|
|
l += 4 // Altitude
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *LP) len(off int, compression map[string]struct{}) int {
|
|
func (rr *LP) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += domainNameLen(rr.Fqdn, off+l, compression, false)
|
|
l += domainNameLen(rr.Fqdn, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MB) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MB) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Mb, off+l, compression, true)
|
|
l += domainNameLen(rr.Mb, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MD) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MD) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Md, off+l, compression, true)
|
|
l += domainNameLen(rr.Md, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MF) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MF) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Mf, off+l, compression, true)
|
|
l += domainNameLen(rr.Mf, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MG) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MG) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Mg, off+l, compression, true)
|
|
l += domainNameLen(rr.Mg, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MINFO) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MINFO) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Rmail, off+l, compression, true)
|
|
l += domainNameLen(rr.Rmail, off+l, compression, true)
|
|
l += domainNameLen(rr.Email, off+l, compression, true)
|
|
l += domainNameLen(rr.Email, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MR) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MR) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Mr, off+l, compression, true)
|
|
l += domainNameLen(rr.Mr, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MX) len(off int, compression map[string]struct{}) int {
|
|
func (rr *MX) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += domainNameLen(rr.Mx, off+l, compression, true)
|
|
l += domainNameLen(rr.Mx, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NAPTR) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NAPTR) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Order
|
|
l += 2 // Order
|
|
@@ -463,17 +533,20 @@ func (rr *NAPTR) len(off int, compression map[string]struct{}) int {
|
|
l += domainNameLen(rr.Replacement, off+l, compression, false)
|
|
l += domainNameLen(rr.Replacement, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NID) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NID) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += 8 // NodeID
|
|
l += 8 // NodeID
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NIMLOC) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NIMLOC) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Locator) / 2
|
|
l += len(rr.Locator) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NINFO) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NINFO) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
for _, x := range rr.ZSData {
|
|
for _, x := range rr.ZSData {
|
|
@@ -481,16 +554,19 @@ func (rr *NINFO) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NS) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NS) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Ns, off+l, compression, true)
|
|
l += domainNameLen(rr.Ns, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSAPPTR) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NSAPPTR) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Ptr, off+l, compression, false)
|
|
l += domainNameLen(rr.Ptr, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSEC3PARAM) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NSEC3PARAM) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Hash
|
|
l++ // Hash
|
|
@@ -500,21 +576,25 @@ func (rr *NSEC3PARAM) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Salt) / 2
|
|
l += len(rr.Salt) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NULL) len(off int, compression map[string]struct{}) int {
|
|
func (rr *NULL) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Data)
|
|
l += len(rr.Data)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *OPENPGPKEY) len(off int, compression map[string]struct{}) int {
|
|
func (rr *OPENPGPKEY) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *PTR) len(off int, compression map[string]struct{}) int {
|
|
func (rr *PTR) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Ptr, off+l, compression, true)
|
|
l += domainNameLen(rr.Ptr, off+l, compression, true)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *PX) len(off int, compression map[string]struct{}) int {
|
|
func (rr *PX) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
@@ -522,11 +602,13 @@ func (rr *PX) len(off int, compression map[string]struct{}) int {
|
|
l += domainNameLen(rr.Mapx400, off+l, compression, false)
|
|
l += domainNameLen(rr.Mapx400, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RFC3597) len(off int, compression map[string]struct{}) int {
|
|
func (rr *RFC3597) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Rdata) / 2
|
|
l += len(rr.Rdata) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RKEY) len(off int, compression map[string]struct{}) int {
|
|
func (rr *RKEY) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Flags
|
|
l += 2 // Flags
|
|
@@ -535,12 +617,14 @@ func (rr *RKEY) len(off int, compression map[string]struct{}) int {
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RP) len(off int, compression map[string]struct{}) int {
|
|
func (rr *RP) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Mbox, off+l, compression, false)
|
|
l += domainNameLen(rr.Mbox, off+l, compression, false)
|
|
l += domainNameLen(rr.Txt, off+l, compression, false)
|
|
l += domainNameLen(rr.Txt, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RRSIG) len(off int, compression map[string]struct{}) int {
|
|
func (rr *RRSIG) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // TypeCovered
|
|
l += 2 // TypeCovered
|
|
@@ -554,12 +638,14 @@ func (rr *RRSIG) len(off int, compression map[string]struct{}) int {
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Signature))
|
|
l += base64.StdEncoding.DecodedLen(len(rr.Signature))
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RT) len(off int, compression map[string]struct{}) int {
|
|
func (rr *RT) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Preference
|
|
l += 2 // Preference
|
|
l += domainNameLen(rr.Host, off+l, compression, false)
|
|
l += domainNameLen(rr.Host, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SMIMEA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SMIMEA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Usage
|
|
l++ // Usage
|
|
@@ -568,6 +654,7 @@ func (rr *SMIMEA) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Certificate) / 2
|
|
l += len(rr.Certificate) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SOA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SOA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Ns, off+l, compression, true)
|
|
l += domainNameLen(rr.Ns, off+l, compression, true)
|
|
@@ -579,6 +666,7 @@ func (rr *SOA) len(off int, compression map[string]struct{}) int {
|
|
l += 4 // Minttl
|
|
l += 4 // Minttl
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SPF) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SPF) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
for _, x := range rr.Txt {
|
|
for _, x := range rr.Txt {
|
|
@@ -586,6 +674,7 @@ func (rr *SPF) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SRV) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SRV) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Priority
|
|
l += 2 // Priority
|
|
@@ -594,6 +683,7 @@ func (rr *SRV) len(off int, compression map[string]struct{}) int {
|
|
l += domainNameLen(rr.Target, off+l, compression, false)
|
|
l += domainNameLen(rr.Target, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SSHFP) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SSHFP) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Algorithm
|
|
l++ // Algorithm
|
|
@@ -601,6 +691,7 @@ func (rr *SSHFP) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.FingerPrint) / 2
|
|
l += len(rr.FingerPrint) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SVCB) len(off int, compression map[string]struct{}) int {
|
|
func (rr *SVCB) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Priority
|
|
l += 2 // Priority
|
|
@@ -610,6 +701,7 @@ func (rr *SVCB) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // KeyTag
|
|
l += 2 // KeyTag
|
|
@@ -618,12 +710,14 @@ func (rr *TA) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Digest) / 2
|
|
l += len(rr.Digest) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TALINK) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TALINK) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.PreviousName, off+l, compression, false)
|
|
l += domainNameLen(rr.PreviousName, off+l, compression, false)
|
|
l += domainNameLen(rr.NextName, off+l, compression, false)
|
|
l += domainNameLen(rr.NextName, off+l, compression, false)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TKEY) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TKEY) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Algorithm, off+l, compression, false)
|
|
l += domainNameLen(rr.Algorithm, off+l, compression, false)
|
|
@@ -637,6 +731,7 @@ func (rr *TKEY) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.OtherData) / 2
|
|
l += len(rr.OtherData) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TLSA) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TLSA) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l++ // Usage
|
|
l++ // Usage
|
|
@@ -645,6 +740,7 @@ func (rr *TLSA) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Certificate) / 2
|
|
l += len(rr.Certificate) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TSIG) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TSIG) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += domainNameLen(rr.Algorithm, off+l, compression, false)
|
|
l += domainNameLen(rr.Algorithm, off+l, compression, false)
|
|
@@ -658,6 +754,7 @@ func (rr *TSIG) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.OtherData) / 2
|
|
l += len(rr.OtherData) / 2
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TXT) len(off int, compression map[string]struct{}) int {
|
|
func (rr *TXT) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
for _, x := range rr.Txt {
|
|
for _, x := range rr.Txt {
|
|
@@ -665,16 +762,19 @@ func (rr *TXT) len(off int, compression map[string]struct{}) int {
|
|
}
|
|
}
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *UID) len(off int, compression map[string]struct{}) int {
|
|
func (rr *UID) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 4 // Uid
|
|
l += 4 // Uid
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *UINFO) len(off int, compression map[string]struct{}) int {
|
|
func (rr *UINFO) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.Uinfo) + 1
|
|
l += len(rr.Uinfo) + 1
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *URI) len(off int, compression map[string]struct{}) int {
|
|
func (rr *URI) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 2 // Priority
|
|
l += 2 // Priority
|
|
@@ -682,11 +782,13 @@ func (rr *URI) len(off int, compression map[string]struct{}) int {
|
|
l += len(rr.Target)
|
|
l += len(rr.Target)
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *X25) len(off int, compression map[string]struct{}) int {
|
|
func (rr *X25) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += len(rr.PSDNAddress) + 1
|
|
l += len(rr.PSDNAddress) + 1
|
|
return l
|
|
return l
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *ZONEMD) len(off int, compression map[string]struct{}) int {
|
|
func (rr *ZONEMD) len(off int, compression map[string]struct{}) int {
|
|
l := rr.Hdr.len(off, compression)
|
|
l := rr.Hdr.len(off, compression)
|
|
l += 4 // Serial
|
|
l += 4 // Serial
|
|
@@ -698,17 +800,31 @@ func (rr *ZONEMD) len(off int, compression map[string]struct{}) int {
|
|
|
|
|
|
// copy() functions
|
|
// copy() functions
|
|
func (rr *A) copy() RR {
|
|
func (rr *A) copy() RR {
|
|
- return &A{rr.Hdr, copyIP(rr.A)}
|
|
|
|
|
|
+ return &A{rr.Hdr, cloneSlice(rr.A)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AAAA) copy() RR {
|
|
func (rr *AAAA) copy() RR {
|
|
- return &AAAA{rr.Hdr, copyIP(rr.AAAA)}
|
|
|
|
|
|
+ return &AAAA{rr.Hdr, cloneSlice(rr.AAAA)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AFSDB) copy() RR {
|
|
func (rr *AFSDB) copy() RR {
|
|
return &AFSDB{rr.Hdr, rr.Subtype, rr.Hostname}
|
|
return &AFSDB{rr.Hdr, rr.Subtype, rr.Hostname}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func (rr *AMTRELAY) copy() RR {
|
|
|
|
+ return &AMTRELAY{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Precedence,
|
|
|
|
+ rr.GatewayType,
|
|
|
|
+ cloneSlice(rr.GatewayAddr),
|
|
|
|
+ rr.GatewayHost,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
func (rr *ANY) copy() RR {
|
|
func (rr *ANY) copy() RR {
|
|
return &ANY{rr.Hdr}
|
|
return &ANY{rr.Hdr}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *APL) copy() RR {
|
|
func (rr *APL) copy() RR {
|
|
Prefixes := make([]APLPrefix, len(rr.Prefixes))
|
|
Prefixes := make([]APLPrefix, len(rr.Prefixes))
|
|
for i, e := range rr.Prefixes {
|
|
for i, e := range rr.Prefixes {
|
|
@@ -716,150 +832,270 @@ func (rr *APL) copy() RR {
|
|
}
|
|
}
|
|
return &APL{rr.Hdr, Prefixes}
|
|
return &APL{rr.Hdr, Prefixes}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *AVC) copy() RR {
|
|
func (rr *AVC) copy() RR {
|
|
- Txt := make([]string, len(rr.Txt))
|
|
|
|
- copy(Txt, rr.Txt)
|
|
|
|
- return &AVC{rr.Hdr, Txt}
|
|
|
|
|
|
+ return &AVC{rr.Hdr, cloneSlice(rr.Txt)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CAA) copy() RR {
|
|
func (rr *CAA) copy() RR {
|
|
- return &CAA{rr.Hdr, rr.Flag, rr.Tag, rr.Value}
|
|
|
|
|
|
+ return &CAA{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Flag,
|
|
|
|
+ rr.Tag,
|
|
|
|
+ rr.Value,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CDNSKEY) copy() RR {
|
|
func (rr *CDNSKEY) copy() RR {
|
|
return &CDNSKEY{*rr.DNSKEY.copy().(*DNSKEY)}
|
|
return &CDNSKEY{*rr.DNSKEY.copy().(*DNSKEY)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CDS) copy() RR {
|
|
func (rr *CDS) copy() RR {
|
|
return &CDS{*rr.DS.copy().(*DS)}
|
|
return &CDS{*rr.DS.copy().(*DS)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CERT) copy() RR {
|
|
func (rr *CERT) copy() RR {
|
|
- return &CERT{rr.Hdr, rr.Type, rr.KeyTag, rr.Algorithm, rr.Certificate}
|
|
|
|
|
|
+ return &CERT{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Type,
|
|
|
|
+ rr.KeyTag,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.Certificate,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CNAME) copy() RR {
|
|
func (rr *CNAME) copy() RR {
|
|
return &CNAME{rr.Hdr, rr.Target}
|
|
return &CNAME{rr.Hdr, rr.Target}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *CSYNC) copy() RR {
|
|
func (rr *CSYNC) copy() RR {
|
|
- TypeBitMap := make([]uint16, len(rr.TypeBitMap))
|
|
|
|
- copy(TypeBitMap, rr.TypeBitMap)
|
|
|
|
- return &CSYNC{rr.Hdr, rr.Serial, rr.Flags, TypeBitMap}
|
|
|
|
|
|
+ return &CSYNC{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Serial,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ cloneSlice(rr.TypeBitMap),
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DHCID) copy() RR {
|
|
func (rr *DHCID) copy() RR {
|
|
return &DHCID{rr.Hdr, rr.Digest}
|
|
return &DHCID{rr.Hdr, rr.Digest}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DLV) copy() RR {
|
|
func (rr *DLV) copy() RR {
|
|
return &DLV{*rr.DS.copy().(*DS)}
|
|
return &DLV{*rr.DS.copy().(*DS)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DNAME) copy() RR {
|
|
func (rr *DNAME) copy() RR {
|
|
return &DNAME{rr.Hdr, rr.Target}
|
|
return &DNAME{rr.Hdr, rr.Target}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DNSKEY) copy() RR {
|
|
func (rr *DNSKEY) copy() RR {
|
|
- return &DNSKEY{rr.Hdr, rr.Flags, rr.Protocol, rr.Algorithm, rr.PublicKey}
|
|
|
|
|
|
+ return &DNSKEY{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ rr.Protocol,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.PublicKey,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *DS) copy() RR {
|
|
func (rr *DS) copy() RR {
|
|
- return &DS{rr.Hdr, rr.KeyTag, rr.Algorithm, rr.DigestType, rr.Digest}
|
|
|
|
|
|
+ return &DS{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.KeyTag,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.DigestType,
|
|
|
|
+ rr.Digest,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EID) copy() RR {
|
|
func (rr *EID) copy() RR {
|
|
return &EID{rr.Hdr, rr.Endpoint}
|
|
return &EID{rr.Hdr, rr.Endpoint}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EUI48) copy() RR {
|
|
func (rr *EUI48) copy() RR {
|
|
return &EUI48{rr.Hdr, rr.Address}
|
|
return &EUI48{rr.Hdr, rr.Address}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *EUI64) copy() RR {
|
|
func (rr *EUI64) copy() RR {
|
|
return &EUI64{rr.Hdr, rr.Address}
|
|
return &EUI64{rr.Hdr, rr.Address}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *GID) copy() RR {
|
|
func (rr *GID) copy() RR {
|
|
return &GID{rr.Hdr, rr.Gid}
|
|
return &GID{rr.Hdr, rr.Gid}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *GPOS) copy() RR {
|
|
func (rr *GPOS) copy() RR {
|
|
- return &GPOS{rr.Hdr, rr.Longitude, rr.Latitude, rr.Altitude}
|
|
|
|
|
|
+ return &GPOS{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Longitude,
|
|
|
|
+ rr.Latitude,
|
|
|
|
+ rr.Altitude,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *HINFO) copy() RR {
|
|
func (rr *HINFO) copy() RR {
|
|
return &HINFO{rr.Hdr, rr.Cpu, rr.Os}
|
|
return &HINFO{rr.Hdr, rr.Cpu, rr.Os}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *HIP) copy() RR {
|
|
func (rr *HIP) copy() RR {
|
|
- RendezvousServers := make([]string, len(rr.RendezvousServers))
|
|
|
|
- copy(RendezvousServers, rr.RendezvousServers)
|
|
|
|
- return &HIP{rr.Hdr, rr.HitLength, rr.PublicKeyAlgorithm, rr.PublicKeyLength, rr.Hit, rr.PublicKey, RendezvousServers}
|
|
|
|
|
|
+ return &HIP{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.HitLength,
|
|
|
|
+ rr.PublicKeyAlgorithm,
|
|
|
|
+ rr.PublicKeyLength,
|
|
|
|
+ rr.Hit,
|
|
|
|
+ rr.PublicKey,
|
|
|
|
+ cloneSlice(rr.RendezvousServers),
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *HTTPS) copy() RR {
|
|
func (rr *HTTPS) copy() RR {
|
|
return &HTTPS{*rr.SVCB.copy().(*SVCB)}
|
|
return &HTTPS{*rr.SVCB.copy().(*SVCB)}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func (rr *IPSECKEY) copy() RR {
|
|
|
|
+ return &IPSECKEY{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Precedence,
|
|
|
|
+ rr.GatewayType,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ cloneSlice(rr.GatewayAddr),
|
|
|
|
+ rr.GatewayHost,
|
|
|
|
+ rr.PublicKey,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
func (rr *KEY) copy() RR {
|
|
func (rr *KEY) copy() RR {
|
|
return &KEY{*rr.DNSKEY.copy().(*DNSKEY)}
|
|
return &KEY{*rr.DNSKEY.copy().(*DNSKEY)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *KX) copy() RR {
|
|
func (rr *KX) copy() RR {
|
|
return &KX{rr.Hdr, rr.Preference, rr.Exchanger}
|
|
return &KX{rr.Hdr, rr.Preference, rr.Exchanger}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *L32) copy() RR {
|
|
func (rr *L32) copy() RR {
|
|
- return &L32{rr.Hdr, rr.Preference, copyIP(rr.Locator32)}
|
|
|
|
|
|
+ return &L32{rr.Hdr, rr.Preference, cloneSlice(rr.Locator32)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *L64) copy() RR {
|
|
func (rr *L64) copy() RR {
|
|
return &L64{rr.Hdr, rr.Preference, rr.Locator64}
|
|
return &L64{rr.Hdr, rr.Preference, rr.Locator64}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *LOC) copy() RR {
|
|
func (rr *LOC) copy() RR {
|
|
- return &LOC{rr.Hdr, rr.Version, rr.Size, rr.HorizPre, rr.VertPre, rr.Latitude, rr.Longitude, rr.Altitude}
|
|
|
|
|
|
+ return &LOC{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Version,
|
|
|
|
+ rr.Size,
|
|
|
|
+ rr.HorizPre,
|
|
|
|
+ rr.VertPre,
|
|
|
|
+ rr.Latitude,
|
|
|
|
+ rr.Longitude,
|
|
|
|
+ rr.Altitude,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *LP) copy() RR {
|
|
func (rr *LP) copy() RR {
|
|
return &LP{rr.Hdr, rr.Preference, rr.Fqdn}
|
|
return &LP{rr.Hdr, rr.Preference, rr.Fqdn}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MB) copy() RR {
|
|
func (rr *MB) copy() RR {
|
|
return &MB{rr.Hdr, rr.Mb}
|
|
return &MB{rr.Hdr, rr.Mb}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MD) copy() RR {
|
|
func (rr *MD) copy() RR {
|
|
return &MD{rr.Hdr, rr.Md}
|
|
return &MD{rr.Hdr, rr.Md}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MF) copy() RR {
|
|
func (rr *MF) copy() RR {
|
|
return &MF{rr.Hdr, rr.Mf}
|
|
return &MF{rr.Hdr, rr.Mf}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MG) copy() RR {
|
|
func (rr *MG) copy() RR {
|
|
return &MG{rr.Hdr, rr.Mg}
|
|
return &MG{rr.Hdr, rr.Mg}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MINFO) copy() RR {
|
|
func (rr *MINFO) copy() RR {
|
|
return &MINFO{rr.Hdr, rr.Rmail, rr.Email}
|
|
return &MINFO{rr.Hdr, rr.Rmail, rr.Email}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MR) copy() RR {
|
|
func (rr *MR) copy() RR {
|
|
return &MR{rr.Hdr, rr.Mr}
|
|
return &MR{rr.Hdr, rr.Mr}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *MX) copy() RR {
|
|
func (rr *MX) copy() RR {
|
|
return &MX{rr.Hdr, rr.Preference, rr.Mx}
|
|
return &MX{rr.Hdr, rr.Preference, rr.Mx}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NAPTR) copy() RR {
|
|
func (rr *NAPTR) copy() RR {
|
|
- return &NAPTR{rr.Hdr, rr.Order, rr.Preference, rr.Flags, rr.Service, rr.Regexp, rr.Replacement}
|
|
|
|
|
|
+ return &NAPTR{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Order,
|
|
|
|
+ rr.Preference,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ rr.Service,
|
|
|
|
+ rr.Regexp,
|
|
|
|
+ rr.Replacement,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NID) copy() RR {
|
|
func (rr *NID) copy() RR {
|
|
return &NID{rr.Hdr, rr.Preference, rr.NodeID}
|
|
return &NID{rr.Hdr, rr.Preference, rr.NodeID}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NIMLOC) copy() RR {
|
|
func (rr *NIMLOC) copy() RR {
|
|
return &NIMLOC{rr.Hdr, rr.Locator}
|
|
return &NIMLOC{rr.Hdr, rr.Locator}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NINFO) copy() RR {
|
|
func (rr *NINFO) copy() RR {
|
|
- ZSData := make([]string, len(rr.ZSData))
|
|
|
|
- copy(ZSData, rr.ZSData)
|
|
|
|
- return &NINFO{rr.Hdr, ZSData}
|
|
|
|
|
|
+ return &NINFO{rr.Hdr, cloneSlice(rr.ZSData)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NS) copy() RR {
|
|
func (rr *NS) copy() RR {
|
|
return &NS{rr.Hdr, rr.Ns}
|
|
return &NS{rr.Hdr, rr.Ns}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSAPPTR) copy() RR {
|
|
func (rr *NSAPPTR) copy() RR {
|
|
return &NSAPPTR{rr.Hdr, rr.Ptr}
|
|
return &NSAPPTR{rr.Hdr, rr.Ptr}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSEC) copy() RR {
|
|
func (rr *NSEC) copy() RR {
|
|
- TypeBitMap := make([]uint16, len(rr.TypeBitMap))
|
|
|
|
- copy(TypeBitMap, rr.TypeBitMap)
|
|
|
|
- return &NSEC{rr.Hdr, rr.NextDomain, TypeBitMap}
|
|
|
|
|
|
+ return &NSEC{rr.Hdr, rr.NextDomain, cloneSlice(rr.TypeBitMap)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSEC3) copy() RR {
|
|
func (rr *NSEC3) copy() RR {
|
|
- TypeBitMap := make([]uint16, len(rr.TypeBitMap))
|
|
|
|
- copy(TypeBitMap, rr.TypeBitMap)
|
|
|
|
- return &NSEC3{rr.Hdr, rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt, rr.HashLength, rr.NextDomain, TypeBitMap}
|
|
|
|
|
|
+ return &NSEC3{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Hash,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ rr.Iterations,
|
|
|
|
+ rr.SaltLength,
|
|
|
|
+ rr.Salt,
|
|
|
|
+ rr.HashLength,
|
|
|
|
+ rr.NextDomain,
|
|
|
|
+ cloneSlice(rr.TypeBitMap),
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NSEC3PARAM) copy() RR {
|
|
func (rr *NSEC3PARAM) copy() RR {
|
|
- return &NSEC3PARAM{rr.Hdr, rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt}
|
|
|
|
|
|
+ return &NSEC3PARAM{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Hash,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ rr.Iterations,
|
|
|
|
+ rr.SaltLength,
|
|
|
|
+ rr.Salt,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *NULL) copy() RR {
|
|
func (rr *NULL) copy() RR {
|
|
return &NULL{rr.Hdr, rr.Data}
|
|
return &NULL{rr.Hdr, rr.Data}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *OPENPGPKEY) copy() RR {
|
|
func (rr *OPENPGPKEY) copy() RR {
|
|
return &OPENPGPKEY{rr.Hdr, rr.PublicKey}
|
|
return &OPENPGPKEY{rr.Hdr, rr.PublicKey}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *OPT) copy() RR {
|
|
func (rr *OPT) copy() RR {
|
|
Option := make([]EDNS0, len(rr.Option))
|
|
Option := make([]EDNS0, len(rr.Option))
|
|
for i, e := range rr.Option {
|
|
for i, e := range rr.Option {
|
|
@@ -867,86 +1103,205 @@ func (rr *OPT) copy() RR {
|
|
}
|
|
}
|
|
return &OPT{rr.Hdr, Option}
|
|
return &OPT{rr.Hdr, Option}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *PTR) copy() RR {
|
|
func (rr *PTR) copy() RR {
|
|
return &PTR{rr.Hdr, rr.Ptr}
|
|
return &PTR{rr.Hdr, rr.Ptr}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *PX) copy() RR {
|
|
func (rr *PX) copy() RR {
|
|
- return &PX{rr.Hdr, rr.Preference, rr.Map822, rr.Mapx400}
|
|
|
|
|
|
+ return &PX{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Preference,
|
|
|
|
+ rr.Map822,
|
|
|
|
+ rr.Mapx400,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RFC3597) copy() RR {
|
|
func (rr *RFC3597) copy() RR {
|
|
return &RFC3597{rr.Hdr, rr.Rdata}
|
|
return &RFC3597{rr.Hdr, rr.Rdata}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RKEY) copy() RR {
|
|
func (rr *RKEY) copy() RR {
|
|
- return &RKEY{rr.Hdr, rr.Flags, rr.Protocol, rr.Algorithm, rr.PublicKey}
|
|
|
|
|
|
+ return &RKEY{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Flags,
|
|
|
|
+ rr.Protocol,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.PublicKey,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RP) copy() RR {
|
|
func (rr *RP) copy() RR {
|
|
return &RP{rr.Hdr, rr.Mbox, rr.Txt}
|
|
return &RP{rr.Hdr, rr.Mbox, rr.Txt}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RRSIG) copy() RR {
|
|
func (rr *RRSIG) copy() RR {
|
|
- return &RRSIG{rr.Hdr, rr.TypeCovered, rr.Algorithm, rr.Labels, rr.OrigTtl, rr.Expiration, rr.Inception, rr.KeyTag, rr.SignerName, rr.Signature}
|
|
|
|
|
|
+ return &RRSIG{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.TypeCovered,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.Labels,
|
|
|
|
+ rr.OrigTtl,
|
|
|
|
+ rr.Expiration,
|
|
|
|
+ rr.Inception,
|
|
|
|
+ rr.KeyTag,
|
|
|
|
+ rr.SignerName,
|
|
|
|
+ rr.Signature,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *RT) copy() RR {
|
|
func (rr *RT) copy() RR {
|
|
return &RT{rr.Hdr, rr.Preference, rr.Host}
|
|
return &RT{rr.Hdr, rr.Preference, rr.Host}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SIG) copy() RR {
|
|
func (rr *SIG) copy() RR {
|
|
return &SIG{*rr.RRSIG.copy().(*RRSIG)}
|
|
return &SIG{*rr.RRSIG.copy().(*RRSIG)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SMIMEA) copy() RR {
|
|
func (rr *SMIMEA) copy() RR {
|
|
- return &SMIMEA{rr.Hdr, rr.Usage, rr.Selector, rr.MatchingType, rr.Certificate}
|
|
|
|
|
|
+ return &SMIMEA{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Usage,
|
|
|
|
+ rr.Selector,
|
|
|
|
+ rr.MatchingType,
|
|
|
|
+ rr.Certificate,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SOA) copy() RR {
|
|
func (rr *SOA) copy() RR {
|
|
- return &SOA{rr.Hdr, rr.Ns, rr.Mbox, rr.Serial, rr.Refresh, rr.Retry, rr.Expire, rr.Minttl}
|
|
|
|
|
|
+ return &SOA{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Ns,
|
|
|
|
+ rr.Mbox,
|
|
|
|
+ rr.Serial,
|
|
|
|
+ rr.Refresh,
|
|
|
|
+ rr.Retry,
|
|
|
|
+ rr.Expire,
|
|
|
|
+ rr.Minttl,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SPF) copy() RR {
|
|
func (rr *SPF) copy() RR {
|
|
- Txt := make([]string, len(rr.Txt))
|
|
|
|
- copy(Txt, rr.Txt)
|
|
|
|
- return &SPF{rr.Hdr, Txt}
|
|
|
|
|
|
+ return &SPF{rr.Hdr, cloneSlice(rr.Txt)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SRV) copy() RR {
|
|
func (rr *SRV) copy() RR {
|
|
- return &SRV{rr.Hdr, rr.Priority, rr.Weight, rr.Port, rr.Target}
|
|
|
|
|
|
+ return &SRV{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Priority,
|
|
|
|
+ rr.Weight,
|
|
|
|
+ rr.Port,
|
|
|
|
+ rr.Target,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SSHFP) copy() RR {
|
|
func (rr *SSHFP) copy() RR {
|
|
- return &SSHFP{rr.Hdr, rr.Algorithm, rr.Type, rr.FingerPrint}
|
|
|
|
|
|
+ return &SSHFP{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.Type,
|
|
|
|
+ rr.FingerPrint,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *SVCB) copy() RR {
|
|
func (rr *SVCB) copy() RR {
|
|
Value := make([]SVCBKeyValue, len(rr.Value))
|
|
Value := make([]SVCBKeyValue, len(rr.Value))
|
|
for i, e := range rr.Value {
|
|
for i, e := range rr.Value {
|
|
Value[i] = e.copy()
|
|
Value[i] = e.copy()
|
|
}
|
|
}
|
|
- return &SVCB{rr.Hdr, rr.Priority, rr.Target, Value}
|
|
|
|
|
|
+ return &SVCB{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Priority,
|
|
|
|
+ rr.Target,
|
|
|
|
+ Value,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TA) copy() RR {
|
|
func (rr *TA) copy() RR {
|
|
- return &TA{rr.Hdr, rr.KeyTag, rr.Algorithm, rr.DigestType, rr.Digest}
|
|
|
|
|
|
+ return &TA{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.KeyTag,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.DigestType,
|
|
|
|
+ rr.Digest,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TALINK) copy() RR {
|
|
func (rr *TALINK) copy() RR {
|
|
return &TALINK{rr.Hdr, rr.PreviousName, rr.NextName}
|
|
return &TALINK{rr.Hdr, rr.PreviousName, rr.NextName}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TKEY) copy() RR {
|
|
func (rr *TKEY) copy() RR {
|
|
- return &TKEY{rr.Hdr, rr.Algorithm, rr.Inception, rr.Expiration, rr.Mode, rr.Error, rr.KeySize, rr.Key, rr.OtherLen, rr.OtherData}
|
|
|
|
|
|
+ return &TKEY{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.Inception,
|
|
|
|
+ rr.Expiration,
|
|
|
|
+ rr.Mode,
|
|
|
|
+ rr.Error,
|
|
|
|
+ rr.KeySize,
|
|
|
|
+ rr.Key,
|
|
|
|
+ rr.OtherLen,
|
|
|
|
+ rr.OtherData,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TLSA) copy() RR {
|
|
func (rr *TLSA) copy() RR {
|
|
- return &TLSA{rr.Hdr, rr.Usage, rr.Selector, rr.MatchingType, rr.Certificate}
|
|
|
|
|
|
+ return &TLSA{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Usage,
|
|
|
|
+ rr.Selector,
|
|
|
|
+ rr.MatchingType,
|
|
|
|
+ rr.Certificate,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TSIG) copy() RR {
|
|
func (rr *TSIG) copy() RR {
|
|
- return &TSIG{rr.Hdr, rr.Algorithm, rr.TimeSigned, rr.Fudge, rr.MACSize, rr.MAC, rr.OrigId, rr.Error, rr.OtherLen, rr.OtherData}
|
|
|
|
|
|
+ return &TSIG{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Algorithm,
|
|
|
|
+ rr.TimeSigned,
|
|
|
|
+ rr.Fudge,
|
|
|
|
+ rr.MACSize,
|
|
|
|
+ rr.MAC,
|
|
|
|
+ rr.OrigId,
|
|
|
|
+ rr.Error,
|
|
|
|
+ rr.OtherLen,
|
|
|
|
+ rr.OtherData,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *TXT) copy() RR {
|
|
func (rr *TXT) copy() RR {
|
|
- Txt := make([]string, len(rr.Txt))
|
|
|
|
- copy(Txt, rr.Txt)
|
|
|
|
- return &TXT{rr.Hdr, Txt}
|
|
|
|
|
|
+ return &TXT{rr.Hdr, cloneSlice(rr.Txt)}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *UID) copy() RR {
|
|
func (rr *UID) copy() RR {
|
|
return &UID{rr.Hdr, rr.Uid}
|
|
return &UID{rr.Hdr, rr.Uid}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *UINFO) copy() RR {
|
|
func (rr *UINFO) copy() RR {
|
|
return &UINFO{rr.Hdr, rr.Uinfo}
|
|
return &UINFO{rr.Hdr, rr.Uinfo}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *URI) copy() RR {
|
|
func (rr *URI) copy() RR {
|
|
- return &URI{rr.Hdr, rr.Priority, rr.Weight, rr.Target}
|
|
|
|
|
|
+ return &URI{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Priority,
|
|
|
|
+ rr.Weight,
|
|
|
|
+ rr.Target,
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *X25) copy() RR {
|
|
func (rr *X25) copy() RR {
|
|
return &X25{rr.Hdr, rr.PSDNAddress}
|
|
return &X25{rr.Hdr, rr.PSDNAddress}
|
|
}
|
|
}
|
|
|
|
+
|
|
func (rr *ZONEMD) copy() RR {
|
|
func (rr *ZONEMD) copy() RR {
|
|
- return &ZONEMD{rr.Hdr, rr.Serial, rr.Scheme, rr.Hash, rr.Digest}
|
|
|
|
|
|
+ return &ZONEMD{
|
|
|
|
+ rr.Hdr,
|
|
|
|
+ rr.Serial,
|
|
|
|
+ rr.Scheme,
|
|
|
|
+ rr.Hash,
|
|
|
|
+ rr.Digest,
|
|
|
|
+ }
|
|
}
|
|
}
|