diff options
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/.cvsignore | 13 | ||||
-rw-r--r-- | vtysh/Makefile.am | 1 | ||||
-rwxr-xr-x | vtysh/extract.pl.in | 5 | ||||
-rw-r--r-- | vtysh/vtysh.c | 23 | ||||
-rw-r--r-- | vtysh/vtysh.h | 7 | ||||
-rw-r--r-- | vtysh/vtysh_config.c | 2 |
6 files changed, 33 insertions, 18 deletions
diff --git a/vtysh/.cvsignore b/vtysh/.cvsignore deleted file mode 100644 index ed3f1f39..00000000 --- a/vtysh/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -Makefile -Makefile.in -*.o -vtysh -tags -TAGS -.deps -vtysh_cmd.c -.nfs* -extract.pl -.libs -.arch-inventory -.arch-ids diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 791d95dd..0fd2f148 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -24,6 +24,7 @@ EXTRA_DIST = extract.pl vtysh_cmd_FILES = $(top_srcdir)/bgpd/*.c $(top_srcdir)/isisd/*.c \ $(top_srcdir)/ospfd/*.c $(top_srcdir)/ospf6d/*.c \ $(top_srcdir)/ripd/*.c $(top_srcdir)/ripngd/*.c \ + $(top_srcdir)/babeld/*.c \ $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \ $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \ $(top_srcdir)/lib/distribute.c $(top_srcdir)/lib/if_rmap.c \ diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index 0b9ee516..61b2d2a2 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -37,6 +37,7 @@ $ignore{'"router ripng"'} = "ignore"; $ignore{'"router ospf"'} = "ignore"; $ignore{'"router ospf <0-65535>"'} = "ignore"; $ignore{'"router ospf6"'} = "ignore"; +$ignore{'"router babel"'} = "ignore"; $ignore{'"router bgp " "<1-4294967295>"'} = "ignore"; $ignore{'"router bgp " "<1-4294967295>" " view WORD"'} = "ignore"; $ignore{'"router isis WORD"'} = "ignore"; @@ -62,13 +63,13 @@ $ignore{'"show history"'} = "ignore"; foreach (@ARGV) { $file = $_; - open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ $file |"); + open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ @CPPFLAGS@ $file |"); local $/; undef $/; $line = <FH>; close (FH); @defun = ($line =~ /(?:DEFUN|ALIAS)\s*\((.+?)\);?\s?\s?\n/sg); - @install = ($line =~ /install_element \(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg); + @install = ($line =~ /install_element\s*\(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg); # DEFUN process foreach (@defun) { diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 3f189adb..431c08e2 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -58,6 +58,7 @@ struct vtysh_client { .fd = -1, .name = "ospf6d", .flag = VTYSH_OSPF6D, .path = OSPF6_VTYSH_PATH}, { .fd = -1, .name = "bgpd", .flag = VTYSH_BGPD, .path = BGP_VTYSH_PATH}, { .fd = -1, .name = "isisd", .flag = VTYSH_ISISD, .path = ISIS_VTYSH_PATH}, + { .fd = -1, .name = "babeld", .flag = VTYSH_BABELD, .path = BABEL_VTYSH_PATH}, }; #define VTYSH_INDEX_MAX (sizeof(vtysh_client)/sizeof(vtysh_client[0])) @@ -797,6 +798,12 @@ static struct cmd_node ospf6_node = "%s(config-ospf6)# " }; +static struct cmd_node babel_node = +{ + BABEL_NODE, + "%s(config-babel)# " +}; + static struct cmd_node keychain_node = { KEYCHAIN_NODE, @@ -1009,6 +1016,17 @@ DEFUNSH (VTYSH_OSPF6D, return CMD_SUCCESS; } +DEFUNSH (VTYSH_BABELD, + router_babel, + router_babel_cmd, + "router babel", + ROUTER_STR + "Babel") +{ + vty->node = BABEL_NODE; + return CMD_SUCCESS; +} + DEFUNSH (VTYSH_ISISD, router_isis, router_isis_cmd, @@ -1097,6 +1115,7 @@ vtysh_exit (struct vty *vty) case RIPNG_NODE: case OSPF_NODE: case OSPF6_NODE: + case BABEL_NODE: case ISIS_NODE: case MASC_NODE: case RMAP_NODE: @@ -2252,6 +2271,7 @@ vtysh_init_vty (void) install_node (&ripng_node, NULL); install_node (&ospf6_node, NULL); /* #endif */ + install_node (&babel_node, NULL); install_node (&keychain_node, NULL); install_node (&keychain_key_node, NULL); install_node (&isis_node, NULL); @@ -2273,6 +2293,7 @@ vtysh_init_vty (void) vtysh_install_default (OSPF_NODE); vtysh_install_default (RIPNG_NODE); vtysh_install_default (OSPF6_NODE); + vtysh_install_default (BABEL_NODE); vtysh_install_default (ISIS_NODE); vtysh_install_default (KEYCHAIN_NODE); vtysh_install_default (KEYCHAIN_KEY_NODE); @@ -2327,6 +2348,7 @@ vtysh_init_vty (void) install_element (RIPNG_NODE, &vtysh_end_all_cmd); install_element (OSPF_NODE, &vtysh_end_all_cmd); install_element (OSPF6_NODE, &vtysh_end_all_cmd); + install_element (BABEL_NODE, &vtysh_end_all_cmd); install_element (BGP_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV4_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV4M_NODE, &vtysh_end_all_cmd); @@ -2352,6 +2374,7 @@ vtysh_init_vty (void) #ifdef HAVE_IPV6 install_element (CONFIG_NODE, &router_ospf6_cmd); #endif + install_element (CONFIG_NODE, &router_babel_cmd); install_element (CONFIG_NODE, &router_isis_cmd); install_element (CONFIG_NODE, &router_bgp_cmd); install_element (CONFIG_NODE, &router_bgp_view_cmd); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index e711d593..3cc7bafe 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -29,9 +29,10 @@ #define VTYSH_OSPF6D 0x10 #define VTYSH_BGPD 0x20 #define VTYSH_ISISD 0x40 -#define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD -#define VTYSH_RMAP VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD -#define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD +#define VTYSH_BABELD 0x80 +#define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_BABELD +#define VTYSH_RMAP VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_BABELD +#define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_BABELD /* vtysh local configuration file. */ #define VTYSH_DEFAULT_CONFIG "vtysh.conf" diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index fb8a1269..f9cb6a79 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -198,6 +198,8 @@ vtysh_config_parse_line (const char *line) config = config_get (OSPF_NODE, line); else if (strncmp (line, "router ospf6", strlen ("router ospf6")) == 0) config = config_get (OSPF6_NODE, line); + else if (strncmp (line, "router babel", strlen ("router babel")) == 0) + config = config_get (BABEL_NODE, line); else if (strncmp (line, "router bgp", strlen ("router bgp")) == 0) config = config_get (BGP_NODE, line); else if (strncmp (line, "router isis", strlen ("router isis")) == 0) |