// Code generated by "go run len_generate.go"; DO NOT EDIT.

package rdata

import (
	"encoding/base64"
	"net"
)

func (rd NULL) Len() int {
	l := 0
	l += len(rd.Null)
	return l
}

func (rd CNAME) Len() int {
	l := 0
	l += len(rd.Target) + 1
	return l
}

func (rd HINFO) Len() int {
	l := 0
	l += len(rd.Cpu) + 1
	l += len(rd.Os) + 1
	return l
}

func (rd MB) Len() int {
	l := 0
	l += len(rd.Mb) + 1
	return l
}

func (rd MG) Len() int {
	l := 0
	l += len(rd.Mg) + 1
	return l
}

func (rd MINFO) Len() int {
	l := 0
	l += len(rd.Rmail) + 1
	l += len(rd.Email) + 1
	return l
}

func (rd MR) Len() int {
	l := 0
	l += len(rd.Mr) + 1
	return l
}

func (rd MF) Len() int {
	l := 0
	l += len(rd.Mf) + 1
	return l
}

func (rd MD) Len() int {
	l := 0
	l += len(rd.Md) + 1
	return l
}

func (rd MX) Len() int {
	l := 0
	l += 2 // Preference
	l += len(rd.Mx) + 1
	return l
}

func (rd AFSDB) Len() int {
	l := 0
	l += 2 // Subtype
	l += len(rd.Hostname) + 1
	return l
}

func (rd X25) Len() int {
	l := 0
	l += len(rd.PSDNAddress) + 1
	return l
}

func (rd ISDN) Len() int {
	l := 0
	l += len(rd.Address) + 1
	l += len(rd.SubAddress) + 1
	return l
}

func (rd RT) Len() int {
	l := 0
	l += 2 // Preference
	l += len(rd.Host) + 1
	return l
}

func (rd NS) Len() int {
	l := 0
	l += len(rd.Ns) + 1
	return l
}

func (rd PTR) Len() int {
	l := 0
	l += len(rd.Ptr) + 1
	return l
}

func (rd RP) Len() int {
	l := 0
	l += len(rd.Mbox) + 1
	l += len(rd.Txt) + 1
	return l
}

func (rd SOA) Len() int {
	l := 0
	l += len(rd.Ns) + 1
	l += len(rd.Mbox) + 1
	l += 4 // Serial
	l += 4 // Refresh
	l += 4 // Retry
	l += 4 // Expire
	l += 4 // Minttl
	return l
}

func (rd TXT) Len() int {
	l := 0
	for i := range rd.Txt {
		l += len(rd.Txt[i]) + 1
	}
	return l
}

func (rd IPN) Len() int {
	l := 0
	l += 8 // Node
	return l
}

func (rd SRV) Len() int {
	l := 0
	l += 2 // Priority
	l += 2 // Weight
	l += 2 // Port
	l += len(rd.Target) + 1
	return l
}

func (rd NAPTR) Len() int {
	l := 0
	l += 2 // Order
	l += 2 // Preference
	l += len(rd.Flags) + 1
	l += len(rd.Service) + 1
	l += len(rd.Regexp) + 1
	l += len(rd.Replacement) + 1
	return l
}

func (rd CERT) Len() int {
	l := 0
	l += 2 // Type
	l += 2 // KeyTag
	l++    // Algorithm
	l += base64.StdEncoding.DecodedLen(len(rd.Certificate))
	return l
}

func (rd DNAME) Len() int {
	l := 0
	l += len(rd.Target) + 1
	return l
}

func (rd A) Len() int {
	l := 0
	l += net.IPv4len // Addr
	return l
}

func (rd AAAA) Len() int {
	l := 0
	l += net.IPv6len // Addr
	return l
}

func (rd PX) Len() int {
	l := 0
	l += 2 // Preference
	l += len(rd.Map822) + 1
	l += len(rd.Mapx400) + 1
	return l
}

func (rd GPOS) Len() int {
	l := 0
	l += len(rd.Longitude) + 1
	l += len(rd.Latitude) + 1
	l += len(rd.Altitude) + 1
	return l
}

func (rd LOC) Len() int {
	l := 0
	l++    // Version
	l++    // Size
	l++    // HorizPre
	l++    // VertPre
	l += 4 // Latitude
	l += 4 // Longitude
	l += 4 // Altitude
	return l
}

func (rd RRSIG) Len() int {
	l := 0
	l += 2 // TypeCovered
	l++    // Algorithm
	l++    // Labels
	l += 4 // OrigTTL
	l += 4 // Expiration
	l += 4 // Inception
	l += 2 // KeyTag
	l += len(rd.SignerName) + 1
	l += base64.StdEncoding.DecodedLen(len(rd.Signature))
	return l
}

func (rd DS) Len() int {
	l := 0
	l += 2 // KeyTag
	l++    // Algorithm
	l++    // DigestType
	l += len(rd.Digest) / 2
	return l
}

func (rd KX) Len() int {
	l := 0
	l += 2 // Preference
	l += len(rd.Exchanger) + 1
	return l
}

func (rd TA) Len() int {
	l := 0
	l += 2 // KeyTag
	l++    // Algorithm
	l++    // DigestType
	l += len(rd.Digest) / 2
	return l
}

func (rd TALINK) Len() int {
	l := 0
	l += len(rd.PreviousName) + 1
	l += len(rd.NextName) + 1
	return l
}

