}
/* Vty node structures. */
+#ifdef HAVE_BGPD
static struct cmd_node bgp_node = {
.name = "bgp",
.node = BGP_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_BGPD */
static struct cmd_node rip_node = {
.name = "rip",
.prompt = "%s(config-router)# ",
};
+#ifdef HAVE_ISISD
static struct cmd_node isis_node = {
.name = "isis",
.node = ISIS_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_ISISD */
+#ifdef HAVE_FABRICD
static struct cmd_node openfabric_node = {
.name = "openfabric",
.node = OPENFABRIC_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_FABRICD */
static struct cmd_node interface_node = {
.name = "interface",
.prompt = "%s(config-route-map)# ",
};
+#ifdef HAVE_PBRD
static struct cmd_node pbr_map_node = {
.name = "pbr-map",
.node = PBRMAP_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-pbr-map)# ",
};
+#endif /* HAVE_PBRD */
static struct cmd_node zebra_node = {
.name = "zebra",
.prompt = "%s(config-router)# ",
};
+#ifdef HAVE_BGPD
static struct cmd_node bgp_vpnv4_node = {
.name = "bgp vpnv4",
.node = BGP_VPNV4_NODE,
.prompt = "%s(config-router-af)# ",
};
+#ifdef ENABLE_BGP_VNC
static struct cmd_node bgp_vnc_defaults_node = {
.name = "bgp vnc defaults",
.node = BGP_VNC_DEFAULTS_NODE,
.parent_node = BGP_NODE,
.prompt = "%s(config-router-vnc-l2-group)# ",
};
+#endif /* ENABLE_BGP_VNC */
static struct cmd_node bmp_node = {
.name = "bmp",
.parent_node = BGP_NODE,
.prompt = "%s(config-bgp-bmp)# "
};
+#endif /* HAVE_BGPD */
+#ifdef HAVE_OSPFD
static struct cmd_node ospf_node = {
.name = "ospf",
.node = OSPF_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_OSPFD */
+#ifdef HAVE_EIGRPD
static struct cmd_node eigrp_node = {
.name = "eigrp",
.node = EIGRP_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_EIGRPD */
+#ifdef HAVE_BABELD
static struct cmd_node babel_node = {
.name = "babel",
.node = BABEL_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+#endif /* HAVE_BABELD */
static struct cmd_node ripng_node = {
.name = "ripng",
.prompt = "%s(config-router)# ",
};
+#ifdef HAVE_OSPF6D
static struct cmd_node ospf6_node = {
.name = "ospf6",
.node = OSPF6_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-ospf6)# ",
};
+#endif /* HAVE_OSPF6D */
+#ifdef HAVE_LDPD
static struct cmd_node ldp_node = {
.name = "ldp",
.node = LDP_NODE,
.parent_node = LDP_L2VPN_NODE,
.prompt = "%s(config-l2vpn-pw)# ",
};
+#endif /* HAVE_LDPD */
static struct cmd_node keychain_node = {
.name = "keychain",
.prompt = "%s(config-link-params)# ",
};
+#ifdef HAVE_BGPD
static struct cmd_node rpki_node = {
.name = "rpki",
.node = RPKI_NODE,
.parent_node = CONFIG_NODE,
.prompt = "%s(config-rpki)# ",
};
+#endif /* HAVE_BGPD */
#if HAVE_BFDD > 0
static struct cmd_node bfd_node = {
return vtysh_end();
}
+#ifdef HAVE_BGPD
DEFUNSH(VTYSH_BGPD, router_bgp, router_bgp_cmd,
"router bgp [(1-4294967295) [<view|vrf> WORD]]",
ROUTER_STR BGP_STR AS_STR
return CMD_SUCCESS;
}
#endif
+#endif /* HAVE_BGPD */
DEFUNSH(VTYSH_KEYS, key_chain, key_chain_cmd, "key chain WORD",
"Authentication key management\n"
return CMD_SUCCESS;
}
+#ifdef HAVE_RIPD
DEFUNSH(VTYSH_RIPD, router_rip, router_rip_cmd, "router rip [vrf NAME]",
ROUTER_STR "RIP\n" VRF_CMD_HELP_STR)
{
vty->node = RIP_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_RIPD */
+#ifdef HAVE_RIPNGD
DEFUNSH(VTYSH_RIPNGD, router_ripng, router_ripng_cmd, "router ripng [vrf NAME]",
ROUTER_STR "RIPng\n" VRF_CMD_HELP_STR)
{
vty->node = RIPNG_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_RIPNGD */
+#ifdef HAVE_OSPFD
DEFUNSH(VTYSH_OSPFD, router_ospf, router_ospf_cmd,
"router ospf [(1-65535)] [vrf NAME]",
"Enable a routing process\n"
vty->node = OSPF_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_OSPFD */
+#ifdef HAVE_EIGRPD
DEFUNSH(VTYSH_EIGRPD, router_eigrp, router_eigrp_cmd, "router eigrp (1-65535) [vrf NAME]",
"Enable a routing process\n"
"Start EIGRP configuration\n"
vty->node = EIGRP_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_EIGRPD */
+#ifdef HAVE_BABELD
DEFUNSH(VTYSH_BABELD, router_babel, router_babel_cmd, "router babel",
"Enable a routing process\n"
"Make Babel instance command\n")
vty->node = BABEL_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_BABELD */
+#ifdef HAVE_OSPF6D
DEFUNSH(VTYSH_OSPF6D, router_ospf6, router_ospf6_cmd, "router ospf6",
ROUTER_STR OSPF6_STR)
{
vty->node = OSPF6_NODE;
return CMD_SUCCESS;
}
+#endif
#if defined(HAVE_LDPD)
DEFUNSH(VTYSH_LDPD, ldp_mpls_ldp, ldp_mpls_ldp_cmd, "mpls ldp",
}
#endif
+#ifdef HAVE_ISISD
DEFUNSH(VTYSH_ISISD, router_isis, router_isis_cmd,
"router isis WORD [vrf NAME]",
ROUTER_STR
vty->node = ISIS_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_ISISD */
+#ifdef HAVE_FABRICD
DEFUNSH(VTYSH_FABRICD, router_openfabric, router_openfabric_cmd, "router openfabric WORD",
ROUTER_STR
"OpenFabric routing protocol\n"
vty->node = OPENFABRIC_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_FABRICD */
DEFUNSH(VTYSH_RMAP, vtysh_route_map, vtysh_route_map_cmd,
"route-map WORD <deny|permit> (1-65535)",
return CMD_SUCCESS;
}
+#ifdef HAVE_PBRD
DEFUNSH(VTYSH_PBRD, vtysh_pbr_map, vtysh_pbr_map_cmd,
"pbr-map PBRMAP seq (1-700)",
"Create pbr-map or enter pbr-map command mode\n"
"The name of the PBR MAP\n"
"Sequence to delete from existing pbr-map entry\n"
"Sequence number\n")
+#endif /* HAVE_PBRD */
#if HAVE_BFDD > 0
DEFUNSH(VTYSH_BFDD, bfd_enter, bfd_enter_cmd, "bfd", "Configure BFD peers\n")
return vtysh_exit_all(self, vty, argc, argv);
}
+#ifdef HAVE_BGPD
DEFUNSH(VTYSH_BGPD, exit_address_family, exit_address_family_cmd,
"exit-address-family", "Exit from Address Family configuration mode\n")
{
vty->node = BGP_NODE;
return CMD_SUCCESS;
}
+#endif /* HAVE_BGPD */
DEFUNSH(VTYSH_VRF, exit_vrf_config, exit_vrf_config_cmd, "exit-vrf",
"Exit from VRF configuration mode\n")
return CMD_SUCCESS;
}
+#ifdef HAVE_RIPD
DEFUNSH(VTYSH_RIPD, vtysh_exit_ripd, vtysh_exit_ripd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_ripd(self, vty, argc, argv);
}
+#endif /* HAVE_RIPD */
+#ifdef HAVE_RIPNGD
DEFUNSH(VTYSH_RIPNGD, vtysh_exit_ripngd, vtysh_exit_ripngd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_ripngd(self, vty, argc, argv);
}
+#endif /* HAVE_RIPNGD */
DEFUNSH(VTYSH_RMAP, vtysh_exit_rmap, vtysh_exit_rmap_cmd, "exit",
"Exit current mode and down to previous mode\n")
return vtysh_exit_rmap(self, vty, argc, argv);
}
+#ifdef HAVE_PBRD
DEFUNSH(VTYSH_PBRD, vtysh_exit_pbr_map, vtysh_exit_pbr_map_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_rmap(self, vty, argc, argv);
}
+#endif /* HAVE_PBRD */
+#ifdef HAVE_BGPD
DEFUNSH(VTYSH_BGPD, vtysh_exit_bgpd, vtysh_exit_bgpd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_bgpd(self, vty, argc, argv);
}
+#endif /* HAVE_BGPD */
+#ifdef HAVE_OSPFD
DEFUNSH(VTYSH_OSPFD, vtysh_exit_ospfd, vtysh_exit_ospfd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_ospfd(self, vty, argc, argv);
}
+#endif /* HAVE_OSPFD */
+#ifdef HAVE_EIGRPD
DEFUNSH(VTYSH_EIGRPD, vtysh_exit_eigrpd, vtysh_exit_eigrpd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit(vty);
}
+#endif /* HAVE_EIGRPD */
+#ifdef HAVE_BABELD
DEFUNSH(VTYSH_BABELD, vtysh_exit_babeld, vtysh_exit_babeld_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit(vty);
}
+#endif /* HAVE_BABELD */
+#ifdef HAVE_OSPF6D
DEFUNSH(VTYSH_OSPF6D, vtysh_exit_ospf6d, vtysh_exit_ospf6d_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_ospf6d(self, vty, argc, argv);
}
+#endif /* HAVE_OSPF6D */
#if defined(HAVE_LDPD)
DEFUNSH(VTYSH_LDPD, vtysh_exit_ldpd, vtysh_exit_ldpd_cmd, "exit",
"Exit current mode and down to previous mode\n")
#endif
+#ifdef HAVE_ISISD
DEFUNSH(VTYSH_ISISD, vtysh_exit_isisd, vtysh_exit_isisd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_isisd(self, vty, argc, argv);
}
+#endif /* HAVE_ISISD */
#if HAVE_BFDD > 0
DEFUNSH(VTYSH_BFDD, vtysh_exit_bfdd, vtysh_exit_bfdd_cmd, "exit",
"Exit current mode and down to previous mode\n")
#endif
+#ifdef HAVE_FABRICD
DEFUNSH(VTYSH_FABRICD, vtysh_exit_fabricd, vtysh_exit_fabricd_cmd, "exit",
"Exit current mode and down to previous mode\n")
{
{
return vtysh_exit_fabricd(self, vty, argc, argv);
}
+#endif /* HAVE_FABRICD */
DEFUNSH(VTYSH_KEYS, vtysh_exit_keys, vtysh_exit_keys_cmd, "exit",
"Exit current mode and down to previous mode\n")
cmd_variable_handler_register(vtysh_var_handler);
/* bgpd */
+#ifdef HAVE_BGPD
install_node(&bgp_node);
install_element(CONFIG_NODE, &router_bgp_cmd);
install_element(BGP_NODE, &vtysh_exit_bgpd_cmd);
install_element(BMP_NODE, &bmp_exit_cmd);
install_element(BMP_NODE, &bmp_quit_cmd);
install_element(BMP_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_BGPD */
/* ripd */
install_node(&rip_node);
+#ifdef HAVE_RIPD
install_element(CONFIG_NODE, &router_rip_cmd);
install_element(RIP_NODE, &vtysh_exit_ripd_cmd);
install_element(RIP_NODE, &vtysh_quit_ripd_cmd);
install_element(RIP_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_RIPD */
/* ripngd */
install_node(&ripng_node);
+#ifdef HAVE_RIPNGD
install_element(CONFIG_NODE, &router_ripng_cmd);
install_element(RIPNG_NODE, &vtysh_exit_ripngd_cmd);
install_element(RIPNG_NODE, &vtysh_quit_ripngd_cmd);
install_element(RIPNG_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_RIPNGD */
/* ospfd */
+#ifdef HAVE_OSPFD
install_node(&ospf_node);
install_element(CONFIG_NODE, &router_ospf_cmd);
install_element(OSPF_NODE, &vtysh_exit_ospfd_cmd);
install_element(OSPF_NODE, &vtysh_quit_ospfd_cmd);
install_element(OSPF_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_OSPFD */
/* ospf6d */
+#ifdef HAVE_OSPF6D
install_node(&ospf6_node);
install_element(CONFIG_NODE, &router_ospf6_cmd);
install_element(OSPF6_NODE, &vtysh_exit_ospf6d_cmd);
install_element(OSPF6_NODE, &vtysh_quit_ospf6d_cmd);
install_element(OSPF6_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_OSPF6D */
/* ldpd */
#if defined(HAVE_LDPD)
#endif
/* eigrpd */
+#ifdef HAVE_EIGRPD
install_node(&eigrp_node);
install_element(CONFIG_NODE, &router_eigrp_cmd);
install_element(EIGRP_NODE, &vtysh_exit_eigrpd_cmd);
install_element(EIGRP_NODE, &vtysh_quit_eigrpd_cmd);
install_element(EIGRP_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_EIGRPD */
/* babeld */
+#ifdef HAVE_BABELD
install_node(&babel_node);
install_element(CONFIG_NODE, &router_babel_cmd);
install_element(BABEL_NODE, &vtysh_exit_babeld_cmd);
install_element(BABEL_NODE, &vtysh_quit_babeld_cmd);
install_element(BABEL_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_BABELD */
/* isisd */
+#ifdef HAVE_ISISD
install_node(&isis_node);
install_element(CONFIG_NODE, &router_isis_cmd);
install_element(ISIS_NODE, &vtysh_exit_isisd_cmd);
install_element(ISIS_NODE, &vtysh_quit_isisd_cmd);
install_element(ISIS_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_ISISD */
/* fabricd */
+#ifdef HAVE_FABRICD
install_node(&openfabric_node);
install_element(CONFIG_NODE, &router_openfabric_cmd);
install_element(OPENFABRIC_NODE, &vtysh_exit_fabricd_cmd);
install_element(OPENFABRIC_NODE, &vtysh_quit_fabricd_cmd);
install_element(OPENFABRIC_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_FABRICD */
/* pbrd */
+#ifdef HAVE_PBRD
install_node(&pbr_map_node);
install_element(CONFIG_NODE, &vtysh_pbr_map_cmd);
install_element(CONFIG_NODE, &vtysh_no_pbr_map_cmd);
install_element(PBRMAP_NODE, &vtysh_exit_pbr_map_cmd);
install_element(PBRMAP_NODE, &vtysh_quit_pbr_map_cmd);
install_element(PBRMAP_NODE, &vtysh_end_all_cmd);
+#endif /* HAVE_PBRD */
/* bfdd */
#if HAVE_BFDD > 0