version 1.1.1.2, 2012/10/09 09:22:28
|
version 1.1.1.3, 2013/07/21 23:54:37
|
Line 581 DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes,
|
Line 581 DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes,
|
"Neighbor to display information about\n" |
"Neighbor to display information about\n" |
"Display routes learned from neighbor\n") |
"Display routes learned from neighbor\n") |
{ |
{ |
union sockunion *su; | union sockunion su; |
struct peer *peer; |
struct peer *peer; |
| int ret; |
su = sockunion_str2su (argv[0]); | |
if (su == NULL) | ret = str2sockunion (argv[0], &su); |
| if (ret < 0) |
{ |
{ |
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE); |
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE); |
return CMD_WARNING; | return CMD_WARNING; |
} |
} |
|
|
peer = peer_lookup (NULL, su); | peer = peer_lookup (NULL, &su); |
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN]) |
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN]) |
{ |
{ |
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); |
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); |
return CMD_WARNING; |
return CMD_WARNING; |
} |
} |
|
|
return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_neighbor, su, 0); | return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_neighbor, &su, 0); |
} |
} |
|
|
DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, |
DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, |
Line 615 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
|
Line 616 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
|
"Display routes learned from neighbor\n") |
"Display routes learned from neighbor\n") |
{ |
{ |
int ret; |
int ret; |
union sockunion *su; | union sockunion su; |
struct peer *peer; |
struct peer *peer; |
struct prefix_rd prd; |
struct prefix_rd prd; |
|
|
Line 626 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
|
Line 627 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
|
return CMD_WARNING; |
return CMD_WARNING; |
} |
} |
|
|
su = sockunion_str2su (argv[1]); | ret = str2sockunion (argv[1], &su); |
if (su == NULL) | if (ret < 0) |
{ |
{ |
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE); |
vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE); |
return CMD_WARNING; | return CMD_WARNING; |
} |
} |
|
|
peer = peer_lookup (NULL, su); | peer = peer_lookup (NULL, &su); |
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN]) |
if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN]) |
{ |
{ |
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); |
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); |
return CMD_WARNING; |
return CMD_WARNING; |
} |
} |
|
|
return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_neighbor, su, 0); | return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_neighbor, &su, 0); |
} |
} |
|
|
DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, |
DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, |