forked from Mirror/frr
vtysh: fix some macro breakage
vtysh's extract.pl script doesn't cope with install_element(var, ) where "var" is not one of the FOO_NODE constants. Also, the future defun_lex tool doesn't deal well with preprocessor expansions in the same regard. This tries simplifying out some of these. lib/distribute.c needs further thinking. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
a7c36d8552
commit
34d5ef4591
|
@ -386,14 +386,9 @@ struct cmd_element
|
|||
|
||||
/* IPv4 only machine should not accept IPv6 address for peer's IP
|
||||
address. So we replace VTY command string like below. */
|
||||
#ifdef HAVE_IPV6
|
||||
#define NEIGHBOR_ADDR_STR "Neighbor address\nIPv6 address\n"
|
||||
#define NEIGHBOR_ADDR_STR2 "Neighbor address\nNeighbor IPv6 address\nInterface name or neighbor tag\n"
|
||||
#define NEIGHBOR_ADDR_STR3 "Neighbor address\nIPv6 address\nInterface name\n"
|
||||
#else
|
||||
#define NEIGHBOR_ADDR_STR "Neighbor address\n"
|
||||
#define NEIGHBOR_ADDR_STR2 "Neighbor address\nNeighbor tag\n"
|
||||
#endif /* HAVE_IPV6 */
|
||||
|
||||
/* Prototypes. */
|
||||
extern void install_node (struct cmd_node *, int (*) (struct vty *));
|
||||
|
|
|
@ -525,10 +525,16 @@ distribute_list_init (int node)
|
|||
|
||||
install_element (node, &distribute_list_cmd);
|
||||
install_element (node, &no_distribute_list_cmd);
|
||||
/*
|
||||
install_element (RIP_NODE, &distribute_list_cmd);
|
||||
install_element (RIP_NODE, &no_distribute_list_cmd);
|
||||
install_element (RIPNG_NODE, &distribute_list_cmd);
|
||||
install_element (RIPNG_NODE, &no_distribute_list_cmd);
|
||||
*/
|
||||
|
||||
/* install v6 */
|
||||
if (node == RIPNG_NODE) {
|
||||
install_element (node, &ipv6_distribute_list_cmd);
|
||||
install_element (RIPNG_NODE, &ipv6_distribute_list_cmd);
|
||||
}
|
||||
|
||||
/* TODO: install v4 syntax command for v6 only protocols. */
|
||||
|
|
|
@ -1191,12 +1191,13 @@ ospf6_top_init (void)
|
|||
install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd);
|
||||
install_element (OSPF6_NODE, &ospf6_stub_router_admin_cmd);
|
||||
install_element (OSPF6_NODE, &no_ospf6_stub_router_admin_cmd);
|
||||
/* For a later time
|
||||
/* For a later time */
|
||||
#if 0
|
||||
install_element (OSPF6_NODE, &ospf6_stub_router_startup_cmd);
|
||||
install_element (OSPF6_NODE, &no_ospf6_stub_router_startup_cmd);
|
||||
install_element (OSPF6_NODE, &ospf6_stub_router_shutdown_cmd);
|
||||
install_element (OSPF6_NODE, &no_ospf6_stub_router_shutdown_cmd);
|
||||
*/
|
||||
#endif
|
||||
|
||||
install_element (OSPF6_NODE, &ospf6_distance_cmd);
|
||||
install_element (OSPF6_NODE, &no_ospf6_distance_cmd);
|
||||
|
|
|
@ -1243,23 +1243,20 @@ ospf6_init (void)
|
|||
install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd);
|
||||
|
||||
#define INSTALL(n,c) \
|
||||
install_element (n ## _NODE, &show_ipv6_ospf6_ ## c)
|
||||
|
||||
INSTALL (VIEW, database_cmd);
|
||||
INSTALL (VIEW, database_type_cmd);
|
||||
INSTALL (VIEW, database_id_cmd);
|
||||
INSTALL (VIEW, database_router_cmd);
|
||||
INSTALL (VIEW, database_type_id_cmd);
|
||||
INSTALL (VIEW, database_type_router_cmd);
|
||||
INSTALL (VIEW, database_adv_router_linkstate_id_cmd);
|
||||
INSTALL (VIEW, database_id_router_cmd);
|
||||
INSTALL (VIEW, database_type_id_router_cmd);
|
||||
INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd);
|
||||
INSTALL (VIEW, database_self_originated_cmd);
|
||||
INSTALL (VIEW, database_type_self_originated_cmd);
|
||||
INSTALL (VIEW, database_type_id_self_originated_cmd);
|
||||
INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_id_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_router_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_id_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_router_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_adv_router_linkstate_id_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_id_router_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_id_router_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_self_originated_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_self_originated_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_id_self_originated_cmd);
|
||||
install_element (VIEW_NODE, &show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd);
|
||||
|
||||
/* Make ospf protocol socket. */
|
||||
ospf6_serv_sock ();
|
||||
|
|
Loading…
Reference in a new issue