From a1d0d0e6e6bba2c7c2ea8050d62baba8332dcee0 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 5 Nov 2015 09:20:13 +0100 Subject: [PATCH] helper to extract the right DNSResourceRecord type. --- pdns/dnsparser.hh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index 0834c3b7a..f08aa0cc8 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -358,4 +358,11 @@ private: string simpleCompress(const string& label, const string& root=""); void simpleExpandTo(const string& label, unsigned int frompos, string& ret); void ageDNSPacket(std::string& packet, uint32_t seconds); + +template +std::shared_ptr getRR(const DNSRecord& dr) +{ + return std::dynamic_pointer_cast(dr.d_content); +} + #endif -- 2.40.0