diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-03-01 15:31:28 -0300 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-23 09:31:09 -0400 |
| commit | eac6e3f027356c25a8c8fddf921f769b79945fcc (patch) | |
| tree | 69d5a17fb3f95934bafa22f8a3aee28c92780d62 /lib/vty.c | |
| parent | e30090a678e45aee2755c492212c5a478b9dcfcc (diff) | |
ldpd: adapt the code for Quagga
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/vty.c')
| -rw-r--r-- | lib/vty.c | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -754,6 +754,13 @@ vty_end_config (struct vty *vty) case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: + case LDP_NODE: + case LDP_IPV4_NODE: + case LDP_IPV6_NODE: + case LDP_IPV4_IFACE_NODE: + case LDP_IPV6_IFACE_NODE: + case LDP_L2VPN_NODE: + case LDP_PSEUDOWIRE_NODE: case ISIS_NODE: case KEYCHAIN_NODE: case KEYCHAIN_KEY_NODE: @@ -1158,6 +1165,13 @@ vty_stop_input (struct vty *vty) case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: + case LDP_NODE: + case LDP_IPV4_NODE: + case LDP_IPV6_NODE: + case LDP_IPV4_IFACE_NODE: + case LDP_IPV6_IFACE_NODE: + case LDP_L2VPN_NODE: + case LDP_PSEUDOWIRE_NODE: case ISIS_NODE: case KEYCHAIN_NODE: case KEYCHAIN_KEY_NODE: @@ -3180,3 +3194,29 @@ vty_terminate (void) vector_free (Vvty_serv_thread); } } + +/* Utility functions to get arguments from commands generated + by the xml2cli.pl script. */ +const char * +vty_get_arg_value (struct vty_arg *args[], const char *arg) +{ + while (*args) + { + if (strcmp ((*args)->name, arg) == 0) + return (*args)->value; + args++; + } + return NULL; +} + +struct vty_arg * +vty_get_arg (struct vty_arg *args[], const char *arg) +{ + while (*args) + { + if (strcmp ((*args)->name, arg) == 0) + return *args; + args++; + } + return NULL; +} |
