Public Suffix List. In general it will tell you the 'registered domain' for a given
name.
+`getRecursorThreadId()` returns an unsigned integer identifying the thread
+handling the current request.
+
## DNS64
The `getFakeAAAARecords` and `getFakePTRRecords` followupFunctions can be used
to implement DNS64. See [DNS64 support in the PowerDNS Recursor](dns64.md) for
d_lw->registerFunction("incBy", &DynMetric::incBy);
d_lw->registerFunction("set", &DynMetric::set);
d_lw->registerFunction("get", &DynMetric::get);
-
+
+ d_lw->writeFunction("getRecursorThreadId", []() {
+ return getRecursorThreadId();
+ });
+
ifstream ifs(fname);
if(!ifs) {
#endif
string GenUDPQueryResponse(const ComboAddress& dest, const string& query);
+unsigned int getRecursorThreadId();
class LuaContext;
#endif
__thread FDMultiplexer* t_fdm;
-__thread unsigned int t_id;
+static __thread unsigned int t_id;
unsigned int g_maxTCPPerClient;
unsigned int g_networkTimeoutMsec;
uint64_t g_latencyStatSize;
return theArg;
}
+unsigned int getRecursorThreadId()
+{
+ return t_id;
+}
void handleTCPClientWritable(int fd, FDMultiplexer::funcparam_t& var);