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

package dns

func (rr *TSIG) Header() *Header       { return &rr.Hdr }
func (rr *DELEG) Header() *Header      { return &rr.Hdr }
func (rr *OPT) Header() *Header        { return &rr.Hdr }
func (rr *NSEC3) Header() *Header      { return &rr.Hdr }
func (rr *DNSKEY) Header() *Header     { return &rr.Hdr }
func (rr *DS) Header() *Header         { return &rr.Hdr }
func (rr *NSEC) Header() *Header       { return &rr.Hdr }
func (rr *RRSIG) Header() *Header      { return &rr.Hdr }
func (rr *AAAA) Header() *Header       { return &rr.Hdr }
func (rr *A) Header() *Header          { return &rr.Hdr }
func (rr *TXT) Header() *Header        { return &rr.Hdr }
func (rr *NS) Header() *Header         { return &rr.Hdr }
func (rr *MX) Header() *Header         { return &rr.Hdr }
func (rr *CNAME) Header() *Header      { return &rr.Hdr }
func (rr *NULL) Header() *Header       { return &rr.Hdr }
func (rr *NXNAME) Header() *Header     { return &rr.Hdr }
func (rr *HINFO) Header() *Header      { return &rr.Hdr }
func (rr *MB) Header() *Header         { return &rr.Hdr }
func (rr *MG) Header() *Header         { return &rr.Hdr }
func (rr *MINFO) Header() *Header      { return &rr.Hdr }
func (rr *MR) Header() *Header         { return &rr.Hdr }
func (rr *MF) Header() *Header         { return &rr.Hdr }
func (rr *MD) Header() *Header         { return &rr.Hdr }
func (rr *AFSDB) Header() *Header      { return &rr.Hdr }
func (rr *X25) Header() *Header        { return &rr.Hdr }
func (rr *ISDN) Header() *Header       { return &rr.Hdr }
func (rr *RT) Header() *Header         { return &rr.Hdr }
func (rr *PTR) Header() *Header        { return &rr.Hdr }
func (rr *RP) Header() *Header         { return &rr.Hdr }
func (rr *SOA) Header() *Header        { return &rr.Hdr }
func (rr *SPF) Header() *Header        { return &rr.Hdr }
func (rr *AVC) Header() *Header        { return &rr.Hdr }
func (rr *WALLET) Header() *Header     { return &rr.Hdr }
func (rr *CLA) Header() *Header        { return &rr.Hdr }
func (rr *IPN) Header() *Header        { return &rr.Hdr }
func (rr *SRV) Header() *Header        { return &rr.Hdr }
func (rr *NAPTR) Header() *Header      { return &rr.Hdr }
func (rr *CERT) Header() *Header       { return &rr.Hdr }
func (rr *DNAME) Header() *Header      { return &rr.Hdr }
func (rr *PX) Header() *Header         { return &rr.Hdr }
func (rr *GPOS) Header() *Header       { return &rr.Hdr }
func (rr *LOC) Header() *Header        { return &rr.Hdr }
func (rr *SIG) Header() *Header        { return &rr.Hdr }
func (rr *NXT) Header() *Header        { return &rr.Hdr }
func (rr *DLV) Header() *Header        { return &rr.Hdr }
func (rr *CDS) Header() *Header        { return &rr.Hdr }
func (rr *KX) Header() *Header         { return &rr.Hdr }
func (rr *TA) Header() *Header         { return &rr.Hdr }
func (rr *TALINK) Header() *Header     { return &rr.Hdr }
func (rr *SSHFP) Header() *Header      { return &rr.Hdr }
func (rr *KEY) Header() *Header        { return &rr.Hdr }
func (rr *CDNSKEY) Header() *Header    { return &rr.Hdr }
func (rr *RKEY) Header() *Header       { return &rr.Hdr }
func (rr *NSAPPTR) Header() *Header    { return &rr.Hdr }
func (rr *NSEC3PARAM) Header() *Header { return &rr.Hdr }
func (rr *TKEY) Header() *Header       { return &rr.Hdr }
func (rr *RFC3597) Header() *Header    { return &rr.Hdr }
func (rr *URI) Header() *Header        { return &rr.Hdr }
func (rr *DHCID) Header() *Header      { return &rr.Hdr }
func (rr *TLSA) Header() *Header       { return &rr.Hdr }
func (rr *SMIMEA) Header() *Header     { return &rr.Hdr }
func (rr *HIP) Header() *Header        { return &rr.Hdr }
func (rr *NINFO) Header() *Header      { return &rr.Hdr }
func (rr *NID) Header() *Header        { return &rr.Hdr }
func (rr *L32) Header() *Header        { return &rr.Hdr }
func (rr *L64) Header() *Header        { return &rr.Hdr }
func (rr *LP) Header() *Header         { return &rr.Hdr }
func (rr *EUI48) Header() *Header      { return &rr.Hdr }
func (rr *EUI64) Header() *Header      { return &rr.Hdr }
func (rr *CAA) Header() *Header        { return &rr.Hdr }
func (rr *UID) Header() *Header        { return &rr.Hdr }
func (rr *GID) Header() *Header        { return &rr.Hdr }
func (rr *UINFO) Header() *Header      { return &rr.Hdr }
func (rr *EID) Header() *Header        { return &rr.Hdr }
func (rr *NIMLOC) Header() *Header     { return &rr.Hdr }
func (rr *OPENPGPKEY) Header() *Header { return &rr.Hdr }
func (rr *CSYNC) Header() *Header      { return &rr.Hdr }
func (rr *ZONEMD) Header() *Header     { return &rr.Hdr }
func (rr *RESINFO) Header() *Header    { return &rr.Hdr }
func (rr *SVCB) Header() *Header       { return &rr.Hdr }
func (rr *HTTPS) Header() *Header      { return &rr.Hdr }
func (rr *DELEGPARAM) Header() *Header { return &rr.Hdr }
func (rr *DSYNC) Header() *Header      { return &rr.Hdr }
func (rr *ANY) Header() *Header        { return &rr.Hdr }
func (rr *AXFR) Header() *Header       { return &rr.Hdr }
func (rr *IXFR) Header() *Header       { return &rr.Hdr }

