#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/assign/list_of.hpp>
+#include "dnsparser.hh"
std::vector<std::string> RCode::rcodes_s = boost::assign::list_of
("No Error")
return str;
}
+vector<DNSResourceRecord> convertRRS(const vector<DNSRecord>& in)
+{
+ vector<DNSResourceRecord> out;
+ for(const auto& d : in) {
+ DNSResourceRecord rr;
+ rr.qname = d.d_name;
+ rr.qtype = QType(d.d_type);
+ rr.ttl = d.d_ttl;
+ rr.content = d.d_content->getZoneRepresentation();
+ rr.auth = false;
+ rr.qclass = d.d_class;
+ out.push_back(rr);
+ }
+ return out;
+}
/** for use by DNSPacket, converts a SOAData class to a ascii line again */
string serializeSOAData(const SOAData &data);
string &attodot(string &str); //!< for when you need to insert an email address in the SOA
+
+vector<DNSResourceRecord> convertRRS(const vector<DNSRecord>& in);