]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/command_graph.h
Merge pull request #6263 from opensourcerouting/zlog-coverity-20200420
[mirror_frr.git] / lib / command_graph.h
index ec68e284ed308637442ec0a2c0f90ee776568b16..1efe8b1803f4e65e86803d357c3e36a2e1cbbf69 100644 (file)
 #include "vector.h"
 #include "graph.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 DECLARE_MTYPE(CMD_ARG)
 
 struct vty;
@@ -112,9 +116,29 @@ extern struct cmd_token *cmd_token_dup(struct cmd_token *);
 extern void cmd_token_del(struct cmd_token *);
 extern void cmd_token_varname_set(struct cmd_token *token, const char *varname);
 
-extern void cmd_graph_parse(struct graph *graph, struct cmd_element *cmd);
+extern void cmd_graph_parse(struct graph *graph, const struct cmd_element *cmd);
 extern void cmd_graph_names(struct graph *graph);
-extern void cmd_graph_merge(struct graph *old, struct graph *new,
+extern void cmd_graph_merge(struct graph *old, struct graph *n,
                            int direction);
+/*
+ * Print callback for DOT dumping.
+ *
+ * See graph.h for more details.
+ */
+extern void cmd_graph_node_print_cb(struct graph_node *gn, struct buffer *buf);
+/*
+ * Dump command graph to DOT.
+ *
+ * cmdgraph
+ *    A command graph to dump
+ *
+ * Returns:
+ *    String allocated with MTYPE_TMP representing this graph
+ */
+char *cmd_graph_dump_dot(struct graph *cmdgraph);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _FRR_COMMAND_GRAPH_H */