From: Remi Gacogne Date: Tue, 14 Jan 2025 10:17:38 +0000 (+0100) Subject: dnsdist: Document `dnsdist_ffi_stat_node_get_children_*` return children+node stats X-Git-Tag: dnsdist-2.0.0-alpha1~170^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=320c048f2a53746dcade83d6881a573a139fd4d9;p=thirdparty%2Fpdns.git dnsdist: Document `dnsdist_ffi_stat_node_get_children_*` return children+node stats 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. --- diff --git a/pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h b/pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h index d681c8794b..5698f28993 100644 --- a/pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h +++ b/pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h @@ -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")));