summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/command.h b/lib/command.h
index 8a7c9a2048..e2086701ad 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -210,6 +210,9 @@ struct cmd_node {
/* Hashed index of command node list, for de-dupping primarily */
struct hash *cmd_hash;
+
+ /* set as soon as any command is in cmdgraph */
+ bool graph_built;
};
/* Return value of the commands. */
@@ -234,7 +237,7 @@ struct cmd_node {
/* Argc max counts. */
#define CMD_ARGC_MAX 256
-/* Turn off these macros when uisng cpp with extract.pl */
+/* Turn off these macros when using cpp with extract.pl */
#ifndef VTYSH_EXTRACT_PL
/* helper defines for end-user DEFUN* macros */
@@ -526,6 +529,12 @@ extern void _install_element(enum node_type, const struct cmd_element *);
* deprecated/hidden) are not reversed. */
extern void uninstall_element(enum node_type, const struct cmd_element *);
+/* construct CLI tree only when entering nodes */
+extern void cmd_defer_tree(bool val);
+
+/* finish CLI tree for node when above is true (noop otherwise) */
+extern void cmd_finalize_node(struct cmd_node *node);
+
/* Concatenates argv[shift] through argv[argc-1] into a single NUL-terminated
string with a space between each element (allocated using
XMALLOC(MTYPE_TMP)). Returns NULL if shift >= argc. */