|
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 | |
|---|
| 6 | struct lua_State; |
|---|
| 7 | |
|---|
| 8 | class PowerDNSLua |
|---|
| 9 | { |
|---|
| 10 | public: |
|---|
| 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); |
|---|
| 16 | private: |
|---|
| 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 |
|---|