diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-11 07:00:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-11 07:00:00 -0500 |
| commit | 757abe78d84cba04c058f43b60d07dca554302c2 (patch) | |
| tree | 49bf0f89b9eb968c89f6e6654d973fbebb7cf848 /lib/command.h | |
| parent | bb867fc5a7847452a9d7b16143d3fb798acdc38a (diff) | |
| parent | cd2726408a423e8b977f5906cc2aaee86c3d8327 (diff) | |
Merge pull request #195 from opensourcerouting/cli_merge
CLI: independent merge step
Diffstat (limited to 'lib/command.h')
| -rw-r--r-- | lib/command.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h index 04bba9e412..29283418ce 100644 --- a/lib/command.h +++ b/lib/command.h @@ -200,6 +200,7 @@ struct cmd_token enum cmd_token_type type; // token type u_char attr; // token attributes bool allowrepeat; // matcher allowed to match token repetively? + uint32_t refcnt; char *text; // token text char *desc; // token description @@ -219,6 +220,8 @@ struct cmd_element /* handler function for command */ int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]); + + const char *name; /* symbol name for debugging */ }; /* Return value of the commands. */ @@ -251,6 +254,7 @@ struct cmd_element .doc = helpstr, \ .attr = attrs, \ .daemon = dnum, \ + .name = #cmdname, \ }; #define DEFUN_CMD_FUNC_DECL(funcname) \ @@ -402,6 +406,10 @@ extern void install_node (struct cmd_node *, int (*) (struct vty *)); extern void install_default (enum node_type); extern void install_element (enum node_type, struct cmd_element *); +/* known issue with uninstall_element: changes to cmd_token->attr (i.e. + * deprecated/hidden) are not reversed. */ +extern void uninstall_element (enum node_type, struct cmd_element *); + /* 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. */ @@ -435,6 +443,7 @@ extern void del_cmd_token (struct cmd_token *); extern struct cmd_token *copy_cmd_token (struct cmd_token *); extern vector completions_to_vec (struct list *completions); +extern void cmd_merge_graphs (struct graph *old, struct graph *new, int direction); extern void command_parse_format (struct graph *graph, struct cmd_element *cmd); /* Export typical functions. */ |
