1
#ifndef PDNS_REC_CHANNEL
2
#define PDNS_REC_CHANNEL
5
#if !defined SOLARIS8 && !defined WIN32
15
struct sockaddr_un {};
18
/** this class is used both to send and answer channel commands to the PowerDNS Recursor */
19
class RecursorControlChannel
22
RecursorControlChannel();
24
~RecursorControlChannel();
26
int listen(const std::string& filename);
27
void connect(const std::string& path, const std::string& filename);
29
uint64_t getStat(const std::string& name);
31
void send(const std::string& msg, const std::string* remote=0);
32
std::string recv(std::string* remote=0);
36
struct sockaddr_un d_local;
39
class RecursorControlParser
42
RecursorControlParser();
43
static void nop(void){}
44
typedef void func_t(void);
45
std::string getAnswer(const std::string& question, func_t** func);