~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to pdns/rec_channel.hh

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Mohlmann, Matthijs Mohlmann, Christoph Haas
  • Date: 2007-04-15 23:23:39 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070415232339-5x3scc8gx04e50um
Tags: 2.9.21-1
[ Matthijs Mohlmann ]
* New upstream release. (Closes: #420294)
* Remove meta pdns package.
* Added new sqlite3 backend package.
* Months and minutes where mixed up. (Closes: #406462)
* Case sensitivity in bind backend caused PowerDNS to not serve a certain
  zone. (Closes: #406461)
* Bind backend forgot about zones on a notify. (Closes: #398213)

[ Christoph Haas ]
* Documented incorporated backend bind. (Closes: #415471)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef PDNS_REC_CHANNEL
 
2
#define PDNS_REC_CHANNEL
 
3
#include <string>
 
4
#include <map>
 
5
#if !defined SOLARIS8 && !defined WIN32
 
6
#include <stdint.h>
 
7
#elif defined WIN32
 
8
#include "utility.hh"
 
9
#endif
 
10
 
 
11
#ifndef WIN32
 
12
#include <sys/un.h>
 
13
#else
 
14
// ?
 
15
struct sockaddr_un {};
 
16
#endif
 
17
 
 
18
/** this class is used both to send and answer channel commands to the PowerDNS Recursor */
 
19
class RecursorControlChannel
 
20
{
 
21
public:
 
22
  RecursorControlChannel();
 
23
 
 
24
  ~RecursorControlChannel();
 
25
 
 
26
  int listen(const std::string& filename);
 
27
  void connect(const std::string& path, const std::string& filename);
 
28
 
 
29
  uint64_t getStat(const std::string& name);
 
30
 
 
31
  void send(const std::string& msg, const std::string* remote=0);
 
32
  std::string recv(std::string* remote=0);
 
33
 
 
34
  int d_fd;
 
35
private:
 
36
  struct sockaddr_un d_local;
 
37
};
 
38
 
 
39
class RecursorControlParser
 
40
{
 
41
public:
 
42
  RecursorControlParser();
 
43
  static void nop(void){}
 
44
  typedef void func_t(void);
 
45
  std::string getAnswer(const std::string& question, func_t** func);
 
46
};
 
47
 
 
48
 
 
49
#endif