#include "misc.hh"
#include "communicator.hh"
#include "dnsseckeeper.hh"
+#include "nameserver.hh"
static bool s_pleasequit;
static string d_status;
return os.str();
}
+string DLQTypesHandler(const vector<string>&parts, Utility::pid_t ppid)
+{
+ ostringstream os;
+ typedef map<uint16_t, uint64_t> qtmap;
+ qtmap stats = g_rs.getQTypeResponseCounts();
+ BOOST_FOREACH(qtmap::value_type &i, stats)
+ {
+ os<<QType(i.first).getName()<<"("<<i.first<<"):"<<i.second<<"; ";
+ }
+ os<<endl;
+ return os.str();
+}
string DLSettingsHandler(const vector<string>&parts, Utility::pid_t ppid)
{
string DLUptimeHandler(const vector<string>&parts, Utility::pid_t ppid);
string DLSettingsHandler(const vector<string>&parts, Utility::pid_t ppid);
string DLCCHandler(const vector<string>&parts, Utility::pid_t ppid);
+string DLQTypesHandler(const vector<string>&parts, Utility::pid_t ppid);
string DLStatusHandler(const vector<string>&parts, Utility::pid_t ppid);
string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid);
string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid);
#include "statbag.hh"
#include "namespaces.hh"
#include "dnspacket.hh"
+#include "responsestats.hh"
/** This is the main class. It opens a socket on udp port 53 and waits for packets. Those packets can
be retrieved with the receive() member function, which returns a DNSPacket.
bool AddressIsUs(const ComboAddress& remote);
+extern ResponseStats g_rs;
+
#endif
DynListener::registerFunc("VERSION",&DLVersionHandler, "get instance version");
DynListener::registerFunc("PURGE",&DLPurgeHandler, "purge entries from packet cache", "[<record>]");
DynListener::registerFunc("CCOUNTS",&DLCCHandler, "get cache statistics");
+ DynListener::registerFunc("QTYPES", &DLQTypesHandler, "get QType statistics");
DynListener::registerFunc("SET",&DLSettingsHandler, "set config variables", "<var> <value>");
DynListener::registerFunc("RETRIEVE",&DLNotifyRetrieveHandler, "retrieve slave domain", "<domain>");
DynListener::registerFunc("CURRENT-CONFIG",&DLCurrentConfigHandler, "Retrieve the current configuration");