diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-24 21:24:03 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-25 14:26:09 +0200 |
commit | 87ab4aec5062232fc1e6077732eff9ac49d00d5a (patch) | |
tree | 6955d0d78fe4c8ebf618ab8bf4d80ab2596ea12e /vtysh/vtysh.c | |
parent | tools: Fix bug whereby no searches were made (diff) | |
download | frr-87ab4aec5062232fc1e6077732eff9ac49d00d5a.tar.xz frr-87ab4aec5062232fc1e6077732eff9ac49d00d5a.zip |
vtysh: Allow vtysh to not know about enabled daemons/features
With the way that vtysh works, it compiles in cli even
if there is no support in the protocols.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | vtysh/vtysh.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index a5e146c94..29697b564 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1251,6 +1251,7 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } +#if defined (ENABLE_BGP_VNC) DEFUNSH (VTYSH_BGPD, vnc_defaults, vnc_defaults_cmd, @@ -1285,6 +1286,7 @@ DEFUNSH (VTYSH_BGPD, vty->node = BGP_VNC_L2_GROUP_NODE; return CMD_SUCCESS; } +#endif DEFUNSH (VTYSH_RIPD, key_chain, @@ -1361,6 +1363,7 @@ DEFUNSH (VTYSH_OSPF6D, return CMD_SUCCESS; } +#if defined (HAVE_LDPD) DEFUNSH (VTYSH_LDPD, ldp_mpls_ldp, ldp_mpls_ldp_cmd, @@ -1440,6 +1443,7 @@ DEFUNSH (VTYSH_LDPD, vty->node = LDP_PSEUDOWIRE_NODE; return CMD_SUCCESS; } +#endif DEFUNSH (VTYSH_ISISD, router_isis, @@ -1723,6 +1727,7 @@ ALIAS (vtysh_exit_ospf6d, "quit", "Exit current mode and down to previous mode\n") +#if defined (HAVE_LDPD) DEFUNSH (VTYSH_LDPD, vtysh_exit_ldpd, vtysh_exit_ldpd_cmd, @@ -1736,6 +1741,7 @@ ALIAS (vtysh_exit_ldpd, vtysh_quit_ldpd_cmd, "quit", "Exit current mode and down to previous mode\n") +#endif DEFUNSH (VTYSH_ISISD, vtysh_exit_isisd, @@ -2765,7 +2771,6 @@ ALIAS (vtysh_traceroute, "IP trace\n" "Trace route to destination address or hostname\n") -#ifdef HAVE_IPV6 DEFUN (vtysh_ping6, vtysh_ping6_cmd, "ping ipv6 WORD", @@ -2787,7 +2792,6 @@ DEFUN (vtysh_traceroute6, execute_command ("traceroute6", 1, argv[0], NULL); return CMD_SUCCESS; } -#endif #if defined(HAVE_SHELL_ACCESS) DEFUN (vtysh_telnet, @@ -3102,20 +3106,14 @@ vtysh_init_vty (void) install_node (&bgp_encapv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); -/* #ifdef HAVE_IPV6 */ install_node (&bgp_ipv6_node, NULL); install_node (&bgp_ipv6m_node, NULL); -/* #endif */ -/*#if ENABLE_BGP_VNC */ install_node (&bgp_vnc_defaults_node, NULL); install_node (&bgp_vnc_nve_group_node, NULL); install_node (&bgp_vnc_l2_group_node, NULL); -/* #endif */ install_node (&ospf_node, NULL); -/* #ifdef HAVE_IPV6 */ install_node (&ripng_node, NULL); install_node (&ospf6_node, NULL); -/* #endif */ install_node (&ldp_node, NULL); install_node (&ldp_ipv4_node, NULL); install_node (&ldp_ipv6_node, NULL); @@ -3146,11 +3144,11 @@ vtysh_init_vty (void) vtysh_install_default (BGP_IPV4M_NODE); vtysh_install_default (BGP_IPV6_NODE); vtysh_install_default (BGP_IPV6M_NODE); - /* #if ENABLE_BGP_VNC */ +#if ENABLE_BGP_VNC vtysh_install_default (BGP_VNC_DEFAULTS_NODE); vtysh_install_default (BGP_VNC_NVE_GROUP_NODE); vtysh_install_default (BGP_VNC_L2_GROUP_NODE); - /* #endif */ +#endif vtysh_install_default (OSPF_NODE); vtysh_install_default (RIPNG_NODE); vtysh_install_default (OSPF6_NODE); @@ -3183,6 +3181,7 @@ vtysh_init_vty (void) install_element (OSPF_NODE, &vtysh_quit_ospfd_cmd); install_element (OSPF6_NODE, &vtysh_exit_ospf6d_cmd); install_element (OSPF6_NODE, &vtysh_quit_ospf6d_cmd); +#if defined (HAVE_LDPD) install_element (LDP_NODE, &vtysh_exit_ldpd_cmd); install_element (LDP_NODE, &vtysh_quit_ldpd_cmd); install_element (LDP_IPV4_NODE, &vtysh_exit_ldpd_cmd); @@ -3197,6 +3196,7 @@ vtysh_init_vty (void) install_element (LDP_L2VPN_NODE, &vtysh_quit_ldpd_cmd); install_element (LDP_PSEUDOWIRE_NODE, &vtysh_exit_ldpd_cmd); install_element (LDP_PSEUDOWIRE_NODE, &vtysh_quit_ldpd_cmd); +#endif install_element (BGP_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VPNV4_NODE, &vtysh_exit_bgpd_cmd); @@ -3215,12 +3215,14 @@ vtysh_init_vty (void) install_element (BGP_IPV6_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV6M_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV6M_NODE, &vtysh_quit_bgpd_cmd); +#if defined (ENABLE_BGP_VNC) install_element (BGP_VNC_DEFAULTS_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VNC_DEFAULTS_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VNC_NVE_GROUP_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VNC_NVE_GROUP_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VNC_L2_GROUP_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VNC_L2_GROUP_NODE, &vtysh_quit_bgpd_cmd); +#endif install_element (ISIS_NODE, &vtysh_exit_isisd_cmd); install_element (ISIS_NODE, &vtysh_quit_isisd_cmd); install_element (KEYCHAIN_NODE, &vtysh_exit_ripd_cmd); @@ -3281,14 +3283,11 @@ vtysh_init_vty (void) install_element (VRF_NODE, &vtysh_quit_vrf_cmd); install_element (CONFIG_NODE, &router_rip_cmd); -#ifdef HAVE_IPV6 install_element (CONFIG_NODE, &router_ripng_cmd); -#endif install_element (CONFIG_NODE, &router_ospf_cmd); install_element (CONFIG_NODE, &router_ospf_instance_cmd); -#ifdef HAVE_IPV6 install_element (CONFIG_NODE, &router_ospf6_cmd); -#endif +#if defined (HAVE_LDPD) install_element (CONFIG_NODE, &ldp_mpls_ldp_cmd); install_element (LDP_NODE, &ldp_address_family_ipv4_cmd); install_element (LDP_NODE, &ldp_address_family_ipv6_cmd); @@ -3296,6 +3295,7 @@ vtysh_init_vty (void) install_element (LDP_IPV6_NODE, &ldp_interface_ifname_cmd); install_element (CONFIG_NODE, &ldp_l2vpn_word_type_vpls_cmd); install_element (LDP_L2VPN_NODE, &ldp_member_pseudowire_ifname_cmd); +#endif install_element (CONFIG_NODE, &router_isis_cmd); install_element (CONFIG_NODE, &router_bgp_cmd); install_element (CONFIG_NODE, &router_bgp_asn_cmd); @@ -3306,8 +3306,10 @@ vtysh_init_vty (void) install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd); install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encapv6_cmd); +#if defined(ENABLE_BGP_VNC) install_element (BGP_NODE, &vnc_defaults_cmd); install_element (BGP_NODE, &vnc_nve_group_cmd); +#endif install_element (BGP_NODE, &address_family_ipv4_unicast_cmd); install_element (BGP_NODE, &address_family_ipv4_multicast_cmd); #ifdef HAVE_IPV6 @@ -3366,10 +3368,8 @@ vtysh_init_vty (void) install_element (VIEW_NODE, &vtysh_ping_ip_cmd); install_element (VIEW_NODE, &vtysh_traceroute_cmd); install_element (VIEW_NODE, &vtysh_traceroute_ip_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &vtysh_ping6_cmd); install_element (VIEW_NODE, &vtysh_traceroute6_cmd); -#endif #if defined(HAVE_SHELL_ACCESS) install_element (VIEW_NODE, &vtysh_telnet_cmd); install_element (VIEW_NODE, &vtysh_telnet_port_cmd); |