{ "addDynBlockSMT", true, "names, message[, seconds [, action]]", "block the set of names with message `msg`, for `seconds` seconds (10 by default), applying `action` (default to the one set with `setDynBlocksAction()`)" },
{ "addLocal", true, "addr [, {doTCP=true, reusePort=false, tcpFastOpenQueueSize=0, interface=\"\", cpus={}}]", "add `addr` to the list of addresses we listen on" },
{ "addCacheHitResponseAction", true, "DNS rule, DNS response action [, {uuid=\"UUID\", name=\"name\"}}]", "add a cache hit response rule" },
+ { "addCacheInsertedResponseAction", true, "DNS rule, DNS response action [, {uuid=\"UUID\", name=\"name\"}}]", "add a cache inserted response rule" },
{ "addResponseAction", true, "DNS rule, DNS response action [, {uuid=\"UUID\", name=\"name\"}}]", "add a response rule" },
{ "addSelfAnsweredResponseAction", true, "DNS rule, DNS response action [, {uuid=\"UUID\", name=\"name\"}}]", "add a self-answered response rule" },
{ "addTLSLocal", true, "addr, certFile(s), keyFile(s) [,params]", "listen to incoming DNS over TLS queries on the specified address using the specified certificate (or list of) and key (or list of). The last parameter is a table" },
{ "getServers", true, "", "returns a table with all defined servers" },
{ "getStatisticsCounters", true, "", "returns a map of statistic counters" },
{ "getTopCacheHitResponseRules", true, "[top]", "return the `top` cache-hit response rules" },
+ { "getTopCacheInsertedResponseRules", true, "[top]", "return the `top` cache-inserted response rules" },
{ "getTopResponseRules", true, "[top]", "return the `top` response rules" },
{ "getTopRules", true, "[top]", "return the `top` rules" },
{ "getTopSelfAnsweredResponseRules", true, "[top]", "return the `top` self-answered response rules" },
{ "MaxQPSRule", true, "qps", "matches traffic **not** exceeding this qps limit" },
{ "mvCacheHitResponseRule", true, "from, to", "move cache hit response rule 'from' to a position where it is in front of 'to'. 'to' can be one larger than the largest rule" },
{ "mvCacheHitResponseRuleToTop", true, "", "move the last cache hit response rule to the first position" },
+ { "mvCacheInsertedResponseRule", true, "from, to", "move cache inserted response rule 'from' to a position where it is in front of 'to'. 'to' can be one larger than the largest rule" },
+ { "mvCacheInsertedResponseRuleToTop", true, "", "move the last cache inserted response rule to the first position" },
{ "mvResponseRule", true, "from, to", "move response rule 'from' to a position where it is in front of 'to'. 'to' can be one larger than the largest rule" },
{ "mvResponseRuleToTop", true, "", "move the last response rule to the first position" },
{ "mvRule", true, "from, to", "move rule 'from' to a position where it is in front of 'to'. 'to' can be one larger than the largest rule, in which case the rule will be moved to the last position" },
{ "requestTCPStatesDump", true, "", "Request a dump of the TCP states (incoming connections, outgoing connections) during the next scan. Useful for debugging purposes only" },
{ "rmACL", true, "netmask", "remove netmask from ACL" },
{ "rmCacheHitResponseRule", true, "id", "remove cache hit response rule in position 'id', or whose uuid matches if 'id' is an UUID string, or finally whose name matches if 'id' is a string but not a valid UUID" },
+ { "rmCacheInsertedResponseRule", true, "id", "remove cache inserted response rule in position 'id', or whose uuid matches if 'id' is an UUID string, or finally whose name matches if 'id' is a string but not a valid UUID" },
{ "rmResponseRule", true, "id", "remove response rule in position 'id', or whose uuid matches if 'id' is an UUID string, or finally whose name matches if 'id' is a string but not a valid UUID" },
{ "rmRule", true, "id", "remove rule in position 'id', or whose uuid matches if 'id' is an UUID string, or finally whose name matches if 'id' is a string but not a valid UUID" },
{ "rmSelfAnsweredResponseRule", true, "id", "remove self-answered response rule in position 'id', or whose uuid matches if 'id' is an UUID string, or finally whose name matches if 'id' is a string but not a valid UUID" },
{ "TimedIPSetRule", true, "", "Create a rule which matches a set of IP addresses which expire"},
{ "topBandwidth", true, "top", "show top-`top` clients that consume the most bandwidth over length of ringbuffer" },
{ "topCacheHitResponseRules", true, "[top][, vars]", "show `top` cache-hit response rules" },
+ { "topCacheInsertedResponseRules", true, "[top][, vars]", "show `top` cache-inserted response rules" },
{ "topClients", true, "n", "show top-`n` clients sending the most queries over length of ringbuffer" },
{ "topQueries", true, "n[, labels]", "show top 'n' queries, as grouped when optionally cut down to 'labels' labels" },
{ "topResponses", true, "n, kind[, labels]", "show top 'n' responses with RCODE=kind (0=NO Error, 2=ServFail, 3=NXDomain), as grouped when optionally cut down to 'labels' labels" },
return rulesToString(getTopRules(*rules, top.get_value_or(10)), vars);
});
- luaCtx.writeFunction("getCacheHitResponseRules", [](boost::optional<unsigned int> top) {
+ luaCtx.writeFunction("getTopCacheHitResponseRules", [](boost::optional<unsigned int> top) {
setLuaNoSideEffect();
auto rules = g_cachehitrespruleactions.getLocal();
return getTopRules(*rules, top.get_value_or(10));
});
- luaCtx.writeFunction("topCacheHitRules", [](boost::optional<unsigned int> top, boost::optional<ruleparams_t> vars) {
+ luaCtx.writeFunction("topCacheHitResponseRules", [](boost::optional<unsigned int> top, boost::optional<ruleparams_t> vars) {
setLuaNoSideEffect();
auto rules = g_cachehitrespruleactions.getLocal();
return rulesToString(getTopRules(*rules, top.get_value_or(10)), vars);
});
+ luaCtx.writeFunction("getTopCacheInsertedResponseRules", [](boost::optional<unsigned int> top) {
+ setLuaNoSideEffect();
+ auto rules = g_cacheInsertedRespRuleActions.getLocal();
+ return getTopRules(*rules, top.get_value_or(10));
+ });
+
+ luaCtx.writeFunction("topCacheInsertedResponseRules", [](boost::optional<unsigned int> top, boost::optional<ruleparams_t> vars) {
+ setLuaNoSideEffect();
+ auto rules = g_cacheInsertedRespRuleActions.getLocal();
+ return rulesToString(getTopRules(*rules, top.get_value_or(10)), vars);
+ });
+
luaCtx.writeFunction("getTopResponseRules", [](boost::optional<unsigned int> top) {
setLuaNoSideEffect();
auto rules = g_respruleactions.getLocal();