]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Document `dnsdist_ffi_stat_node_get_children_*` return children+node stats 15037/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 14 Jan 2025 10:17:38 +0000 (11:17 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 14 Jan 2025 10:17:38 +0000 (11:17 +0100)
The `dnsdist_ffi_stat_node_get_children_*` methods return the sum of
the queries or responses received for the children of a node AND the node
itself. It's quite unexpected but breaking the existing behaviour now would be painful.

pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h

index d681c8794b430d1653644928b251f5525066ef86..5698f28993a22b2efcc0d71aa51b309e31f71c0a 100644 (file)
@@ -34,6 +34,10 @@ void dnsdist_ffi_stat_node_get_full_name_raw(const dnsdist_ffi_stat_node_t* node
 
 unsigned int dnsdist_ffi_stat_node_get_children_count(const dnsdist_ffi_stat_node_t* node) __attribute__((visibility("default")));
 
+/* Note that dnsdist_ffi_stat_node_get_children_* methods return the sum of
+   the queries or responses received for the children of a node AND the node
+   itself. It's quite unexpected but breaking the existing behaviour now would be painful.
+*/
 uint64_t dnsdist_ffi_stat_node_get_children_queries_count(const dnsdist_ffi_stat_node_t* node) __attribute__((visibility("default")));
 uint64_t dnsdist_ffi_stat_node_get_children_noerrors_count(const dnsdist_ffi_stat_node_t* node) __attribute__((visibility("default")));
 uint64_t dnsdist_ffi_stat_node_get_children_nxdomains_count(const dnsdist_ffi_stat_node_t* node) __attribute__((visibility("default")));