summaryrefslogtreecommitdiff
path: root/lib/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/debug.h')
-rw-r--r--lib/debug.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/debug.h b/lib/debug.h
index d0fa27d3fe..f25cd42691 100644
--- a/lib/debug.h
+++ b/lib/debug.h
@@ -24,6 +24,10 @@
#include "command.h"
#include "frratomic.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Debugging modes.
*
@@ -76,10 +80,11 @@
* Human-readable description of this debugging record.
*/
struct debug {
- _Atomic uint32_t flags;
+ atomic_uint_fast32_t flags;
const char *desc;
};
+PREDECL_LIST(debug_cb_list)
/*
* Callback set for debugging code.
*
@@ -89,6 +94,11 @@ struct debug {
*/
struct debug_callbacks {
/*
+ * Linked list of Callbacks to call
+ */
+ struct debug_cb_list_item item;
+
+ /*
* flags
* flags to set on debug flag fields
*
@@ -229,6 +239,16 @@ struct debug_callbacks {
*
* MT-Safe
*/
-void debug_init(const struct debug_callbacks *cb);
+void debug_init(struct debug_callbacks *cb);
+
+/*
+ * Turn on the cli to turn on/off debugs.
+ * Should only be called by libfrr
+ */
+void debug_init_cli(void);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _FRRDEBUG_H */