// TypeToRR is a map of constructors for each RR type.
// Basic usage if you have a type  code and want to create a [RR]:
//
//	rr := dns.TypeToRR[dns.TypeMX]()
//	fmt.Println(rr) // "0       CLASS0  MX      0"
var TypeToRR = map[uint16]func() RR{
	TypeTSIG:       func() RR { return new(TSIG) },
	TypeDELEG:      func() RR { return new(DELEG) },
	TypeOPT:        func() RR { return new(OPT) },
	TypeNSEC3:      func() RR { return new(NSEC3) },
	TypeDNSKEY:     func() RR { return new(DNSKEY) },
	TypeDS:         func() RR { return new(DS) },
	TypeNSEC:       func() RR { return new(NSEC) },
	TypeRRSIG:      func() RR { return new(RRSIG) },
	TypeAAAA:       func() RR { return new(AAAA) },
	TypeA:          func() RR { return new(A) },
	TypeTXT:        func() RR { return new(TXT) },
	TypeNS:         func() RR { return new(NS) },
	TypeMX:         func() RR { return new(MX) },
	TypeCNAME:      func() RR { return new(CNAME) },
	TypeNULL:       func() RR { return new(NULL) },
	TypeNXNAME:     func() RR { return new(NXNAME) },
	TypeHINFO:      func() RR { return new(HINFO) },
	TypeMB:         func() RR { return new(MB) },
	TypeMG:         func() RR { return new(MG) },
	TypeMINFO:      func() RR { return new(MINFO) },
	TypeMR:         func() RR { return new(MR) },
	TypeMF:         func() RR { return new(MF) },
	TypeMD:         func() RR { return new(MD) },
	TypeAFSDB:      func() RR { return new(AFSDB) },
	TypeX25:        func() RR { return new(X25) },
	TypeISDN:       func() RR { return new(ISDN) },
	TypeRT:         func() RR { return new(RT) },
	TypePTR:        func() RR { return new(PTR) },
	TypeRP:         func() RR { return new(RP) },
	TypeSOA:        func() RR { return new(SOA) },
	TypeSPF:        func() RR { return new(SPF) },
	TypeAVC:        func() RR { return new(AVC) },
	TypeWALLET:     func() RR { return new(WALLET) },
	TypeCLA:        func() RR { return new(CLA) },
	TypeIPN:        func() RR { return new(IPN) },
	TypeSRV:        func() RR { return new(SRV) },
	TypeNAPTR:      func() RR { return new(NAPTR) },
	TypeCERT:       func() RR { return new(CERT) },
	TypeDNAME:      func() RR { return new(DNAME) },
	TypePX:         func() RR { return new(PX) },
	TypeGPOS:       func() RR { return new(GPOS) },
	TypeLOC:        func() RR { return new(LOC) },
	TypeSIG:        func() RR { return new(SIG) },
	TypeNXT:        func() RR { return new(NXT) },
	TypeDLV:        func() RR { return new(DLV) },
	TypeCDS:        func() RR { return new(CDS) },
	TypeKX:         func() RR { return new(KX) },
	TypeTA:         func() RR { return new(TA) },
	TypeTALINK:     func() RR { return new(TALINK) },
	TypeSSHFP:      func() RR { return new(SSHFP) },
	TypeKEY:        func() RR { return new(KEY) },
	TypeCDNSKEY:    func() RR { return new(CDNSKEY) },
	TypeRKEY:       func() RR { return new(RKEY) },
	TypeNSAPPTR:    func() RR { return new(NSAPPTR) },
	TypeNSEC3PARAM: func() RR { return new(NSEC3PARAM) },
	TypeTKEY:       func() RR { return new(TKEY) },
	TypeURI:        func() RR { return new(URI) },
	TypeDHCID:      func() RR { return new(DHCID) },
	TypeTLSA:       func() RR { return new(TLSA) },
	TypeSMIMEA:     func() RR { return new(SMIMEA) },
	TypeHIP:        func() RR { return new(HIP) },
	TypeNINFO:      func() RR { return new(NINFO) },
	TypeNID:        func() RR { return new(NID) },
	TypeL32:        func() RR { return new(L32) },
	TypeL64:        func() RR { return new(L64) },
	TypeLP:         func() RR { return new(LP) },
	TypeEUI48:      func() RR { return new(EUI48) },
	TypeEUI64:      func() RR { return new(EUI64) },
	TypeCAA:        func() RR { return new(CAA) },
	TypeUID:        func() RR { return new(UID) },
	TypeGID:        func() RR { return new(GID) },
	TypeUINFO:      func() RR { return new(UINFO) },
	TypeEID:        func() RR { return new(EID) },
	TypeNIMLOC:     func() RR { return new(NIMLOC) },
	TypeOPENPGPKEY: func() RR { return new(OPENPGPKEY) },
	TypeCSYNC:      func() RR { return new(CSYNC) },
	TypeZONEMD:     func() RR { return new(ZONEMD) },
	TypeRESINFO:    func() RR { return new(RESINFO) },
	TypeSVCB:       func() RR { return new(SVCB) },
	TypeHTTPS:      func() RR { return new(HTTPS) },
	TypeDELEGPARAM: func() RR { return new(DELEGPARAM) },
	TypeDSYNC:      func() RR { return new(DSYNC) },
	TypeANY:        func() RR { return new(ANY) },
	TypeAXFR:       func() RR { return new(AXFR) },
	TypeIXFR:       func() RR { return new(IXFR) },
}

