]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/debug.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / lib / debug.h
index d0fa27d3fe74f80693e66f79be56b594e2077e1a..f25cd426913f8a0bb518df0e77b6e1933c6d060c 100644 (file)
 #include "command.h"
 #include "frratomic.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Debugging modes.
  *
  *    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.
  *
@@ -88,6 +93,11 @@ struct debug {
  *    mode set.
  */
 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 */