summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6d.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-11 07:23:02 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-11-23 08:32:30 +0100
commit34d5ef459140ee7e8ae22c220764dba54b6527cf (patch)
treeade8d724fb7f11d75981b96db40caf1032abf59f /ospf6d/ospf6d.c
parentvtysh: initialise readline before binding key (diff)
downloadfrr-34d5ef459140ee7e8ae22c220764dba54b6527cf.tar.xz
frr-34d5ef459140ee7e8ae22c220764dba54b6527cf.zip
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>
Diffstat (limited to 'ospf6d/ospf6d.c')
-rw-r--r--ospf6d/ospf6d.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index c3b4005d1..c66a12489 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -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 ();