summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-10-12 12:53:04 +0100
committerPeter Powell <petpow@saberuk.com>2019-10-13 22:05:19 +0100
commit51b9b4c9b404bd801be194644133be47bd035b58 (patch)
treee5ef99d606ae80a6d827a68ae9c9260507c59ce6 /src
parentdd24f8ac713793d5d5a7e959228937f48788ba66 (diff)
Add GetTypeStr to the DNS API.
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_dns.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index 8532179fb..c736034bf 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -538,6 +538,25 @@ class MyManager : public Manager, public Timer, public EventHandler
}
}
+ std::string GetTypeStr(QueryType qt) CXX11_OVERRIDE
+ {
+ switch (qt)
+ {
+ case QUERY_A:
+ return "A";
+ case QUERY_AAAA:
+ return "AAAA";
+ case QUERY_CNAME:
+ return "CNAME";
+ case QUERY_PTR:
+ return "PTR";
+ case QUERY_TXT:
+ return "TXT";
+ default:
+ return "UNKNOWN";
+ }
+ }
+
void OnEventHandlerError(int errcode) CXX11_OVERRIDE
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "UDP socket got an error event");