diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-09 05:07:46 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-09 05:07:46 +0100 |
commit | 7f57883ee6322b728e44f447da68ebc96b0664e9 (patch) | |
tree | 8b1392c96f88324176f253d6fa7c64edc8d1a1a2 /vtysh | |
parent | Merge pull request #262 from donaldsharp/pim_jp_fixes (diff) | |
download | frr-7f57883ee6322b728e44f447da68ebc96b0664e9.tar.xz frr-7f57883ee6322b728e44f447da68ebc96b0664e9.zip |
eigrp: Initial Commit
Please Note, I will be redoing this commit message with
more information.
Additionally I will rework the lib/* changes into their
own commits.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/Makefile.am | 6 | ||||
-rwxr-xr-x | vtysh/extract.pl.in | 1 | ||||
-rw-r--r-- | vtysh/vtysh.c | 50 | ||||
-rw-r--r-- | vtysh/vtysh.h | 1 |
4 files changed, 55 insertions, 3 deletions
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index d02ec9661..c28b9cb71 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -71,6 +71,12 @@ if NHRPD vtysh_scan += $(top_srcdir)/nhrpd/nhrp_vty.c endif +if EIGRPD +vtysh_scan += $(top_srcdir)/eigrpd/eigrp_dump.c +vtysh_scan += $(top_srcdir)/eigrpd/eigrp_routemap.c +vtysh_scan += $(top_srcdir)/eigrpd/eigrp_vty.c +endif + vtysh_cmd_FILES = $(vtysh_scan) \ $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \ $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \ diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index c1b1d705a..e46901b85 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -52,6 +52,7 @@ $ignore{'"router bgp " "(1-4294967295)"'} = "ignore"; $ignore{'"router bgp " "(1-4294967295)" " <view|vrf> WORD"'} = "ignore"; $ignore{'"router bgp [(1-4294967295) [<view|vrf> WORD]]"'} = "ignore"; $ignore{'"router isis WORD"'} = "ignore"; +$ignore('"router eigrp (1-65535)"'} = "ignore"; $ignore{'"router zebra"'} = "ignore"; $ignore{'"address-family ipv4"'} = "ignore"; $ignore{'"address-family ipv4 [<unicast|multicast|vpn|encap>]"'} = "ignore"; diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 114022d19..afb742d90 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -75,6 +75,7 @@ struct vtysh_client vtysh_client[] = { .fd = -1, .name = "isisd", .flag = VTYSH_ISISD, .next = NULL}, { .fd = -1, .name = "pimd", .flag = VTYSH_PIMD, .next = NULL}, { .fd = -1, .name = "nhrpd", .flag = VTYSH_NHRPD, .next = NULL}, + { .fd = -1, .name = "eigrpd", .flag = VTYSH_EIGRPD, .next = NULL}, { .fd = -1, .name = "watchfrr", .flag = VTYSH_WATCHFRR, .next = NULL}, }; @@ -994,6 +995,12 @@ static struct cmd_node ospf_node = "%s(config-router)# " }; +static struct cmd_node eigrp_node = +{ + EIGRP_NODE, + "%s(config-router)# " +}; + static struct cmd_node ripng_node = { RIPNG_NODE, @@ -1332,6 +1339,18 @@ DEFUNSH (VTYSH_OSPFD, return CMD_SUCCESS; } +DEFUNSH (VTYSH_EIGRPD, + router_eigrp, + router_eigrp_cmd, + "router eigrp (1-65535)", + "Enable a routing process\n" + "Start EIGRP configuration\n" + "AS number to use\n") +{ + vty->node = EIGRP_NODE; + return CMD_SUCCESS; +} + DEFUNSH (VTYSH_OSPF6D, router_ospf6, router_ospf6_cmd, @@ -1515,6 +1534,7 @@ vtysh_exit (struct vty *vty) case RIPNG_NODE: case OSPF_NODE: case OSPF6_NODE: + case EIGRP_NODE: case LDP_NODE: case LDP_L2VPN_NODE: case ISIS_NODE: @@ -1716,6 +1736,24 @@ DEFUNSH (VTYSH_OSPFD, return vtysh_exit_ospfd (self, vty, argc, argv); } +DEFUNSH (VTYSH_EIGRPD, + vtysh_exit_eigrpd, + vtysh_exit_eigrpd_cmd, + "exit", + "Exit current mode and down to previous mode\n") +{ + return vtysh_exit (vty); +} + +DEFUNSH (VTYSH_EIGRPD, + vtysh_quit_eigrpd, + vtysh_quit_eigrpd_cmd, + "quit", + "Exit current mode and down to previous mode\n") +{ + return vtysh_exit (vty); +} + DEFUNSH (VTYSH_OSPF6D, vtysh_exit_ospf6d, vtysh_exit_ospf6d_cmd, @@ -1799,7 +1837,7 @@ DEFUNSH (VTYSH_INTERFACE, } /* TODO Implement "no interface command in isisd. */ -DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD, +DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_EIGRPD|VTYSH_LDPD, vtysh_no_interface_cmd, "no interface IFNAME", NO_STR @@ -1883,13 +1921,13 @@ DEFUNSH (VTYSH_VRF, /* TODO Implement interface description commands in ripngd, ospf6d * and isisd. */ -DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_OSPFD|VTYSH_LDPD, +DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_OSPFD|VTYSH_EIGRPD|VTYSH_LDPD, vtysh_interface_desc_cmd, "description LINE...", "Interface specific description\n" "Characters describing this interface\n") -DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_OSPFD, +DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_OSPFD|VTYSH_EIGRPD, vtysh_no_interface_desc_cmd, "no description", NO_STR @@ -3118,6 +3156,7 @@ vtysh_init_vty (void) install_node (&bgp_vnc_nve_group_node, NULL); install_node (&bgp_vnc_l2_group_node, NULL); install_node (&ospf_node, NULL); + install_node (&eigrp_node, NULL); install_node (&ripng_node, NULL); install_node (&ospf6_node, NULL); install_node (&ldp_node, NULL); @@ -3158,6 +3197,7 @@ vtysh_init_vty (void) vtysh_install_default (BGP_VNC_L2_GROUP_NODE); #endif vtysh_install_default (OSPF_NODE); + vtysh_install_default (EIGRP_NODE); vtysh_install_default (RIPNG_NODE); vtysh_install_default (OSPF6_NODE); vtysh_install_default (LDP_NODE); @@ -3187,6 +3227,8 @@ vtysh_init_vty (void) install_element (RIPNG_NODE, &vtysh_quit_ripngd_cmd); install_element (OSPF_NODE, &vtysh_exit_ospfd_cmd); install_element (OSPF_NODE, &vtysh_quit_ospfd_cmd); + install_element (EIGRP_NODE, &vtysh_exit_eigrpd_cmd); + install_element (EIGRP_NODE, &vtysh_quit_eigrpd_cmd); install_element (OSPF6_NODE, &vtysh_exit_ospf6d_cmd); install_element (OSPF6_NODE, &vtysh_quit_ospf6d_cmd); #if defined (HAVE_LDPD) @@ -3251,6 +3293,7 @@ vtysh_init_vty (void) install_element (RIP_NODE, &vtysh_end_all_cmd); install_element (RIPNG_NODE, &vtysh_end_all_cmd); install_element (OSPF_NODE, &vtysh_end_all_cmd); + install_element (EIGRP_NODE, &vtysh_end_all_cmd); install_element (OSPF6_NODE, &vtysh_end_all_cmd); install_element (LDP_NODE, &vtysh_end_all_cmd); install_element (LDP_IPV4_NODE, &vtysh_end_all_cmd); @@ -3298,6 +3341,7 @@ vtysh_init_vty (void) install_element (VRF_NODE, &vtysh_exit_vrf_cmd); install_element (VRF_NODE, &vtysh_quit_vrf_cmd); + install_element (CONFIG_NODE, &router_eigrp_cmd); install_element (CONFIG_NODE, &router_rip_cmd); install_element (CONFIG_NODE, &router_ripng_cmd); install_element (CONFIG_NODE, &router_ospf_cmd); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 07ba8367d..340f85df1 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -36,6 +36,7 @@ DECLARE_MGROUP(MVTYSH) #define VTYSH_LDPD 0x200 #define VTYSH_WATCHFRR 0x400 #define VTYSH_NHRPD 0x800 +#define VTYSH_EIGRPD 0x1000 /* commands in REALLYALL are crucial to correct vtysh operation */ #define VTYSH_REALLYALL ~0U |