diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-09 00:03:19 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2020-04-16 12:54:03 +0200 |
| commit | 791ded4a62b86d3e05d28e70864ee2723d91bc69 (patch) | |
| tree | 6ee63e5d866dc790ffccbf6648f8a605eb3ebae4 /lib/command.h | |
| parent | 893d8beb4d1ae92b7c3290aad163e65aa0675a5c (diff) | |
*: add ->node_exit to struct cmd_node
Rather than doing a f*gly hack for the RPKI code, let's do an on-exit
hook in cmd_node. Also allows replacing some special-casing in the vty
code.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/command.h')
| -rw-r--r-- | lib/command.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h index 5629eb3679..e7c9ff4c52 100644 --- a/lib/command.h +++ b/lib/command.h @@ -182,6 +182,11 @@ struct cmd_node { /* Node's configuration write function */ 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; |
