DEFUN (show_ip_bgp_nexthop,
show_ip_bgp_nexthop_cmd,
- "show ip bgp nexthop",
- SHOW_STR
- IP_STR
- BGP_STR
- "BGP nexthop table\n")
-{
- return show_ip_bgp_nexthop_table (vty, NULL, 0);
-}
-
-DEFUN (show_ip_bgp_nexthop_detail,
- show_ip_bgp_nexthop_detail_cmd,
- "show ip bgp nexthop detail",
- SHOW_STR
- IP_STR
- BGP_STR
- "BGP nexthop table\n")
-{
- return show_ip_bgp_nexthop_table (vty, NULL, 1);
-}
-
-DEFUN (show_ip_bgp_instance_nexthop,
- show_ip_bgp_instance_nexthop_cmd,
- "show ip bgp <view|vrf> WORD nexthop",
+ "show [ip] bgp [<view|vrf> VRFNAME] nexthop [detail]",
SHOW_STR
IP_STR
BGP_STR
BGP_INSTANCE_HELP_STR
"BGP nexthop table\n")
{
- int idx_word = 4;
- return show_ip_bgp_nexthop_table (vty, argv[idx_word]->arg, 0);
+ int idx = 0;
+ char *vrf = argv_find (argv, argc, "VRFNAME", &idx) ? argv[idx]->arg : NULL;
+ int detail = argv_find (argv, argc, "detail", &idx) ? 1 : 0;
+ return show_ip_bgp_nexthop_table (vty, vrf, detail);
}
DEFUN (show_ip_bgp_instance_all_nexthop,
show_ip_bgp_instance_all_nexthop_cmd,
- "show ip bgp <view|vrf> all nexthop",
+ "show [ip] bgp <view|vrf> all nexthop",
SHOW_STR
IP_STR
BGP_STR
return CMD_SUCCESS;
}
-DEFUN (show_ip_bgp_instance_nexthop_detail,
- show_ip_bgp_instance_nexthop_detail_cmd,
- "show ip bgp <view|vrf> WORD nexthop detail",
- SHOW_STR
- IP_STR
- BGP_STR
- BGP_INSTANCE_HELP_STR
- "BGP nexthop table\n")
-{
- int idx_word = 4;
- return show_ip_bgp_nexthop_table (vty, argv[idx_word]->arg, 1);
-}
-
void
bgp_scan_init (struct bgp *bgp)
{
bgp_scan_vty_init (void)
{
install_element (VIEW_NODE, &show_ip_bgp_nexthop_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_nexthop_detail_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_instance_nexthop_cmd);
install_element (VIEW_NODE, &show_ip_bgp_instance_all_nexthop_cmd);
- install_element (VIEW_NODE, &show_ip_bgp_instance_nexthop_detail_cmd);
}
void
/* Show BGP's community internal data. */
DEFUN (show_ip_bgp_community_info,
show_ip_bgp_community_info_cmd,
- "show ip bgp community-info",
+ "show [ip] bgp community-info",
SHOW_STR
IP_STR
BGP_STR
DEFUN (show_ip_bgp_attr_info,
show_ip_bgp_attr_info_cmd,
- "show ip bgp attribute-info",
+ "show [ip] bgp attribute-info",
SHOW_STR
IP_STR
BGP_STR