diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2021-10-20 18:52:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 18:52:00 -0400 |
| commit | 3c8161eaa88f6ae181637b8ad7d3a39399470cee (patch) | |
| tree | 35c0e6579728f81b8f1c2154549a39454b564183 /lib/command_graph.h | |
| parent | 61a7ec774caff0b07134a76e82641af9a39a3fb6 (diff) | |
| parent | 14c39974bbb37a1c95800b75af3d25ff72295f41 (diff) | |
Merge pull request #9843 from opensourcerouting/vtysh-startup-cost
vtysh: improve startup time by ca. ×6
Diffstat (limited to 'lib/command_graph.h')
| -rw-r--r-- | lib/command_graph.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/command_graph.h b/lib/command_graph.h index 86157f872e..ed4da6aa4c 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -79,11 +79,20 @@ enum { CMD_ATTR_NORMAL, CMD_ATTR_YANG, }; +enum varname_src { + VARNAME_NONE = 0, + VARNAME_AUTO, + VARNAME_VAR, + VARNAME_TEXT, + VARNAME_EXPLICIT, +}; + /* Command token struct. */ struct cmd_token { enum cmd_token_type type; // token type uint8_t attr; // token attributes bool allowrepeat; // matcher allowed to match token repetitively? + uint8_t varname_src; uint32_t refcnt; char *text; // token text @@ -119,6 +128,8 @@ extern struct cmd_token *cmd_token_new(enum cmd_token_type, uint8_t attr, 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_token_varname_seqappend(struct graph_node *n); +extern void cmd_token_varname_join(struct graph_node *n, const char *varname); extern void cmd_graph_parse(struct graph *graph, const struct cmd_element *cmd); extern void cmd_graph_names(struct graph *graph); |
