130 lines
4.6 KiB
C++
130 lines
4.6 KiB
C++
#include "teadns/types.h"
|
|
|
|
std::map<ts::dns::rrtype::value, const char*> ts::dns::rrtype::names{
|
|
{ts::dns::rrtype::A, "A"},
|
|
{ts::dns::rrtype::NS, "NS"},
|
|
{ts::dns::rrtype::MD, "MD"},
|
|
{ts::dns::rrtype::MF, "MF"},
|
|
{ts::dns::rrtype::CNAME, "CNAME"},
|
|
{ts::dns::rrtype::SOA, "SOA"},
|
|
{ts::dns::rrtype::MB, "MB"},
|
|
{ts::dns::rrtype::MG, "MG"},
|
|
{ts::dns::rrtype::MR, "MR"},
|
|
{ts::dns::rrtype::NULL_, "NULL_"},
|
|
{ts::dns::rrtype::WKS, "WKS"},
|
|
{ts::dns::rrtype::PTR, "PTR"},
|
|
{ts::dns::rrtype::HINFO, "HINFO"},
|
|
{ts::dns::rrtype::MINFO, "MINFO"},
|
|
{ts::dns::rrtype::MX, "MX"},
|
|
{ts::dns::rrtype::TXT, "TXT"},
|
|
{ts::dns::rrtype::RP, "RP"},
|
|
{ts::dns::rrtype::AFSDB, "AFSDB"},
|
|
{ts::dns::rrtype::X25, "X25"},
|
|
{ts::dns::rrtype::ISDN, "ISDN"},
|
|
{ts::dns::rrtype::RT, "RT"},
|
|
{ts::dns::rrtype::NSAP, "NSAP"},
|
|
{ts::dns::rrtype::NSAP_PTR, "NSAP_PTR"},
|
|
{ts::dns::rrtype::SIG, "SIG"},
|
|
{ts::dns::rrtype::KEY, "KEY"},
|
|
{ts::dns::rrtype::PX, "PX"},
|
|
{ts::dns::rrtype::GPOS, "GPOS"},
|
|
{ts::dns::rrtype::AAAA, "AAAA"},
|
|
{ts::dns::rrtype::LOC, "LOC"},
|
|
{ts::dns::rrtype::NXT, "NXT"},
|
|
{ts::dns::rrtype::EID, "EID"},
|
|
{ts::dns::rrtype::NIMLOC, "NIMLOC"},
|
|
{ts::dns::rrtype::SRV, "SRV"},
|
|
{ts::dns::rrtype::ATMA, "ATMA"},
|
|
{ts::dns::rrtype::NAPTR, "NAPTR"},
|
|
{ts::dns::rrtype::KX, "KX"},
|
|
{ts::dns::rrtype::CERT, "CERT"},
|
|
{ts::dns::rrtype::A6, "A6"},
|
|
{ts::dns::rrtype::DNAME, "DNAME"},
|
|
{ts::dns::rrtype::SINK, "SINK"},
|
|
{ts::dns::rrtype::OPT, "OPT"},
|
|
{ts::dns::rrtype::APL, "APL"},
|
|
{ts::dns::rrtype::DS, "DS"},
|
|
{ts::dns::rrtype::SSHFP, "SSHFP"},
|
|
{ts::dns::rrtype::IPSECKEY, "IPSECKEY"},
|
|
{ts::dns::rrtype::RRSIG, "RRSIG"},
|
|
{ts::dns::rrtype::NSEC, "NSEC"},
|
|
{ts::dns::rrtype::DNSKEY, "DNSKEY"},
|
|
{ts::dns::rrtype::DHCID, "DHCID"},
|
|
{ts::dns::rrtype::NSEC3, "NSEC3"},
|
|
{ts::dns::rrtype::NSEC3PARAM, "NSEC3PARAM"},
|
|
{ts::dns::rrtype::TLSA, "TLSA"},
|
|
{ts::dns::rrtype::SMIMEA, "SMIMEA"},
|
|
{ts::dns::rrtype::Unassigned, "Unassigned"},
|
|
{ts::dns::rrtype::HIP, "HIP"},
|
|
{ts::dns::rrtype::NINFO, "NINFO"},
|
|
{ts::dns::rrtype::RKEY, "RKEY"},
|
|
{ts::dns::rrtype::TALINK, "TALINK"},
|
|
{ts::dns::rrtype::CDS, "CDS"},
|
|
{ts::dns::rrtype::CDNSKEY, "CDNSKEY"},
|
|
{ts::dns::rrtype::OPENPGPKEY, "OPENPGPKEY"},
|
|
{ts::dns::rrtype::CSYNC, "CSYNC"},
|
|
{ts::dns::rrtype::ZONEMD, "ZONEMD"},
|
|
{ts::dns::rrtype::SPF, "SPF"},
|
|
{ts::dns::rrtype::UINFO, "UINFO"},
|
|
{ts::dns::rrtype::UID, "UID"},
|
|
{ts::dns::rrtype::GID, "GID"},
|
|
{ts::dns::rrtype::UNSPEC, "UNSPEC"},
|
|
{ts::dns::rrtype::NID, "NID"},
|
|
{ts::dns::rrtype::L32, "L32"},
|
|
{ts::dns::rrtype::L64, "L64"},
|
|
{ts::dns::rrtype::LP, "LP"},
|
|
{ts::dns::rrtype::EUI48, "EUI48"},
|
|
{ts::dns::rrtype::EUI64, "EUI64"},
|
|
{ts::dns::rrtype::TKEY, "TKEY"},
|
|
{ts::dns::rrtype::TSIG, "TSIG"},
|
|
{ts::dns::rrtype::IXFR, "IXFR"},
|
|
{ts::dns::rrtype::AXFR, "AXFR"},
|
|
{ts::dns::rrtype::MAILB, "MAILB"},
|
|
{ts::dns::rrtype::MAILA, "MAILA"},
|
|
{ts::dns::rrtype::ANY, "ANY"},
|
|
{ts::dns::rrtype::URI, "URI"},
|
|
{ts::dns::rrtype::CAA, "CAA"},
|
|
{ts::dns::rrtype::AVC, "AVC"},
|
|
{ts::dns::rrtype::DOA, "DOA"},
|
|
{ts::dns::rrtype::AMTRELAY, "AMTRELAY"},
|
|
{ts::dns::rrtype::TA, "TA"},
|
|
{ts::dns::rrtype::DLV, "DLV"},
|
|
{ts::dns::rrtype::Reserved, "Reserved"},
|
|
};
|
|
|
|
|
|
std::map<ts::dns::rrclass::value, const char*> ts::dns::rrclass::names{
|
|
{ts::dns::rrclass::IN, "IN"},
|
|
{ts::dns::rrclass::CH, "CH"},
|
|
{ts::dns::rrclass::HS, "HS"},
|
|
{ts::dns::rrclass::QCLASS_ANY, "QCLASS_ANY"},
|
|
{ts::dns::rrclass::QCLASS_NONE, "QCLASS_NONE"},
|
|
};
|
|
|
|
|
|
std::map<ts::dns::rcode::value, const char*> ts::dns::rcode::names{
|
|
{ts::dns::rcode::NOERROR, "NOERROR"},
|
|
{ts::dns::rcode::FORMERR, "FORMERR"},
|
|
{ts::dns::rcode::SERVFAIL, "SERVFAIL"},
|
|
{ts::dns::rcode::NXDOMAIN, "NXDOMAIN"},
|
|
{ts::dns::rcode::NOTIMP, "NOTIMP"},
|
|
{ts::dns::rcode::REFUSED, "REFUSED"},
|
|
{ts::dns::rcode::YXDOMAIN, "YXDOMAIN"},
|
|
{ts::dns::rcode::XRRSET, "XRRSET"},
|
|
{ts::dns::rcode::NOTAUTH, "NOTAUTH"},
|
|
{ts::dns::rcode::NOTZONE, "NOTZONE"},
|
|
};
|
|
|
|
|
|
std::map<ts::dns::rcode::value, const char*> ts::dns::rcode::descriptions{
|
|
{ts::dns::rcode::NOERROR, "DNS Query completed successfully"},
|
|
{ts::dns::rcode::FORMERR, "DNS Query Format Error"},
|
|
{ts::dns::rcode::SERVFAIL, "Server failed to complete the DNS request"},
|
|
{ts::dns::rcode::NXDOMAIN, "Domain name does not exist. "},
|
|
{ts::dns::rcode::NOTIMP, "Function not implemented"},
|
|
{ts::dns::rcode::REFUSED, "The server refused to answer for the query"},
|
|
{ts::dns::rcode::YXDOMAIN, "Name that should not exist, does exist"},
|
|
{ts::dns::rcode::XRRSET, "RRset that should not exist, does exist"},
|
|
{ts::dns::rcode::NOTAUTH, "Server not authoritative for the zone"},
|
|
{ts::dns::rcode::NOTZONE, "Name not in zone"},
|
|
}; |