2003-10-24 Jose Luis Rubio Guivernau <jrubio@dit.upm.es>
* Better 'show bgp' support for views (eg ipv6), see [quagga-dev 238]
* bgpd/bgp_route.c: (bgp_show) Take a struct bgp argument instead of
view string.
(bgp_show_neighbor_route) Take a struct peer argument instead of
ip string.
(peer_adj_routes) ditto
(show_adj_routes) ditto
(peer_lookup_in_view) new function to return appropriate struct
peer for a given view string.
(misc) Fixup all calls to above to reflect new calling arguments,
and use peer_lookup_in_view as needed. Additional commands
installed to use expanded functionality above, existing commands
modified to suit as well.
* bgpd/bgp_vty.c: 2 new aliases.
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 39a43c0..58ff5c5 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -6973,6 +6973,25 @@
return bgp_show_neighbor_vty (vty, argv[0], show_all, NULL);
}
+ALIAS (show_ip_bgp_instance_neighbors,
+ show_bgp_instance_neighbors_cmd,
+ "show bgp view WORD neighbors",
+ SHOW_STR
+ BGP_STR
+ "BGP view\n"
+ "View name\n"
+ "Detailed information on TCP and BGP neighbor connections\n")
+
+ALIAS (show_ip_bgp_instance_neighbors,
+ show_bgp_instance_ipv6_neighbors_cmd,
+ "show bgp view WORD ipv6 neighbors",
+ SHOW_STR
+ BGP_STR
+ "BGP view\n"
+ "View name\n"
+ "Address family\n"
+ "Detailed information on TCP and BGP neighbor connections\n")
+
DEFUN (show_ip_bgp_instance_neighbors_peer,
show_ip_bgp_instance_neighbors_peer_cmd,
"show ip bgp view WORD neighbors (A.B.C.D|X:X::X:X)",
@@ -6987,7 +7006,30 @@
{
return bgp_show_neighbor_vty (vty, argv[0], show_peer, argv[1]);
}
-
+
+ALIAS (show_ip_bgp_instance_neighbors_peer,
+ show_bgp_instance_neighbors_peer_cmd,
+ "show bgp view WORD neighbors (A.B.C.D|X:X::X:X)",
+ SHOW_STR
+ BGP_STR
+ "BGP view\n"
+ "View name\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n")
+
+ALIAS (show_ip_bgp_instance_neighbors_peer,
+ show_bgp_instance_ipv6_neighbors_peer_cmd,
+ "show bgp view WORD ipv6 neighbors (A.B.C.D|X:X::X:X)",
+ SHOW_STR
+ BGP_STR
+ "BGP view\n"
+ "View name\n"
+ "Address family\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n")
+
/* Show BGP's AS paths internal data. There are both `show ip bgp
paths' and `show ip mbgp paths'. Those functions results are the
same.*/
@@ -8502,10 +8544,18 @@
install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd);
install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
+ install_element (VIEW_NODE, &show_bgp_instance_neighbors_cmd);
+ install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd);
+ install_element (VIEW_NODE, &show_bgp_instance_neighbors_peer_cmd);
+ install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
install_element (ENABLE_NODE, &show_bgp_neighbors_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_cmd);
install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
+ install_element (ENABLE_NODE, &show_bgp_instance_neighbors_cmd);
+ install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_cmd);
+ install_element (ENABLE_NODE, &show_bgp_instance_neighbors_peer_cmd);
+ install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
/* Old commands. */
install_element (VIEW_NODE, &show_ipv6_bgp_summary_cmd);