bgp_show_type_damp_neighbor
};
+static int
+bgp_show_prefix_list (struct vty *vty, const char *name,
+ const char *prefix_list_str, afi_t afi,
+ safi_t safi, enum bgp_show_type type);
+static int
+bgp_show_filter_list (struct vty *vty, const char *name,
+ const char *filter, afi_t afi,
+ safi_t safi, enum bgp_show_type type);
+static int
+bgp_show_route_map (struct vty *vty, const char *name,
+ const char *rmap_str, afi_t afi,
+ safi_t safi, enum bgp_show_type type);
+static int
+bgp_show_community_list (struct vty *vty, const char *name,
+ const char *com, int exact,
+ afi_t afi, safi_t safi);
+static int
+bgp_show_prefix_longer (struct vty *vty, const char *name,
+ const char *prefix, afi_t afi,
+ safi_t safi, enum bgp_show_type type);
+
static int
bgp_show_table (struct vty *vty, struct bgp_table *table, struct in_addr *router_id,
enum bgp_show_type type, void *output_arg, u_char use_json)
return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 0, BGP_PATH_ALL, use_json(argc, argv));
}
+DEFUN (show_ip_bgp_view_route_pathtype,
+ show_ip_bgp_view_route_pathtype_cmd,
+ "show ip bgp (view|vrf) WORD A.B.C.D (bestpath|multipath) {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Network in the BGP routing table to display\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+{
+ u_char uj = use_json(argc, argv);
+
+ if (strncmp (argv[3], "b", 1) == 0)
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 0, BGP_PATH_BESTPATH, uj);
+ else
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 0, BGP_PATH_MULTIPATH, uj);
+}
+
DEFUN (show_ip_bgp_view_prefix,
show_ip_bgp_view_prefix_cmd,
"show ip bgp (view|vrf) WORD A.B.C.D/M {json}",
return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, use_json(argc, argv));
}
+DEFUN (show_ip_bgp_view_prefix_pathtype,
+ show_ip_bgp_view_prefix_pathtype_cmd,
+ "show ip bgp (view|vrf) WORD A.B.C.D/M (bestpath|multipath) {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+{
+ u_char uj = use_json(argc, argv);
+ if (strncmp (argv[3], "b", 1) == 0)
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_BESTPATH, uj);
+ else
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj);
+}
+
#ifdef HAVE_IPV6
DEFUN (show_bgp,
show_bgp_cmd,
"Network in the BGP routing table to display\n"
"JavaScript Object Notation\n")
+DEFUN (show_bgp_view_route_pathtype,
+ show_bgp_view_route_pathtype_cmd,
+ "show bgp (view|vrf) WORD X:X::X:X (bestpath|multipath) {json}",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Network in the BGP routing table to display\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+{
+ u_char uj = use_json(argc, argv);
+ if (strncmp (argv[3], "b", 1) == 0)
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_BESTPATH, uj);
+ else
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_MULTIPATH, uj);
+}
+
+ALIAS (show_bgp_view_route_pathtype,
+ show_bgp_view_ipv6_route_pathtype_cmd,
+ "show bgp (view|vrf) WORD ipv6 X:X::X:X (bestpath|multipath) {json}",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "Network in the BGP routing table to display\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+
DEFUN (show_bgp_view_prefix,
show_bgp_view_prefix_cmd,
"show bgp (view|vrf) WORD X:X::X:X/M {json}",
"IPv6 prefix <network>/<length>\n"
"JavaScript Object Notation\n")
+DEFUN (show_bgp_view_prefix_pathtype,
+ show_bgp_view_prefix_pathtype_cmd,
+ "show bgp (view|vrf) WORD X:X::X:X/M (bestpath|multipath) {json}",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "IPv6 prefix <network>/<length>\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+{
+ u_char uj = use_json(argc, argv);
+ if (strncmp (argv[3], "b", 1) == 0)
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_BESTPATH, uj);
+ else
+ return bgp_show_route (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj);
+}
+
+ALIAS (show_bgp_view_prefix_pathtype,
+ show_bgp_view_ipv6_prefix_pathtype_cmd,
+ "show bgp (view|vrf) WORD ipv6 X:X::X:X/M (bestpath|multipath) {json}",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "IPv6 prefix <network>/<length>\n"
+ "Display only the bestpath\n"
+ "Display only multipaths\n"
+ "JavaScript Object Notation\n")
+
+DEFUN (show_bgp_view_prefix_list,
+ show_bgp_view_prefix_list_cmd,
+ "show bgp (view|vrf) WORD prefix-list WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes conforming to the prefix-list\n"
+ "IPv6 prefix-list name\n")
+{
+ return bgp_show_prefix_list (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST,
+ bgp_show_type_prefix_list);
+}
+
+ALIAS (show_bgp_view_prefix_list,
+ show_bgp_view_ipv6_prefix_list_cmd,
+ "show bgp (view|vrf) WORD ipv6 prefix-list WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "Display routes conforming to the prefix-list\n"
+ "IPv6 prefix-list name\n")
+
+DEFUN (show_bgp_view_filter_list,
+ show_bgp_view_filter_list_cmd,
+ "show bgp (view|vrf) WORD filter-list WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes conforming to the filter-list\n"
+ "Regular expression access list name\n")
+{
+ return bgp_show_filter_list (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST,
+ bgp_show_type_filter_list);
+}
+
+ALIAS (show_bgp_view_filter_list,
+ show_bgp_view_ipv6_filter_list_cmd,
+ "show bgp (view|vrf) WORD ipv6 filter-list WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "Display routes conforming to the filter-list\n"
+ "Regular expression access list name\n")
+
+DEFUN (show_bgp_view_route_map,
+ show_bgp_view_route_map_cmd,
+ "show bgp (view|vrf) WORD route-map WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes matching the route-map\n"
+ "A route-map to match on\n")
+{
+ return bgp_show_route_map (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST,
+ bgp_show_type_route_map);
+}
+
+ALIAS (show_bgp_view_route_map,
+ show_bgp_view_ipv6_route_map_cmd,
+ "show bgp (view|vrf) WORD ipv6 route-map WORD",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "Display routes matching the route-map\n"
+ "A route-map to match on\n")
+
+DEFUN (show_bgp_view_community_list,
+ show_bgp_view_community_list_cmd,
+ "show bgp (view|vrf) WORD community-list (<1-500>|WORD)",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes matching the community-list\n"
+ "community-list number\n"
+ "community-list name\n")
+{
+ return bgp_show_community_list (vty, argv[1], argv[2], 0, AFI_IP6, SAFI_UNICAST);
+}
+
+ALIAS (show_bgp_view_community_list,
+ show_bgp_view_ipv6_community_list_cmd,
+ "show bgp (view|vrf) WORD ipv6 community-list (<1-500>|WORD)",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "Display routes matching the community-list\n"
+ "community-list number\n"
+ "community-list name\n")
+
+DEFUN (show_bgp_view_prefix_longer,
+ show_bgp_view_prefix_longer_cmd,
+ "show bgp (view|vrf) WORD X:X::X:X/M longer-prefixes",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "IPv6 prefix <network>/<length>\n"
+ "Display route and more specific routes\n")
+{
+ return bgp_show_prefix_longer (vty, argv[1], argv[2], AFI_IP6, SAFI_UNICAST,
+ bgp_show_type_prefix_longer);
+}
+
+ALIAS (show_bgp_view_prefix_longer,
+ show_bgp_view_ipv6_prefix_longer_cmd,
+ "show bgp (view|vrf) WORD ipv6 X:X::X:X/M longer-prefixes",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Address family\n"
+ "IPv6 prefix <network>/<length>\n"
+ "Display route and more specific routes\n")
+
/* old command */
DEFUN (show_ipv6_mbgp,
show_ipv6_mbgp_cmd,
#endif /* HAVE_IPV6 */
static int
-bgp_show_prefix_list (struct vty *vty, const char *prefix_list_str, afi_t afi,
+bgp_show_prefix_list (struct vty *vty, const char *name,
+ const char *prefix_list_str, afi_t afi,
safi_t safi, enum bgp_show_type type)
{
struct prefix_list *plist;
+ struct bgp *bgp = NULL;
+
+ if (name && !(bgp = bgp_lookup_by_name(name)))
+ {
+ vty_out (vty, "%% No such BGP instance exists%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
plist = prefix_list_lookup (afi, prefix_list_str);
if (plist == NULL)
return CMD_WARNING;
}
- return bgp_show (vty, NULL, afi, safi, type, plist, 0);
+ return bgp_show (vty, bgp, afi, safi, type, plist, 0);
}
DEFUN (show_ip_bgp_prefix_list,
"Display routes conforming to the prefix-list\n"
"IP prefix-list name\n")
{
- return bgp_show_prefix_list (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
+ bgp_show_type_prefix_list);
+}
+
+DEFUN (show_ip_bgp_view_prefix_list,
+ show_ip_bgp_view_prefix_list_cmd,
+ "show ip bgp (view|vrf) WORD prefix-list WORD",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes conforming to the prefix-list\n"
+ "IP prefix-list name\n")
+{
+ return bgp_show_prefix_list (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST,
bgp_show_type_prefix_list);
}
"Display routes conforming to the prefix-list\n"
"IP prefix-list name\n")
{
- return bgp_show_prefix_list (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_prefix_list);
}
"IP prefix-list name\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_prefix_list (vty, argv[1], AFI_IP, SAFI_MULTICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[1], AFI_IP, SAFI_MULTICAST,
bgp_show_type_prefix_list);
- return bgp_show_prefix_list (vty, argv[1], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[1], AFI_IP, SAFI_UNICAST,
bgp_show_type_prefix_list);
}
"Display routes conforming to the prefix-list\n"
"IPv6 prefix-list name\n")
{
- return bgp_show_prefix_list (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_prefix_list);
}
"IPv6 prefix-list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_prefix_list (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_prefix_list);
}
"IPv6 prefix-list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_prefix_list (vty, argv[0], AFI_IP6, SAFI_MULTICAST,
+ return bgp_show_prefix_list (vty, NULL, argv[0], AFI_IP6, SAFI_MULTICAST,
bgp_show_type_prefix_list);
}
#endif /* HAVE_IPV6 */
static int
-bgp_show_filter_list (struct vty *vty, const char *filter, afi_t afi,
+bgp_show_filter_list (struct vty *vty, const char *name,
+ const char *filter, afi_t afi,
safi_t safi, enum bgp_show_type type)
{
struct as_list *as_list;
+ struct bgp *bgp = NULL;
+
+ if (name && !(bgp = bgp_lookup_by_name(name)))
+ {
+ vty_out (vty, "%% No such BGP instance exists%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
as_list = as_list_lookup (filter);
if (as_list == NULL)
return CMD_WARNING;
}
- return bgp_show (vty, NULL, afi, safi, type, as_list, 0);
+ return bgp_show (vty, bgp, afi, safi, type, as_list, 0);
}
DEFUN (show_ip_bgp_filter_list,
"Display routes conforming to the filter-list\n"
"Regular expression access list name\n")
{
- return bgp_show_filter_list (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_filter_list (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
+ bgp_show_type_filter_list);
+}
+
+DEFUN (show_ip_bgp_view_filter_list,
+ show_ip_bgp_view_filter_list_cmd,
+ "show ip bgp (view|vrf) WORD filter-list WORD",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes conforming to the filter-list\n"
+ "Regular expression access list name\n")
+{
+ return bgp_show_filter_list (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST,
bgp_show_type_filter_list);
}
"Display routes conforming to the filter-list\n"
"Regular expression access list name\n")
{
- return bgp_show_filter_list (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_filter_list (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_filter_list);
}
"Regular expression access list name\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_filter_list (vty, argv[1], AFI_IP, SAFI_MULTICAST,
+ return bgp_show_filter_list (vty, NULL, argv[1], AFI_IP, SAFI_MULTICAST,
bgp_show_type_filter_list);
- return bgp_show_filter_list (vty, argv[1], AFI_IP, SAFI_UNICAST,
+ return bgp_show_filter_list (vty, NULL, argv[1], AFI_IP, SAFI_UNICAST,
bgp_show_type_filter_list);
}
"Display routes conforming to the filter-list\n"
"Regular expression access list name\n")
{
- return bgp_show_filter_list (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_filter_list (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_filter_list);
}
"Regular expression access list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_filter_list (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_filter_list (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_filter_list);
}
"Regular expression access list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_filter_list (vty, argv[0], AFI_IP6, SAFI_MULTICAST,
+ return bgp_show_filter_list (vty, NULL, argv[0], AFI_IP6, SAFI_MULTICAST,
bgp_show_type_filter_list);
}
#endif /* HAVE_IPV6 */
static int
-bgp_show_route_map (struct vty *vty, const char *rmap_str, afi_t afi,
+bgp_show_route_map (struct vty *vty, const char *name,
+ const char *rmap_str, afi_t afi,
safi_t safi, enum bgp_show_type type)
{
struct route_map *rmap;
+ struct bgp *bgp = NULL;
+
+ if (name && !(bgp = bgp_lookup_by_name(name)))
+ {
+ vty_out (vty, "%% No such BGP instance exists%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
rmap = route_map_lookup_by_name (rmap_str);
if (! rmap)
return CMD_WARNING;
}
- return bgp_show (vty, NULL, afi, safi, type, rmap, 0);
+ return bgp_show (vty, bgp, afi, safi, type, rmap, 0);
}
DEFUN (show_ip_bgp_route_map,
"Display routes matching the route-map\n"
"A route-map to match on\n")
{
- return bgp_show_route_map (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_route_map (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
+ bgp_show_type_route_map);
+}
+
+DEFUN (show_ip_bgp_view_route_map,
+ show_ip_bgp_view_route_map_cmd,
+ "show ip bgp (view|vrf) WORD route-map WORD",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes matching the route-map\n"
+ "A route-map to match on\n")
+{
+ return bgp_show_route_map (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST,
bgp_show_type_route_map);
}
"Display routes matching the route-map\n"
"A route-map to match on\n")
{
- return bgp_show_route_map (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_route_map (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_route_map);
}
"A route-map to match on\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_route_map (vty, argv[1], AFI_IP, SAFI_MULTICAST,
+ return bgp_show_route_map (vty, NULL, argv[1], AFI_IP, SAFI_MULTICAST,
bgp_show_type_route_map);
- return bgp_show_route_map (vty, argv[1], AFI_IP, SAFI_UNICAST,
+ return bgp_show_route_map (vty, NULL, argv[1], AFI_IP, SAFI_UNICAST,
bgp_show_type_route_map);
}
"Display routes matching the route-map\n"
"A route-map to match on\n")
{
- return bgp_show_route_map (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_route_map (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_route_map);
}
#endif /* HAVE_IPV6 */
static int
-bgp_show_community_list (struct vty *vty, const char *com, int exact,
+bgp_show_community_list (struct vty *vty, const char *name,
+ const char *com, int exact,
afi_t afi, safi_t safi)
{
struct community_list *list;
+ struct bgp *bgp = NULL;
+
+ if (name && !(bgp = bgp_lookup_by_name(name)))
+ {
+ vty_out (vty, "%% No such BGP instance exists%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
list = community_list_lookup (bgp_clist, com, COMMUNITY_LIST_MASTER);
if (list == NULL)
return CMD_WARNING;
}
- return bgp_show (vty, NULL, afi, safi,
+ return bgp_show (vty, bgp, afi, safi,
(exact ? bgp_show_type_community_list_exact :
bgp_show_type_community_list), list, 0);
}
"community-list number\n"
"community-list name\n")
{
- return bgp_show_community_list (vty, argv[0], 0, AFI_IP, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 0, AFI_IP, SAFI_UNICAST);
+}
+
+DEFUN (show_ip_bgp_view_community_list,
+ show_ip_bgp_view_community_list_cmd,
+ "show ip bgp (view|vrf) WORD community-list (<1-500>|WORD)",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Display routes matching the community-list\n"
+ "community-list number\n"
+ "community-list name\n")
+{
+ return bgp_show_community_list (vty, argv[1], argv[2], 0, AFI_IP, SAFI_UNICAST);
}
DEFUN (show_ip_bgp_ipv4_community_list,
"community-list name\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_community_list (vty, argv[1], 0, AFI_IP, SAFI_MULTICAST);
+ return bgp_show_community_list (vty, NULL, argv[1], 0, AFI_IP, SAFI_MULTICAST);
- return bgp_show_community_list (vty, argv[1], 0, AFI_IP, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[1], 0, AFI_IP, SAFI_UNICAST);
}
DEFUN (show_ip_bgp_community_list_exact,
"community-list name\n"
"Exact match of the communities\n")
{
- return bgp_show_community_list (vty, argv[0], 1, AFI_IP, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 1, AFI_IP, SAFI_UNICAST);
}
DEFUN (show_ip_bgp_ipv4_community_list_exact,
"Exact match of the communities\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_community_list (vty, argv[1], 1, AFI_IP, SAFI_MULTICAST);
+ return bgp_show_community_list (vty, NULL, argv[1], 1, AFI_IP, SAFI_MULTICAST);
- return bgp_show_community_list (vty, argv[1], 1, AFI_IP, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[1], 1, AFI_IP, SAFI_UNICAST);
}
#ifdef HAVE_IPV6
"community-list number\n"
"community-list name\n")
{
- return bgp_show_community_list (vty, argv[0], 0, AFI_IP6, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 0, AFI_IP6, SAFI_UNICAST);
}
ALIAS (show_bgp_community_list,
"community-list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_community_list (vty, argv[0], 0, AFI_IP6, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 0, AFI_IP6, SAFI_UNICAST);
}
/* old command */
"community-list name\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_community_list (vty, argv[0], 0, AFI_IP6, SAFI_MULTICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 0, AFI_IP6, SAFI_MULTICAST);
}
DEFUN (show_bgp_community_list_exact,
"community-list name\n"
"Exact match of the communities\n")
{
- return bgp_show_community_list (vty, argv[0], 1, AFI_IP6, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 1, AFI_IP6, SAFI_UNICAST);
}
ALIAS (show_bgp_community_list_exact,
"Exact match of the communities\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_community_list (vty, argv[0], 1, AFI_IP6, SAFI_UNICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 1, AFI_IP6, SAFI_UNICAST);
}
/* old command */
"Exact match of the communities\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_community_list (vty, argv[0], 1, AFI_IP6, SAFI_MULTICAST);
+ return bgp_show_community_list (vty, NULL, argv[0], 1, AFI_IP6, SAFI_MULTICAST);
}
#endif /* HAVE_IPV6 */
static int
-bgp_show_prefix_longer (struct vty *vty, const char *prefix, afi_t afi,
+bgp_show_prefix_longer (struct vty *vty, const char *name,
+ const char *prefix, afi_t afi,
safi_t safi, enum bgp_show_type type)
{
int ret;
struct prefix *p;
+ struct bgp *bgp = NULL;
+
+ if (name && !(bgp = bgp_lookup_by_name(name)))
+ {
+ vty_out (vty, "%% No such BGP instance exists%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
p = prefix_new();
return CMD_WARNING;
}
- ret = bgp_show (vty, NULL, afi, safi, type, p, 0);
+ ret = bgp_show (vty, bgp, afi, safi, type, p, 0);
prefix_free(p);
return ret;
}
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
"Display route and more specific routes\n")
{
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
+ bgp_show_type_prefix_longer);
+}
+
+DEFUN (show_ip_bgp_view_prefix_longer,
+ show_ip_bgp_view_prefix_longer_cmd,
+ "show ip bgp (view|vrf) WORD A.B.C.D/M longer-prefixes",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+ "Display route and more specific routes\n")
+{
+ return bgp_show_prefix_longer (vty, argv[1], argv[2], AFI_IP, SAFI_UNICAST,
bgp_show_type_prefix_longer);
}
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
"Display route and more specific routes\n")
{
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_prefix_longer);
}
"Display route and more specific routes\n")
{
if (strncmp (argv[0], "m", 1) == 0)
- return bgp_show_prefix_longer (vty, argv[1], AFI_IP, SAFI_MULTICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[1], AFI_IP, SAFI_MULTICAST,
bgp_show_type_prefix_longer);
- return bgp_show_prefix_longer (vty, argv[1], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[1], AFI_IP, SAFI_UNICAST,
bgp_show_type_prefix_longer);
}
"Display flap statistics of routes\n"
"Network in the BGP routing table to display\n")
{
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_address);
}
"Display flap statistics of routes\n"
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
{
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP, SAFI_UNICAST,
bgp_show_type_flap_prefix);
}
#ifdef HAVE_IPV6
"IPv6 prefix <network>/<length>\n"
"Display route and more specific routes\n")
{
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_prefix_longer);
}
"Display route and more specific routes\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP6, SAFI_UNICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP6, SAFI_UNICAST,
bgp_show_type_prefix_longer);
}
"Display route and more specific routes\n")
{
bgp_show_ipv6_bgp_deprecate_warning(vty);
- return bgp_show_prefix_longer (vty, argv[0], AFI_IP6, SAFI_MULTICAST,
+ return bgp_show_prefix_longer (vty, NULL, argv[0], AFI_IP6, SAFI_MULTICAST,
bgp_show_type_prefix_longer);
}
#endif /* HAVE_IPV6 */
return bgp_peer_counts (vty, peer, AFI_IP, SAFI_UNICAST, uj);
}
+DEFUN (show_ip_bgp_view_neighbor_prefix_counts,
+ show_ip_bgp_view_neighbor_prefix_counts_cmd,
+ "show ip bgp (view|vrf) WORD neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Neighbor on bgp configured interface\n"
+ "Display detailed prefix count information\n"
+ "JavaScript Object Notation\n")
+{
+ struct peer *peer;
+ u_char uj = use_json(argc, argv);
+
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
+ if (! peer)
+ return CMD_WARNING;
+
+ return bgp_peer_counts (vty, peer, AFI_IP, SAFI_UNICAST, uj);
+}
+
DEFUN (show_bgp_ipv6_neighbor_prefix_counts,
show_bgp_ipv6_neighbor_prefix_counts_cmd,
"show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}",
return bgp_peer_counts (vty, peer, AFI_IP6, SAFI_UNICAST, uj);
}
+DEFUN (show_bgp_view_ipv6_neighbor_prefix_counts,
+ show_bgp_view_ipv6_neighbor_prefix_counts_cmd,
+ "show bgp (view|vrf) WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}",
+ SHOW_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF 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"
+ "Neighbor on bgp configured interface\n"
+ "Display detailed prefix count information\n"
+ "JavaScript Object Notation\n")
+{
+ struct peer *peer;
+ u_char uj = use_json(argc, argv);
+
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
+ if (! peer)
+ return CMD_WARNING;
+
+ return bgp_peer_counts (vty, peer, AFI_IP6, SAFI_UNICAST, uj);
+}
+
DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts,
show_ip_bgp_ipv4_neighbor_prefix_counts_cmd,
"show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}",
"Display the routes advertised to a BGP neighbor\n"
"JavaScript Object Notation\n")
+ALIAS (show_ip_bgp_view_neighbor_advertised_route,
+ show_ip_bgp_view_neighbor_advertised_route_rmap_cmd,
+ "show ip bgp (view|vrf) WORD neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Neighbor on bgp configured interface\n"
+ "Display the routes advertised to a BGP neighbor\n"
+ "JavaScript Object Notation\n")
DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route,
show_ip_bgp_ipv4_neighbor_advertised_route_cmd,
"show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}",
struct peer *peer;
u_char uj = use_json(argc, argv);
- if (uj)
- {
- if (argc == 4)
- peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
- else
- peer = peer_lookup_in_view (vty, NULL, argv[1], uj);
- }
- else
- {
- if (argc == 3)
- peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
- else
- peer = peer_lookup_in_view (vty, NULL, argv[1], uj);
- }
-
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
if (! peer)
return CMD_WARNING;
struct peer *peer;
u_char uj = use_json(argc, argv);
- if (argc == 4 || (argc == 3 && argv[2] && strcmp(argv[2], "json") != 0))
- peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
- else
- peer = peer_lookup_in_view (vty, NULL, argv[1], uj);
-
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
if (! peer)
return CMD_WARNING;
"Display the received routes from neighbor\n"
"JavaScript Object Notation\n")
+ALIAS (show_ip_bgp_view_neighbor_received_routes,
+ show_ip_bgp_view_neighbor_received_routes_rmap_cmd,
+ "show ip bgp (view|vrf) WORD neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Neighbor on bgp configured interface\n"
+ "Display the received routes from neighbor\n"
+ "JavaScript Object Notation\n")
+
DEFUN (show_ip_bgp_ipv4_neighbor_received_routes,
show_ip_bgp_ipv4_neighbor_received_routes_cmd,
"show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}",
return CMD_SUCCESS;
}
#ifdef HAVE_IPV6
-ALIAS (show_bgp_view_neighbor_received_routes,
+DEFUN (show_bgp_neighbor_received_routes,
show_bgp_neighbor_received_routes_cmd,
"show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}",
SHOW_STR
"Neighbor on bgp configured interface\n"
"Display the received routes from neighbor\n"
"JavaScript Object Notation\n")
+{
+ struct peer *peer;
+ const char *rmap_name = NULL;
+ u_char uj = use_json(argc, argv);
-ALIAS (show_bgp_view_neighbor_received_routes,
+ peer = peer_lookup_in_view (vty, NULL, argv[0], uj);
+
+ if (! peer)
+ return CMD_WARNING;
+
+ if (argc == 3 || (argc == 2 && argv[1] && strcmp(argv[1], "json") != 0))
+ rmap_name = argv[1];
+
+ return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 1, rmap_name, uj);
+}
+
+ALIAS (show_bgp_neighbor_received_routes,
show_bgp_ipv6_neighbor_received_routes_cmd,
"show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}",
SHOW_STR
"JavaScript Object Notation\n")
/* old command */
-ALIAS (show_bgp_view_neighbor_received_routes,
+ALIAS (show_bgp_neighbor_received_routes,
ipv6_bgp_neighbor_received_routes_cmd,
"show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}",
SHOW_STR
bgp_show_type_neighbor, uj);
}
+DEFUN (show_ip_bgp_view_neighbor_routes,
+ show_ip_bgp_view_neighbor_routes_cmd,
+ "show ip bgp (view|vrf) WORD neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}",
+ SHOW_STR
+ IP_STR
+ BGP_STR
+ "BGP view\nBGP VRF\n"
+ "View/VRF name\n"
+ "Detailed information on TCP and BGP neighbor connections\n"
+ "Neighbor to display information about\n"
+ "Neighbor to display information about\n"
+ "Neighbor on bgp configured interface\n"
+ "Display routes learned from neighbor\n"
+ "JavaScript Object Notation\n")
+{
+ struct peer *peer;
+ u_char uj = use_json(argc, argv);
+
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
+ if (! peer)
+ return CMD_WARNING;
+
+ return bgp_show_neighbor_route (vty, peer, AFI_IP, SAFI_UNICAST,
+ bgp_show_type_neighbor, uj);
+}
+
DEFUN (show_ip_bgp_neighbor_flap,
show_ip_bgp_neighbor_flap_cmd,
"show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}",
struct peer *peer;
u_char uj = use_json(argc, argv);
- if ((argc == 4 && argv[3] && strcmp(argv[3], "json") == 0)
- || (argc == 3 && argv[2] && strcmp(argv[2], "json") != 0))
- peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
- else
- peer = peer_lookup_in_view (vty, NULL, argv[1], uj);
-
+ peer = peer_lookup_in_view (vty, argv[1], argv[2], uj);
if (! peer)
return CMD_WARNING;
"Display flap statistics of the routes learned from neighbor\n"
"JavaScript Object Notation\n")
-ALIAS (show_bgp_view_neighbor_routes,
+DEFUN (show_bgp_neighbor_routes,
show_bgp_neighbor_routes_cmd,
"show bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}",
SHOW_STR
"Neighbor on bgp configured interface\n"
"Display routes learned from neighbor\n"
"JavaScript Object Notation\n")
+{
+ struct peer *peer;
+ u_char uj = use_json(argc, argv);
+ peer = peer_lookup_in_view (vty, NULL, argv[0], uj);
+ if (! peer)
+ return CMD_WARNING;
-ALIAS (show_bgp_view_neighbor_routes,
+ return bgp_show_neighbor_route (vty, peer, AFI_IP6, SAFI_UNICAST,
+ bgp_show_type_neighbor, uj);
+}
+
+
+ALIAS (show_bgp_neighbor_routes,
show_bgp_ipv6_neighbor_routes_cmd,
"show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}",
SHOW_STR
"JavaScript Object Notation\n")
/* old command */
-ALIAS (show_bgp_view_neighbor_routes,
+ALIAS (show_bgp_neighbor_routes,
ipv6_bgp_neighbor_routes_cmd,
"show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}",
SHOW_STR
install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_summary_as_set_cmd);
install_element (VIEW_NODE, &show_ip_bgp_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_safi_cmd);
install_element (VIEW_NODE, &show_ip_bgp_route_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_route_pathtype_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_route_pathtype_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_route_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_safi_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_prefix_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_prefix_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd);
install_element (VIEW_NODE, &show_bgp_ipv4_safi_prefix_cmd);
install_element (VIEW_NODE, &show_ip_bgp_prefix_pathtype_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_prefix_pathtype_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd);
install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_prefix_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_view_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_view_route_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_view_prefix_cmd);
+
install_element (VIEW_NODE, &show_ip_bgp_regexp_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_regexp_cmd);
install_element (VIEW_NODE, &show_ip_bgp_prefix_list_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_prefix_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_filter_list_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_filter_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_filter_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_route_map_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_route_map_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_route_map_cmd);
install_element (VIEW_NODE, &show_ip_bgp_cidr_only_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_cidr_only_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_community3_exact_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_community4_exact_cmd);
install_element (VIEW_NODE, &show_ip_bgp_community_list_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_community_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_list_cmd);
install_element (VIEW_NODE, &show_ip_bgp_community_list_exact_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_list_exact_cmd);
install_element (VIEW_NODE, &show_ip_bgp_prefix_longer_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_prefix_longer_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_longer_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_advertised_route_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_advertised_route_rmap_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_advertised_route_rmap_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_rmap_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_routes_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_routes_rmap_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_received_routes_rmap_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_rmap_cmd);
install_element (VIEW_NODE, &show_bgp_view_afi_safi_neighbor_adv_recd_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_routes_cmd);
+ install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_routes_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_route_map_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_flap_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_damp_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
/* Restricted node: VIEW_NODE - (set of dangerous commands) */
install_element (RESTRICTED_NODE, &show_ip_bgp_route_cmd);
+ install_element (RESTRICTED_NODE, &show_ip_bgp_view_route_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_route_pathtype_cmd);
+ install_element (RESTRICTED_NODE, &show_ip_bgp_view_route_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_route_cmd);
install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_route_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_cmd);
+ install_element (RESTRICTED_NODE, &show_ip_bgp_view_prefix_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_pathtype_cmd);
+ install_element (RESTRICTED_NODE, &show_ip_bgp_view_prefix_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_prefix_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_view_route_cmd);
install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community4_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv4_safi_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_route_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_route_pathtype_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_route_pathtype_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_route_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv4_safi_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_prefix_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_prefix_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv4_safi_prefix_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_prefix_pathtype_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_prefix_pathtype_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_prefix_cmd);
- install_element (ENABLE_NODE, &show_ip_bgp_view_cmd);
- install_element (ENABLE_NODE, &show_ip_bgp_view_route_cmd);
- install_element (ENABLE_NODE, &show_ip_bgp_view_prefix_cmd);
+
install_element (ENABLE_NODE, &show_ip_bgp_regexp_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_regexp_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_prefix_list_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_prefix_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_filter_list_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_filter_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_filter_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_route_map_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_route_map_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_route_map_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_cidr_only_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_cidr_only_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community3_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community4_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_community_list_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_community_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_list_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_community_list_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_list_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_prefix_longer_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_prefix_longer_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_longer_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_advertised_route_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_advertised_route_rmap_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_advertised_route_rmap_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_rmap_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_routes_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_routes_rmap_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_received_routes_rmap_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_rmap_cmd);
install_element (ENABLE_NODE, &show_bgp_view_afi_safi_neighbor_adv_recd_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_routes_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_routes_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_route_map_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_flap_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_damp_cmd);
- install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_advertised_route_cmd);
- install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_received_routes_cmd);
/* BGP dampening clear commands */
install_element (ENABLE_NODE, &clear_ip_bgp_dampening_cmd);
/* prefix count */
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_prefix_counts_cmd);
+ install_element (ENABLE_NODE, &show_ip_bgp_view_neighbor_prefix_counts_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_prefix_counts_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_neighbor_prefix_counts_cmd);
#ifdef HAVE_IPV6
install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_prefix_counts_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_neighbor_prefix_counts_cmd);
/* New config IPv6 BGP commands. */
install_element (BGP_IPV6_NODE, &bgp_table_map_cmd);
install_element (VIEW_NODE, &show_bgp_view_ipv6_cmd);
install_element (VIEW_NODE, &show_bgp_view_route_cmd);
install_element (VIEW_NODE, &show_bgp_view_ipv6_route_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_route_pathtype_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_route_pathtype_cmd);
install_element (VIEW_NODE, &show_bgp_view_prefix_cmd);
install_element (VIEW_NODE, &show_bgp_view_ipv6_prefix_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_prefix_pathtype_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_prefix_pathtype_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_prefix_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_prefix_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_filter_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_filter_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_route_map_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_route_map_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_community_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_community_list_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_prefix_longer_cmd);
+ install_element (VIEW_NODE, &show_bgp_view_ipv6_prefix_longer_cmd);
install_element (VIEW_NODE, &show_bgp_view_neighbor_advertised_route_cmd);
install_element (VIEW_NODE, &show_bgp_view_ipv6_neighbor_advertised_route_cmd);
install_element (VIEW_NODE, &show_bgp_view_neighbor_received_routes_cmd);
install_element (RESTRICTED_NODE, &show_bgp_ipv6_community4_exact_cmd);
install_element (RESTRICTED_NODE, &show_bgp_view_route_cmd);
install_element (RESTRICTED_NODE, &show_bgp_view_ipv6_route_cmd);
+ install_element (RESTRICTED_NODE, &show_bgp_view_route_pathtype_cmd);
+ install_element (RESTRICTED_NODE, &show_bgp_view_ipv6_route_pathtype_cmd);
install_element (RESTRICTED_NODE, &show_bgp_view_prefix_cmd);
install_element (RESTRICTED_NODE, &show_bgp_view_ipv6_prefix_cmd);
install_element (RESTRICTED_NODE, &show_bgp_view_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_cmd);
install_element (ENABLE_NODE, &show_bgp_view_route_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_route_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_route_pathtype_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_route_pathtype_cmd);
install_element (ENABLE_NODE, &show_bgp_view_prefix_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_prefix_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_prefix_pathtype_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_prefix_pathtype_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_prefix_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_prefix_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_filter_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_filter_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_route_map_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_route_map_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_community_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_community_list_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_prefix_longer_cmd);
+ install_element (ENABLE_NODE, &show_bgp_view_ipv6_prefix_longer_cmd);
install_element (ENABLE_NODE, &show_bgp_view_neighbor_advertised_route_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_neighbor_advertised_route_cmd);
install_element (ENABLE_NODE, &show_bgp_view_neighbor_received_routes_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_neighbor_flap_cmd);
install_element (ENABLE_NODE, &show_bgp_view_neighbor_damp_cmd);
install_element (ENABLE_NODE, &show_bgp_view_ipv6_neighbor_damp_cmd);
-
+
/* Statistics */
install_element (ENABLE_NODE, &show_bgp_statistics_cmd);
install_element (ENABLE_NODE, &show_bgp_statistics_vpnv4_cmd);