]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/vty.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / vty.h
index 5cc077523f7c5b4731ddbe9e00c45bf1547e0996..79b1bd5e9311aee3d44d0e3947d6f1e294e287f5 100644 (file)
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -43,7 +43,7 @@ struct vty_error {
 };
 
 struct vty_cfg_change {
-       const char *xpath;
+       char xpath[XPATH_MAXLEN];
        enum nb_operation operation;
        const char *value;
 };
@@ -114,6 +114,9 @@ struct vty {
        int xpath_index;
        char xpath[VTY_MAXDEPTH][XPATH_MAXLEN];
 
+       /* In configure mode. */
+       bool config;
+
        /* Private candidate configuration mode. */
        bool private_config;
 
@@ -123,6 +126,10 @@ struct vty {
        /* Base candidate configuration. */
        struct nb_config *candidate_config_base;
 
+       /* Confirmed-commit timeout and rollback configuration. */
+       struct thread *t_confirmed_commit_timeout;
+       struct nb_config *confirmed_commit_rollback;
+
        /* qobj object ID (replacement for "index") */
        uint64_t qobj_index;
 
@@ -161,9 +168,6 @@ struct vty {
        /* Terminal monitor. */
        int monitor;
 
-       /* In configure mode. */
-       int config;
-
        /* Read and write thread. */
        struct thread *t_read;
        struct thread *t_write;
@@ -311,9 +315,9 @@ extern void vty_close(struct vty *);
 extern char *vty_get_cwd(void);
 extern void vty_log(const char *level, const char *proto, const char *fmt,
                    struct timestamp_control *, va_list);
-extern int vty_config_lock(struct vty *);
-extern int vty_config_unlock(struct vty *);
-extern void vty_config_lockless(void);
+extern int vty_config_enter(struct vty *vty, bool private_config,
+                           bool exclusive);
+extern void vty_config_exit(struct vty *);
 extern int vty_config_exclusive_lock(struct vty *vty);
 extern void vty_config_exclusive_unlock(struct vty *vty);
 extern int vty_shell(struct vty *);