func (rd SSHFP) Len() int {
	l := 0
	l++ // Algorithm
	l++ // Type
	l += len(rd.FingerPrint) / 2
	return l
}

func (rd DNSKEY) Len() int {
	l := 0
	l += 2 // Flags
	l++    // Protocol
	l++    // Algorithm
	l += base64.StdEncoding.DecodedLen(len(rd.PublicKey))
	return l
}

func (rd RKEY) Len() int {
	l := 0
	l += 2 // Flags
	l++    // Protocol
	l++    // Algorithm
	l += base64.StdEncoding.DecodedLen(len(rd.PublicKey))
	return l
}

func (rd NSAPPTR) Len() int {
	l := 0
	l += len(rd.Ptr) + 1
	return l
}

func (rd NSEC3PARAM) Len() int {
	l := 0
	l++    // Hash
	l++    // Flags
	l += 2 // Iterations
	l++    // SaltLength
	l += len(rd.Salt) / 2
	return l
}

func (rd TKEY) Len() int {
	l := 0
	l += len(rd.Algorithm) + 1
	l += 4 // Inception
	l += 4 // Expiration
	l += 2 // Mode
	l += 2 // Error
	l += 2 // KeySize
	l += len(rd.Key) / 2
	l += 2 // OtherLen
	l += len(rd.OtherData) / 2
	return l
}

func (rd RFC3597) Len() int {
	l := 0
	l += len(rd.Data) / 2
	return l
}

func (rd URI) Len() int {
	l := 0
	l += 2 // Priority
	l += 2 // Weight
	l += len(rd.Target)
	return l
}

func (rd DHCID) Len() int {
	l := 0
	l += base64.StdEncoding.DecodedLen(len(rd.Digest))
	return l
}

func (rd TLSA) Len() int {
	l := 0
	l++ // Usage
	l++ // Selector
	l++ // MatchingType
	l += len(rd.Certificate) / 2
	return l
}

func (rd SMIMEA) Len() int {
	l := 0
	l++ // Usage
	l++ // Selector
	l++ // MatchingType
	l += len(rd.Certificate) / 2
	return l
}

func (rd HIP) Len() int {
	l := 0
	l++    // HitLength
	l++    // PublicKeyAlgorithm
	l += 2 // PublicKeyLength
	l += len(rd.Hit) / 2
	l += base64.StdEncoding.DecodedLen(len(rd.PublicKey))
	for i := range rd.RendezvousServers {
		l += len(rd.RendezvousServers[i]) + 1
	}
	return l
}

func (rd NINFO) Len() int {
	l := 0
	for i := range rd.ZSData {
		l += len(rd.ZSData[i]) + 1
	}
	return l
}

func (rd NID) Len() int {
	l := 0
	l += 2 // Preference
	l += 8 // NodeID
	return l
}

func (rd L32) Len() int {
	l := 0
	l += 2           // Preference
	l += net.IPv4len // Locator32
	return l
}

func (rd L64) Len() int {
	l := 0
	l += 2 // Preference
	l += 8 // Locator64
	return l
}

func (rd LP) Len() int {
	l := 0
	l += 2 // Preference
	l += len(rd.Fqdn) + 1
	return l
}

func (rd EUI48) Len() int {
	l := 0
	l += 6 // Address
	return l
}

func (rd EUI64) Len() int {
	l := 0
	l += 8 // Address
	return l
}

func (rd CAA) Len() int {
	l := 0
	l++ // Flag
	l += len(rd.Tag) + 1
	l += len(rd.Value)
	return l
}

func (rd UID) Len() int {
	l := 0
	l += 4 // Uid
	return l
}

func (rd GID) Len() int {
	l := 0
	l += 4 // Gid
	return l
}

func (rd UINFO) Len() int {
	l := 0
	l += len(rd.Uinfo) + 1
	return l
}

func (rd EID) Len() int {
	l := 0
	l += len(rd.Endpoint) / 2
	return l
}

func (rd NIMLOC) Len() int {
	l := 0
	l += len(rd.Locator) / 2
	return l
}

func (rd OPENPGPKEY) Len() int {
	l := 0
	l += base64.StdEncoding.DecodedLen(len(rd.PublicKey))
	return l
}

func (rd ZONEMD) Len() int {
	l := 0
	l += 4 // Serial
	l++    // Scheme
	l++    // Hash
	l += len(rd.Digest) / 2
	return l
}

func (rd SVCB) Len() int {
	l := 0
	l += 2 // Priority
	l += len(rd.Target) + 1
	for i := range rd.Value {
		l += rd.Value[i].Len()
	}
	return l
}

func (rd DELEG) Len() int {
	l := 0
	for i := range rd.Value {
		l += rd.Value[i].Len()
	}
	return l
}

func (rd DSYNC) Len() int {
	l := 0
	l += 2 // Type
	l++    // Scheme
	l += 2 // Port
	l += len(rd.Target) + 1
	return l
}

func (rd TSIG) Len() int {
	l := 0
	l += len(rd.Algorithm) + 1
	l += 6 // TimeSigned
	l += 2 // Fudge
	l += 2 // MACSize
	l += len(rd.MAC) / 2
	l += 2 // OrigID
	l += 2 // Error
	l += 2 // OtherLen
	l += len(rd.OtherData) / 2
	return l
}
