From da8a23277eefb46c5482fe63ecc7f75fcc21c0a6 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 14 Nov 2024 20:43:35 +0100 Subject: [PATCH] CLI: Dumping internal data structures to files, not to debug output All the 'dump something' CLI commands now have a new mandatory argument -- name of the file where to dump the data. This allows for more flexible dumping even for production deployments where the debug output is by default off. Also the dump commands are now restricted (they weren't before) to assure that only the appropriate users can run these time consuming commands. --- doc/bird.sgml | 8 +- doc/reply_codes | 1 + filter/decl.m4 | 28 +++---- filter/f-inst.c | 4 +- filter/f-inst.h | 2 +- filter/f-util.c | 4 +- filter/filter.c | 31 ++++---- filter/filter.h | 2 +- lib/birdlib.h | 11 +++ lib/event.c | 4 +- lib/mempool.c | 6 +- lib/resource.c | 40 ++++++---- lib/resource.h | 7 +- lib/slab.c | 6 +- lib/socket.h | 2 +- lib/timer.c | 12 +-- nest/config.Y | 39 +++++----- nest/iface.c | 40 +++++----- nest/iface.h | 10 +-- nest/locks.c | 6 +- nest/neighbor.c | 20 ++--- nest/proto.c | 14 ++-- nest/protocol.h | 4 +- nest/route.h | 12 +-- nest/rt-attr.c | 52 ++++++------- nest/rt-table.c | 26 +++---- proto/babel/babel.c | 42 +++++------ proto/bfd/bfd.c | 4 +- proto/bmp/bmp.c | 2 +- proto/ospf/ospf.c | 19 +++-- proto/rip/rip.c | 8 +- proto/static/static.c | 16 ++-- sysdep/unix/alloc.c | 20 +++++ sysdep/unix/io.c | 167 +++++++++++++++++++++++++++++++++++++++--- sysdep/unix/krt.c | 6 +- sysdep/unix/main.c | 41 ++++++++--- sysdep/unix/unix.h | 8 +- 37 files changed, 463 insertions(+), 261 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index b6b77691..5393edb2 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1454,8 +1454,12 @@ This argument can be omitted if there exists only a single instance.