// RRToType is the reverse of TypeToRR.
func RRToType(rr RR) uint16 {
	switch rr.(type) {
	case *TSIG:
		return TypeTSIG
	case *DELEG:
		return TypeDELEG
	case *OPT:
		return TypeOPT
	case *NSEC3:
		return TypeNSEC3
	case *DNSKEY:
		return TypeDNSKEY
	case *DS:
		return TypeDS
	case *NSEC:
		return TypeNSEC
	case *RRSIG:
		return TypeRRSIG
	case *AAAA:
		return TypeAAAA
	case *A:
		return TypeA
	case *TXT:
		return TypeTXT
	case *NS:
		return TypeNS
	case *MX:
		return TypeMX
	case *CNAME:
		return TypeCNAME
	case *NULL:
		return TypeNULL
	case *NXNAME:
		return TypeNXNAME
	case *HINFO:
		return TypeHINFO
	case *MB:
		return TypeMB
	case *MG:
		return TypeMG
	case *MINFO:
		return TypeMINFO
	case *MR:
		return TypeMR
	case *MF:
		return TypeMF
	case *MD:
		return TypeMD
	case *AFSDB:
		return TypeAFSDB
	case *X25:
		return TypeX25
	case *ISDN:
		return TypeISDN
	case *RT:
		return TypeRT
	case *PTR:
		return TypePTR
	case *RP:
		return TypeRP
	case *SOA:
		return TypeSOA
	case *SPF:
		return TypeSPF
	case *AVC:
		return TypeAVC
	case *WALLET:
		return TypeWALLET
	case *CLA:
		return TypeCLA
	case *IPN:
		return TypeIPN
	case *SRV:
		return TypeSRV
	case *NAPTR:
		return TypeNAPTR
	case *CERT:
		return TypeCERT
	case *DNAME:
		return TypeDNAME
	case *PX:
		return TypePX
	case *GPOS:
		return TypeGPOS
	case *LOC:
		return TypeLOC
	case *SIG:
		return TypeSIG
	case *NXT:
		return TypeNXT
	case *DLV:
		return TypeDLV
	case *CDS:
		return TypeCDS
	case *KX:
		return TypeKX
	case *TA:
		return TypeTA
	case *TALINK:
		return TypeTALINK
	case *SSHFP:
		return TypeSSHFP
	case *KEY:
		return TypeKEY
	case *CDNSKEY:
		return TypeCDNSKEY
	case *RKEY:
		return TypeRKEY
	case *NSAPPTR:
		return TypeNSAPPTR
	case *NSEC3PARAM:
		return TypeNSEC3PARAM
	case *TKEY:
		return TypeTKEY
	case *URI:
		return TypeURI
	case *DHCID:
		return TypeDHCID
	case *TLSA:
		return TypeTLSA
	case *SMIMEA:
		return TypeSMIMEA
	case *HIP:
		return TypeHIP
	case *NINFO:
		return TypeNINFO
	case *NID:
		return TypeNID
	case *L32:
		return TypeL32
	case *L64:
		return TypeL64
	case *LP:
		return TypeLP
	case *EUI48:
		return TypeEUI48
	case *EUI64:
		return TypeEUI64
	case *CAA:
		return TypeCAA
	case *UID:
		return TypeUID
	case *GID:
		return TypeGID
	case *UINFO:
		return TypeUINFO
	case *EID:
		return TypeEID
	case *NIMLOC:
		return TypeNIMLOC
	case *OPENPGPKEY:
		return TypeOPENPGPKEY
	case *CSYNC:
		return TypeCSYNC
	case *ZONEMD:
		return TypeZONEMD
	case *RESINFO:
		return TypeRESINFO
	case *SVCB:
		return TypeSVCB
	case *HTTPS:
		return TypeHTTPS
	case *DELEGPARAM:
		return TypeDELEGPARAM
	case *DSYNC:
		return TypeDSYNC
	case *ANY:
		return TypeANY
	case *AXFR:
		return TypeAXFR
	case *IXFR:
		return TypeIXFR
	}
	if x, ok := rr.(Typer); ok {
		return x.Type()
	}
	return TypeNone
}

