summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/command.h b/lib/command.h
index ea8a76a964..725a201446 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -66,9 +66,6 @@ struct host {
/* System wide terminal lines. */
int lines;
- /* Log filename. */
- char *logfile;
-
/* config file name of this host */
char *config;
int noconfig;
@@ -149,6 +146,7 @@ enum node_type {
MPLS_NODE, /* MPLS config node */
PW_NODE, /* Pseudowire config node */
VTY_NODE, /* Vty node. */
+ FPM_NODE, /* Dataplane FPM node. */
LINK_PARAMS_NODE, /* Link-parameters node */
BGP_EVPN_VNI_NODE, /* BGP EVPN VNI */
RPKI_NODE, /* RPKI node for configuration of RPKI cache server
@@ -165,22 +163,29 @@ enum node_type {
extern vector cmdvec;
extern const struct message tokennames[];
-extern const char *const node_names[];
+
+/* for external users depending on struct layout */
+#define FRR_CMD_NODE_20200416
/* Node which has some commands and prompt string and configuration
function pointer . */
struct cmd_node {
+ const char *name;
+
/* Node index. */
enum node_type node;
+ enum node_type parent_node;
/* Prompt character at vty interface. */
const char *prompt;
- /* Is this node's configuration goes to vtysh ? */
- int vtysh;
-
/* Node's configuration write function */
- int (*func)(struct vty *);
+ int (*config_write)(struct vty *);
+
+ /* called when leaving the node on a VTY session.
+ * return 1 if normal exit processing should happen, 0 to suppress
+ */
+ int (*node_exit)(struct vty *);
/* Node's command graph */
struct graph *cmdgraph;
@@ -434,7 +439,7 @@ struct cmd_node {
#define NO_GR_NEIGHBOR_HELPER_CMD "Undo Graceful Restart Helper command for a neighbor\n"
/* Prototypes. */
-extern void install_node(struct cmd_node *node, int (*)(struct vty *));
+extern void install_node(struct cmd_node *node);
extern void install_default(enum node_type);
extern void install_element(enum node_type, const struct cmd_element *);