From 320c048f2a53746dcade83d6881a573a139fd4d9 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 14 Jan 2025 11:17:38 +0100 Subject: [PATCH] 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. --- pdns/dnsdistdist/dnsdist-lua-inspection-ffi.h | 4 ++++ 1 file changed, 4 insertions(+) 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"))); -- 2.47.2