X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fcommon.py;h=ef09a34418612634d049b5faf63105e51d223ff3;hb=19ec8900bbe23758c4ab2b731f4f6c3207c03ad3;hp=5ab9b5f166f14f986be91b020db2382a791edfda;hpb=36a54466cf29666e492b48c4308d159d5cfcb11a;p=djbdns-logparse.git diff --git a/djbdns/common.py b/djbdns/common.py index 5ab9b5f..ef09a34 100644 --- a/djbdns/common.py +++ b/djbdns/common.py @@ -13,30 +13,96 @@ TIMESTAMP_PAT = r'[\d-]+ [\d:\.]+' # # https://en.wikipedia.org/wiki/List_of_DNS_record_types # -# Note that mapping here is non-exhaustive, and that tinydns will -# log responses for record types that it does not know about. +# This list *should* be exhaustive, and we hope it is, because the log +# parser will now crash if it encounters a type it doesn't know about. QUERY_TYPE_NAME = { 1: "a", 2: "ns", + 3: "md", + 4: "mf", 5: "cname", 6: "soa", + 7: "mb", + 8: "mg", + 9: "mr", + 10: "null", + 11: "wks", 12: "ptr", 13: "hinfo", + 14: "minfo", 15: "mx", 16: "txt", 17: "rp", + 18: "afsdb", + 19: "x25", + 20: "isdn", + 21: "rt", + 22: "nsap", + 23: "nsap-ptr", 24: "sig", 25: "key", + 26: "px", + 27: "gpos", 28: "aaaa", + 29: "loc", + 30: "nxt", + 31: "eid", + 32: "nimloc", 33: "srv", + 34: "atma", 35: "naptr", + 36: "kx", + 37: "cert", 38: "a6", + 39: "dname", + 40: "sink", + 41: "opt", + 42: "apl", + 43: "ds", + 44: "sshfp", + 45: "ipseckey", + 46: "rrsig", + 47: "nsec", 48: "dnskey", + 49: "dhcid", + 50: "nsec3", + 51: "nsec3param", 52: "tlsa", + 53: "smimea", + 55: "hip", + 56: "ninfo", + 57: "rkey", + 58: "talink", + 59: "cds", + 60: "cdnskey", + 61: "openpgpkey", + 62: "csync", + 63: "zonemd", + 64: "svcb", 65: "https", + 99: "spf", + 100: "uinfo", + 101: "uid", + 102: "gid", + 103: "unspec", + 104: "nid", + 105: "l32", + 106: "l64", + 107: "lp", + 108: "eui48", + 109: "euc64", + 249: "tkey", + 250: "tsig", + 251: "ixfr", 252: "axfr", + 253: "mailb", + 254: "maila", 255: "any", - 257: "caa" + 256: "uri", + 257: "caa", + 259: "doa", + 32768: "ta", + 32769: "dlv" } def convert_ip(ip : str) -> str: