summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorJoachim Nilsson <troglobit@gmail.com>2012-05-09 13:38:36 +0200
committerDavid Lamparter <equinox@diac24.net>2012-05-09 13:51:54 +0200
commit36735ed988f96810e78d0ace2f7d8e6397db5c50 (patch)
tree3a8f876383d07a33aa7b76d7519a75d8678bbb1f /zebra/zebra_vty.c
parent42cb6b6655d0cc141374ec373220d244f81fbba0 (diff)
zebra: fix up compilation without rtadv/IPv6
let's ground the rtadv.h file if route advertisements are disabled. And fix up the CLI for it, as well as move the "show ip mroute" to its proper place. * zebra/rtadv.h: #ifdef RTADV * zebra/main.c: #ifdef RTADV * zebra/zebra_vty.c: move "show ip mroute" out of #ifdef IPV6 From: Joachim Nilsson <troglobit@gmail.com> [moved #ifdef RTADV to rtadv.h] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c73
1 files changed, 34 insertions, 39 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 8a57be91..743c13fe 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1197,6 +1197,40 @@ DEFUN (show_ip_protocol,
return CMD_SUCCESS;
}
+/*
+ * Show IP mroute command to dump the BGP Multicast
+ * routing table
+ */
+DEFUN (show_ip_mroute,
+ show_ip_mroute_cmd,
+ "show ip mroute",
+ SHOW_STR
+ IP_STR
+ "IP Multicast routing table\n")
+{
+ struct route_table *table;
+ struct route_node *rn;
+ struct rib *rib;
+ int first = 1;
+
+ table = vrf_table (AFI_IP, SAFI_MULTICAST, 0);
+ if (! table)
+ return CMD_SUCCESS;
+
+ /* Show all IPv4 routes. */
+ for (rn = route_top (table); rn; rn = route_next (rn))
+ for (rib = rn->info; rib; rib = rib->next)
+ {
+ if (first)
+ {
+ vty_out (vty, SHOW_ROUTE_V4_HEADER);
+ first = 0;
+ }
+ vty_show_ip_route (vty, rn, rib);
+ }
+ return CMD_SUCCESS;
+}
+
#ifdef HAVE_IPV6
/* General fucntion for IPv6 static route. */
@@ -1952,40 +1986,6 @@ DEFUN (show_ipv6_route_summary,
}
/*
- * Show IP mroute command to dump the BGP Multicast
- * routing table
- */
-DEFUN (show_ip_mroute,
- show_ip_mroute_cmd,
- "show ip mroute",
- SHOW_STR
- IP_STR
- "IP Multicast routing table\n")
-{
- struct route_table *table;
- struct route_node *rn;
- struct rib *rib;
- int first = 1;
-
- table = vrf_table (AFI_IP, SAFI_MULTICAST, 0);
- if (! table)
- return CMD_SUCCESS;
-
- /* Show all IPv4 routes. */
- for (rn = route_top (table); rn; rn = route_next (rn))
- for (rib = rn->info; rib; rib = rib->next)
- {
- if (first)
- {
- vty_out (vty, SHOW_ROUTE_V4_HEADER);
- first = 0;
- }
- vty_show_ip_route (vty, rn, rib);
- }
- return CMD_SUCCESS;
-}
-
-/*
* Show IPv6 mroute command.Used to dump
* the Multicast routing table.
*/
@@ -2020,11 +2020,6 @@ DEFUN (show_ipv6_mroute,
return CMD_SUCCESS;
}
-
-
-
-
-
/* Write IPv6 static route configuration. */
static int
static_config_ipv6 (struct vty *vty)