2019-03-18 03:40:18 +00:00
|
|
|
// *** DO NOT MODIFY ***
|
|
|
|
// AUTOGENERATED BY go generate from compress_generate.go
|
2018-05-01 23:45:06 +00:00
|
|
|
|
|
|
|
package dns
|
|
|
|
|
2019-03-18 03:40:18 +00:00
|
|
|
func compressionLenHelperType(c map[string]int, r RR) {
|
2018-05-01 23:45:06 +00:00
|
|
|
switch x := r.(type) {
|
|
|
|
case *AFSDB:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Hostname)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *CNAME:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Target)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *DNAME:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Target)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *HIP:
|
|
|
|
for i := range x.RendezvousServers {
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.RendezvousServers[i])
|
2018-05-01 23:45:06 +00:00
|
|
|
}
|
|
|
|
case *KX:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Exchanger)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *LP:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Fqdn)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MB:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mb)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MD:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Md)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MF:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mf)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MG:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mg)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MINFO:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Rmail)
|
|
|
|
compressionLenHelper(c, x.Email)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MR:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mr)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MX:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mx)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *NAPTR:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Replacement)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *NS:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Ns)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *NSAPPTR:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Ptr)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *NSEC:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.NextDomain)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *PTR:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Ptr)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *PX:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Map822)
|
|
|
|
compressionLenHelper(c, x.Mapx400)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *RP:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Mbox)
|
|
|
|
compressionLenHelper(c, x.Txt)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *RRSIG:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.SignerName)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *RT:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Host)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *SIG:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.SignerName)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *SOA:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Ns)
|
|
|
|
compressionLenHelper(c, x.Mbox)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *SRV:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Target)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *TALINK:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.PreviousName)
|
|
|
|
compressionLenHelper(c, x.NextName)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *TKEY:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Algorithm)
|
2018-05-01 23:45:06 +00:00
|
|
|
case *TSIG:
|
2019-03-18 03:40:18 +00:00
|
|
|
compressionLenHelper(c, x.Algorithm)
|
2018-05-01 23:45:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-18 03:40:18 +00:00
|
|
|
func compressionLenSearchType(c map[string]int, r RR) (int, bool) {
|
2018-05-01 23:45:06 +00:00
|
|
|
switch x := r.(type) {
|
|
|
|
case *AFSDB:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Hostname)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *CNAME:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Target)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MB:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Mb)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MD:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Md)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MF:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Mf)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MG:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Mg)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MINFO:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Rmail)
|
|
|
|
k2, ok2 := compressionLenSearch(c, x.Email)
|
|
|
|
return k1 + k2, ok1 && ok2
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MR:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Mr)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *MX:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Mx)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *NS:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Ns)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *PTR:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Ptr)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *RT:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Host)
|
|
|
|
return k1, ok1
|
2018-05-01 23:45:06 +00:00
|
|
|
case *SOA:
|
2019-03-18 03:40:18 +00:00
|
|
|
k1, ok1 := compressionLenSearch(c, x.Ns)
|
|
|
|
k2, ok2 := compressionLenSearch(c, x.Mbox)
|
|
|
|
return k1 + k2, ok1 && ok2
|
2018-05-01 23:45:06 +00:00
|
|
|
}
|
2019-03-18 03:40:18 +00:00
|
|
|
return 0, false
|
2018-05-01 23:45:06 +00:00
|
|
|
}
|