root/trunk/pdns/pdns/lua-pdns-recursor.hh @ 1309

Revision 1309, 0.9 KB (checked in by ahu, 5 years ago)

send Lua the 'local' address too

Line 
1#ifndef PDNS_LUA_PDNS_RECURSOR_HH
2#define PDNS_LUA_PDNS_RECURSOR_HH
3#include "dns.hh"
4#include "iputils.hh"
5
6struct lua_State;
7
8class PowerDNSLua
9{
10public:
11  explicit PowerDNSLua(const std::string& fname);
12  ~PowerDNSLua();
13  void reload();
14  bool preresolve(const ComboAddress& remote,const ComboAddress& local, const string& query, const QType& qtype, vector<DNSResourceRecord>& res, int& ret);
15  bool nxdomain(const ComboAddress& remote, const ComboAddress& local, const string& query, const QType& qtype, vector<DNSResourceRecord>& res, int& ret);
16private:
17  lua_State* d_lua;
18  bool passthrough(const string& func, const ComboAddress& remote,const ComboAddress& local, const string& query, const QType& qtype, vector<DNSResourceRecord>& ret, int& res);
19  bool getFromTable(const std::string& key, std::string& value);
20  bool getFromTable(const std::string& key, uint32_t& value);
21  bool d_failed;
22};
23
24#endif
Note: See TracBrowser for help on using the browser.