]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print out sizes of configuration things, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 20 Jan 2023 13:04:19 +0000 (08:04 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 20 Jan 2023 13:04:19 +0000 (08:04 -0500)
src/bin/radsizes.c

index 43d2273c9f03418378ab48024ef64ff3a6b063a8..32d994ed961bdaa1a7bc5e852ca0d83c86e83c96 100644 (file)
@@ -2,13 +2,14 @@
 
 #include <freeradius-devel/unlang/xlat_priv.h>
 #include <freeradius-devel/server/tmpl.h>
+#include <freeradius-devel/server/cf_priv.h>
 #include <freeradius-devel/util/value.h>
 #include <freeradius-devel/util/rb.h>
 #include <freeradius-devel/util/tlist.h>
 
 int main(UNUSED int argc, UNUSED char **argv)
 {
-#define SIZEOF(_struct)        printf("%-24s\t%zu bytes\n", STRINGIFY(_struct), sizeof(_struct))
+#define SIZEOF(_struct)        printf("%-24s\t%zu\tbytes\n", STRINGIFY(_struct), sizeof(_struct))
 
        SIZEOF(fr_dict_attr_t);
        SIZEOF(fr_dict_attr_flags_t);
@@ -17,6 +18,10 @@ int main(UNUSED int argc, UNUSED char **argv)
        SIZEOF(fr_dlist_t);
        SIZEOF(fr_dlist_head_t);
 
+       SIZEOF(CONF_ITEM);
+       SIZEOF(CONF_PAIR);
+       SIZEOF(CONF_SECTION);
+
        SIZEOF(fr_pair_t);
        SIZEOF(fr_pair_list_t);