// TypeToString is a map of strings for each RR type.
// See [codeberg.org/miekg/dns/dnsutil.TypeToString] for a function that works better when the type is unknown.
var TypeToString = map[uint16]string{
	TypeTSIG:       "TSIG",
	TypeDELEG:      "DELEG",
	TypeOPT:        "OPT",
	TypeNSEC3:      "NSEC3",
	TypeDNSKEY:     "DNSKEY",
	TypeDS:         "DS",
	TypeNSEC:       "NSEC",
	TypeRRSIG:      "RRSIG",
	TypeAAAA:       "AAAA",
	TypeA:          "A",
	TypeTXT:        "TXT",
	TypeNS:         "NS",
	TypeMX:         "MX",
	TypeCNAME:      "CNAME",
	TypeNULL:       "NULL",
	TypeNXNAME:     "NXNAME",
	TypeHINFO:      "HINFO",
	TypeMB:         "MB",
	TypeMG:         "MG",
	TypeMINFO:      "MINFO",
	TypeMR:         "MR",
	TypeMF:         "MF",
	TypeMD:         "MD",
	TypeAFSDB:      "AFSDB",
	TypeX25:        "X25",
	TypeISDN:       "ISDN",
	TypeRT:         "RT",
	TypePTR:        "PTR",
	TypeRP:         "RP",
	TypeSOA:        "SOA",
	TypeSPF:        "SPF",
	TypeAVC:        "AVC",
	TypeWALLET:     "WALLET",
	TypeCLA:        "CLA",
	TypeIPN:        "IPN",
	TypeSRV:        "SRV",
	TypeNAPTR:      "NAPTR",
	TypeCERT:       "CERT",
	TypeDNAME:      "DNAME",
	TypePX:         "PX",
	TypeGPOS:       "GPOS",
	TypeLOC:        "LOC",
	TypeSIG:        "SIG",
	TypeNXT:        "NXT",
	TypeDLV:        "DLV",
	TypeCDS:        "CDS",
	TypeKX:         "KX",
	TypeTA:         "TA",
	TypeTALINK:     "TALINK",
	TypeSSHFP:      "SSHFP",
	TypeKEY:        "KEY",
	TypeCDNSKEY:    "CDNSKEY",
	TypeRKEY:       "RKEY",
	TypeNSEC3PARAM: "NSEC3PARAM",
	TypeTKEY:       "TKEY",
	TypeURI:        "URI",
	TypeDHCID:      "DHCID",
	TypeTLSA:       "TLSA",
	TypeSMIMEA:     "SMIMEA",
	TypeHIP:        "HIP",
	TypeNINFO:      "NINFO",
	TypeNID:        "NID",
	TypeL32:        "L32",
	TypeL64:        "L64",
	TypeLP:         "LP",
	TypeEUI48:      "EUI48",
	TypeEUI64:      "EUI64",
	TypeCAA:        "CAA",
	TypeUID:        "UID",
	TypeGID:        "GID",
	TypeUINFO:      "UINFO",
	TypeEID:        "EID",
	TypeNIMLOC:     "NIMLOC",
	TypeOPENPGPKEY: "OPENPGPKEY",
	TypeCSYNC:      "CSYNC",
	TypeZONEMD:     "ZONEMD",
	TypeRESINFO:    "RESINFO",
	TypeSVCB:       "SVCB",
	TypeHTTPS:      "HTTPS",
	TypeDELEGPARAM: "DELEGPARAM",
	TypeDSYNC:      "DSYNC",
	TypeANY:        "ANY",
	TypeAXFR:       "AXFR",
	TypeIXFR:       "IXFR",
	TypeNSAPPTR:    "NSAP-PTR",
}
