DNS Developer Notes

// https://www.ionos.com/digitalguide/hosting/technical-matters/dns-records/

   int number;
   char *code;
   char *desc;

struct RECORDTYPE recordtype[88] = 
   {    0,"error",        "Not Found"},
   {    1,"A",            "Address. Specifies a host's IPv4 address."},
   {    2,"NS",           "Nameserver. Clarifies the zone's authority."},
   {    3,"MD",           "Mail Destination was replaced by the MX record (obsolete)."},
   {    4,"MF",           "Mail Forwarder was replaced by the MX record (obsolete)."},
   {    5,"CNAME",        "Canonical Name defines an alias."},
   {    6,"SOA",          "Start of Authority discloses details about the zone."},
   {    7,"MB",           "Mailbox Domain Name is experimental."},
   {    8,"MG",           "Mail Group Member is experimental."},
   {    9,"MR",           "Mail Rename Domain Name is experimental."},
   {   10,"NULL",         "Null Resource is experimental."},
   {   11,"WKS",          "Well Known Service was used for mail forwarding (obsolete)."},
   {   12,"PTR",          "Pointer is intended for reverse lookup."},
   {   13,"HINFO",        "Host Information supplies the host's hardware and software details."},
   {   14,"MINFO",        "Mailbox Information is experimental."},
   {   15,"MX",           "Mail Exchange. Email servers for this domain."},
   {   16,"TXT",          "Text provides the option of entering additional texts."},
   {   17,"RP",           "Responsible Person provides information on the responsible person."},
   {   18,"AFSDB",        "AFS Database is specifically intended for AFS clients."},
   {   19,"X25",          "X.25 PSDN Address provides details on encapsulation via X.25 (obsolete)."},
   {   20,"ISDN",         "This record assigns the DNS name an ISDN number (obsolete)."},
   {   21,"RT",           "Route Through Record provides route-through binding without a WAN address (obsolete)."},
   {   22,"NSAP",         "This record enables assignment of domain names to Network Service Access Points (obsolete)."},
   {   23,"NSAP-PTR",     "NSAP Pointer was replaced by PTR (obsolete)."},
   {   24,"SIG",          "Signature was replaced by RRSIG (obsolete)."},
   {   25,"KEY",          "Key was replaced by IPSECKEY (obsolete)."},
   {   26,"PX",           "Pointer to X.400 specifies MIXER mapping regulations (obsolete)."},
   {   27,"GPOS",         "Geographical Position was replaced by LOC (obsolete)."},
   {   28,"AAAA",         "AAAA provides a host's IPv6 address."},
   {   29,"LOC",          "Location contains location information."},
   {   30,"NXT",          "Next was replaced by NSEC (obsolete)."},
   {   31,"EID",          "Endpoint Identifier is intended for Nimrod Routing Architecture (obsolete)."},
   {   32,"NIMLOC",       "Nimrod Locator is intended for Nimrod Routing Architecture (obsolete)."},
   {   33,"SRV",          "Service Locator provides information about other services."},
   {   34,"ATMA",         "ATM Address provides information when there are asynchronous transfer modes (obsolete)."},
   {   35,"NAPTR",        "Naming Authority Pointer is an A record extension that permits the search pattern (regular expressions)."},
   {   36,"KX",           "Key Exchanger enables key management for cryptography."},
   {   37,"CERT",         "Cert saves certificates."},
   {   38,"A6",           "A6 was replaced by AAAA."},
   {   39,"DNAME",        "Delegation Name specifies the aliases for complete domains."},
   {   40,"SINK",         "Kitchen Sink enables the storage of various data (obsolete)."},
   {   41,"OPT",          "Option is a pseudo-record when there is a DNS extension mechanism (EDNS)."},
   {   42,"APL",          "Address Prefix List lists address areas in CIDR format."},
   {   43,"DS",           "Delegation Signer identifies DNSSEC-signed zones."},
   {   44,"SSHFP",        "SSH Public Key Fingerprint discloses the fingerprint for SSH keys."},
   {   45,"IPSECKEY",     "IPsec Key contains an IPsec key."},
   {   46,"RRSIG",        "RR Signature contains a digital signature for DNSSEC."},
   {   47,"NSEC",         "Next Secure threads signed zones in DNSSEC."},
   {   48,"DNSKEY",       "DNS Key contains a public key for DNSSEC."},
   {   49,"DHCID",        "DHCP Identifier links domain names with DHCP clients."},
   {   50,"NSEC3",        "Next Secure 3 is an alternative to NSEC."},
   {   51,"NSEC3PARAM",   "This record contains Parameter for NSEC3."},
   {   52,"TLSA",         "This record issues an TLSA Certificate Association with a domain name pertaining to DANE."},
   {   53,"SMIMEA",       "This record issues a S/MIME Certificate Association with a domain name."},
   {   55,"HIP",          "Host Identity Protocol separates endpoint markers and positioning functions from IP addresses."},
   {   56,"NINFO",        "NINFO provides information on the zone's status (same structure as TXT; obsolete)."},
   {   57,"RKEY",         "RKEY saves keys (same structure as KEY and DNSKEY; obsolete)."},
   {   58,"TALINK",       "Trust Anchor Link connects two domain names (obsolete)."},
   {   59,"CDS",          "Child DS is a child copy of a DS record."},
   {   60,"CDNSKEY",      "Child DNSKEY is a child copy of a DNSKEY record."},
   {   61,"OPENPGPKEY",   "OpenPGP Key discloses public keys."},
   {   62,"CSYNC",        "Child-to-Parent Synchronization enables the reconciliation of parent and child zones (obsolete)."},
   {   63,"ZONEMD",       "Message Digest for DNS Zone is experimental (obsolete)."},
   {   99,"SPF",          "Sender Policy Framework was replaced by the TXT record (obsolete)."},
   {  100,"UINFO",        "Reserved."},
   {  101,"UID",          "Reserved."},
   {  102,"GID",          "Reserved."},
   {  103,"UNSPEC",       "Reserved."},
   {  104,"NID",          "NodeID is experimental."},
   {  105,"L32",          "32-bit Locator is experimental."},
   {  106,"L64",          "64-bit Locator is experimental."},
   {  107,"LP",           "Locator Pointer is experimental."},
   {  108,"EUI48",        "48-bit Extended Unique Identifier encrypts addresses."},
   {  109,"EUI64",        "64-bit Extended Unique Identifier encrypts addresses."},
   {  249,"TKEY",         "Transaction Key enables the exchange of secret keys."},
   {  250,"TSIG",         "Transaction Signature is used for authentication."},
   {  251,"IXFR",         "Incremental Zone Transfer enables zone file components to be updated on a second server (obsolete)."},
   {  252,"AXFR",         "AFXR transfers a complete zone file to a second server (obsolete)."},
   {  253,"MAILB",        "Mailbox queries records related to a mailbox (obsolete)."},
   {  254,"MAILA",        "Mail Agent was replaced by MX-Record (obsolete)."},
   {  255,"*",            "* requests all records (obsolete)."},
   {  256,"URI",          "Uniform Resource Identifier discloses the mapping of host names to URIs."},
   {  257,"CAA",          "Certificate Authority Authorization specifies a domain's possible CAs."},
   {  258,"AVC",          "Application Visibility and Control contains application metadata for DNS-AS (obsolete)."},
   {  259,"DOA",          "DOA is no longer active (obsolete)."},
   {  260,"AMTRELAY",     "Automatic Multicast Tunneling Relay enables the finding of AMT relays (obsolete)."},
   {32768,"TA",           "DNSSEC Trust Authorities enables DNSSEC without signed root."},
   {32769,"DLV",          "DNSSEC Lookaside Validation discloses trust anchors beyond the standard DNS chain."},

     // {0,NULL,NULL}

int recordtypecnt = 88;

int findrecordtype(char *intype)
   int i;
      if (strcmp(intype,recordtype[i].code) == 0)
         return i;
   return 0;