• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/zebra/bgpd/

Lines Matching refs:vty

44 bgp_node_afi (struct vty *vty)
46 if (vty->node == BGP_IPV6_NODE)
54 bgp_node_safi (struct vty *vty)
56 if (vty->node == BGP_VPNV4_NODE)
58 if (vty->node == BGP_IPV4M_NODE)
83 peer_lookup_vty (struct vty *vty, char *ip_str)
90 bgp = vty->index;
95 vty_out (vty, "%% Malformed address: %s%s", ip_str, VTY_NEWLINE);
101 vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
108 vty_out (vty, "%% Specify remote-as or peer-group commands first%s", VTY_NEWLINE);
116 peer_and_group_lookup_vty (struct vty *vty, char *peer_str)
124 bgp = vty->index;
131 vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
146 vty_out (vty, "%% Specify remote-as or peer-group commands first%s",
153 bgp_vty_return (struct vty *vty, int ret)
216 vty_out (vty, "%% %s%s", str, VTY_NEWLINE);
246 vty_out (vty, "%% There are more than two BGP instances%s", VTY_NEWLINE);
320 vty_out (vty, "Please specify 'bgp multiple-instance' first%s",
325 vty_out (vty, "BGP is already running; AS is %d%s", as, VTY_NEWLINE);
329 vty_out (vty, "BGP view name and AS number mismatch%s", VTY_NEWLINE);
330 vty_out (vty, "BGP instance is already running; AS is %d%s",
336 vty->node = BGP_NODE;
337 vty->index = bgp;
374 vty_out (vty, "%% Can't find BGP instance%s", VTY_NEWLINE);
407 bgp = vty->index;
412 vty_out (vty, "%% Malformed bgp router identifier%s", VTY_NEWLINE);
432 bgp = vty->index;
439 vty_out (vty, "%% Malformed BGP router identifier%s", VTY_NEWLINE);
445 vty_out (vty, "%% BGP router-id doesn't match%s", VTY_NEWLINE);
477 bgp = vty->index;
482 vty_out (vty, "%% Malformed bgp cluster identifier%s", VTY_NEWLINE);
509 bgp = vty->index;
516 vty_out (vty, "%% Malformed bgp cluster identifier%s", VTY_NEWLINE);
546 bgp = vty->index;
566 bgp = vty->index;
598 bgp = vty->index;
606 vty_out (vty, "%% Local member-AS not allowed in confed peer list%s",
629 bgp = vty->index;
655 bgp = vty->index;
663 vty_out (vty, "%% hold time value must be either 0 or greater than 3%s",
682 bgp = vty->index;
707 bgp = vty->index;
722 bgp = vty->index;
736 bgp = vty->index;
750 bgp = vty->index;
765 bgp = vty->index;
779 bgp = vty->index;
794 bgp = vty->index;
808 bgp = vty->index;
823 bgp = vty->index;
837 bgp = vty->index;
853 bgp = vty->index;
868 bgp = vty->index;
885 bgp = vty->index;
901 bgp = vty->index;
919 bgp = vty->index;
940 bgp = vty->index;
967 bgp = vty->index;
989 bgp = vty->index;
1017 bgp = vty->index;
1031 bgp = vty->index;
1047 bgp = vty->index;
1062 bgp = vty->index;
1079 bgp = vty->index;
1098 bgp = vty->index;
1114 peer_remote_as_vty (struct vty *vty, char *peer_str, char *as_str, afi_t afi,
1122 bgp = vty->index;
1134 vty_out (vty, "%% Create the peer-group first%s", VTY_NEWLINE);
1142 vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
1152 vty_out (vty, "%% Peer-group AS %d. Cannot configure remote-as for member%s", as, VTY_NEWLINE);
1156 vty_out (vty, "%% The AS# can not be changed from %d to %s, peer-group members must be all internal or all external%s", as, as_str, VTY_NEWLINE);
1160 return bgp_vty_return (vty, ret);
1171 return peer_remote_as_vty (vty, argv[0], argv[1], AFI_IP, SAFI_UNICAST);
1185 bgp = vty->index;
1209 group = peer_group_lookup (vty->index, argv[0]);
1214 vty_out (vty, "%% Create the peer-group first%s", VTY_NEWLINE);
1222 vty_out (vty, "%% Cannot configure the local system as neighbor%s",
1227 peer = peer_lookup (vty->index, &su);
1254 group = peer_group_lookup (vty->index, argv[0]);
1259 vty_out (vty, "%% Create the peer-group first%s", VTY_NEWLINE);
1276 group = peer_group_lookup (vty->index, argv[0]);
1281 vty_out (vty, "%% Create the peer-group first%s", VTY_NEWLINE);
1299 peer = peer_and_group_lookup_vty (vty, argv[0]);
1304 return bgp_vty_return (vty, ret);
1319 peer = peer_and_group_lookup_vty (vty, argv[0]);
1324 return bgp_vty_return (vty, ret);
1338 peer = peer_and_group_lookup_vty (vty, argv[0]);
1343 return bgp_vty_return (vty, ret);
1375 peer = peer_and_group_lookup_vty (vty, argv[0]);
1379 peer_activate (peer, bgp_node_afi (vty), bgp_node_safi (vty));
1396 peer = peer_and_group_lookup_vty (vty, argv[0]);
1400 ret = peer_deactivate (peer, bgp_node_afi (vty), bgp_node_safi (vty));
1402 return bgp_vty_return (vty, ret);
1420 bgp = vty->index;
1425 vty_out (vty, "%% Malformed address: %s%s", argv[0], VTY_NEWLINE);
1432 vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
1436 ret = peer_group_bind (bgp, &su, group, bgp_node_afi (vty),
1437 bgp_node_safi (vty), &as);
1441 vty_out (vty, "%% Peer with AS %d cannot be in this peer-group, members must be all internal or all external%s", as, VTY_NEWLINE);
1445 return bgp_vty_return (vty, ret);
1462 bgp = vty->index;
1464 peer = peer_lookup_vty (vty, argv[0]);
1471 vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
1475 ret = peer_group_unbind (bgp, peer, group, bgp_node_afi (vty),
1476 bgp_node_safi (vty));
1478 return bgp_vty_return (vty, ret);
1483 peer_flag_modify_vty (struct vty *vty, char *ip_str, u_int16_t flag, int set)
1488 peer = peer_and_group_lookup_vty (vty, ip_str);
1497 return bgp_vty_return (vty, ret);
1501 peer_flag_set_vty (struct vty *vty, char *ip_str, u_int16_t flag)
1503 return peer_flag_modify_vty (vty, ip_str, flag, 1);
1507 peer_flag_unset_vty (struct vty *vty, char *ip_str, u_int16_t flag)
1509 return peer_flag_modify_vty (vty, ip_str, flag, 0);
1520 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_PASSIVE);
1531 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_PASSIVE);
1543 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_SHUTDOWN);
1554 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_SHUTDOWN);
1567 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_NO_ROUTE_REFRESH_CAP);
1579 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_NO_ROUTE_REFRESH_CAP);
1592 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_DYNAMIC_CAPABILITY);
1604 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DYNAMIC_CAPABILITY);
1616 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_DONT_CAPABILITY);
1627 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DONT_CAPABILITY);
1632 peer_af_flag_modify_vty (struct vty *vty, char *peer_str, afi_t afi,
1638 peer = peer_and_group_lookup_vty (vty, peer_str);
1647 return bgp_vty_return (vty, ret);
1651 peer_af_flag_set_vty (struct vty *vty, char *peer_str, afi_t afi,
1654 return peer_af_flag_modify_vty (vty, peer_str, afi, safi, flag, 1);
1658 peer_af_flag_unset_vty (struct vty *vty, char *peer_str, afi_t afi,
1661 return peer_af_flag_modify_vty (vty, peer_str, afi, safi, flag, 0);
1689 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1690 bgp_node_safi (vty), flag);
1717 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1718 bgp_node_safi (vty), flag);
1730 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1731 bgp_node_safi (vty), PEER_FLAG_NEXTHOP_SELF);
1742 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1743 bgp_node_safi (vty), PEER_FLAG_NEXTHOP_SELF);
1755 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1756 bgp_node_safi (vty),
1768 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1769 bgp_node_safi (vty),
1782 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1783 bgp_node_safi (vty),
1795 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1796 bgp_node_safi (vty),
1813 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1814 bgp_node_safi (vty),
1817 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1818 bgp_node_safi (vty),
1821 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1822 bgp_node_safi (vty),
1839 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1840 bgp_node_safi (vty),
1843 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1844 bgp_node_safi (vty),
1847 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1848 bgp_node_safi (vty),
1863 return peer_af_flag_set_vty (vty, argv[0],
1864 bgp_node_afi (vty), bgp_node_safi (vty),
1877 return peer_af_flag_unset_vty (vty, argv[0],
1878 bgp_node_afi (vty), bgp_node_safi (vty),
1893 peer = peer_and_group_lookup_vty (vty, argv[0]);
1897 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1898 bgp_node_safi (vty),
1910 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1911 bgp_node_safi (vty),
1924 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1925 bgp_node_safi (vty),
1937 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
1938 bgp_node_safi (vty),
1950 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1951 bgp_node_safi (vty),
1976 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1977 bgp_node_safi (vty), flags);
1997 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
1998 bgp_node_safi (vty), flags);
2019 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
2020 bgp_node_safi (vty), flags);
2040 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
2041 bgp_node_safi (vty), flags);
2112 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
2113 bgp_node_safi (vty),
2139 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
2140 bgp_node_safi (vty), flags);
2161 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
2162 bgp_node_safi (vty), flags);
2183 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
2184 bgp_node_safi (vty), flags);
2205 return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
2206 bgp_node_safi (vty), flags);
2283 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
2284 bgp_node_safi (vty),
2295 return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
2296 bgp_node_safi (vty),
2303 peer_ebgp_multihop_set_vty (struct vty *vty, char *ip_str, char *ttl_str)
2308 peer = peer_and_group_lookup_vty (vty, ip_str);
2323 peer_ebgp_multihop_unset_vty (struct vty *vty, char *ip_str)
2327 peer = peer_and_group_lookup_vty (vty, ip_str);
2344 return peer_ebgp_multihop_set_vty (vty, argv[0], NULL);
2355 return peer_ebgp_multihop_set_vty (vty, argv[0], argv[1]);
2366 return peer_ebgp_multihop_unset_vty (vty, argv[0]);
2387 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_ENFORCE_MULTIHOP);
2398 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_ENFORCE_MULTIHOP);
2415 peer = peer_and_group_lookup_vty (vty, argv[0]);
2451 peer = peer_and_group_lookup_vty (vty, argv[0]);
2472 peer_update_source_vty (struct vty *vty, char *peer_str, char *source_str)
2477 peer = peer_and_group_lookup_vty (vty, peer_str);
2506 return peer_update_source_vty (vty, argv[0], argv[1]);
2518 return peer_update_source_vty (vty, argv[0], NULL);
2523 peer_default_originate_set_vty (struct vty *vty, char *ip_str, afi_t afi,
2529 peer = peer_lookup_vty (vty, ip_str);
2538 return bgp_vty_return (vty, ret);
2549 return peer_default_originate_set_vty (vty, argv[0], bgp_node_afi (vty),
2550 bgp_node_safi (vty), NULL, 1);
2562 return peer_default_originate_set_vty (vty, argv[0], bgp_node_afi (vty),
2563 bgp_node_safi (vty), argv[1], 1);
2574 return peer_default_originate_set_vty (vty, argv[0], bgp_node_afi (vty),
2575 bgp_node_safi (vty), NULL, 0);
2591 peer_port_vty (struct vty *vty, char *ip_str, int afi, char *port_str)
2597 peer = peer_lookup_vty (vty, ip_str);
2625 return peer_port_vty (vty, argv[0], AFI_IP, argv[1]);
2636 return peer_port_vty (vty, argv[0], AFI_IP, NULL);
2651 peer_weight_set_vty (struct vty *vty, char *ip_str, char *weight_str)
2657 peer = peer_and_group_lookup_vty (vty, ip_str);
2669 peer_weight_unset_vty (struct vty *vty, char *ip_str)
2673 peer = peer_and_group_lookup_vty (vty, ip_str);
2690 return peer_weight_set_vty (vty, argv[0], argv[1]);
2701 return peer_weight_unset_vty (vty, argv[0]);
2722 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_OVERRIDE_CAPABILITY);
2733 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_OVERRIDE_CAPABILITY);
2744 return peer_flag_set_vty (vty, argv[0], PEER_FLAG_STRICT_CAP_MATCH);
2755 return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_STRICT_CAP_MATCH);
2760 peer_timers_set_vty (struct vty *vty, char *ip_str, char *keep_str,
2768 peer = peer_and_group_lookup_vty (vty, ip_str);
2777 return bgp_vty_return (vty, ret);
2782 peer_timers_unset_vty (struct vty *vty, char *ip_str)
2787 peer = peer_lookup_vty (vty, ip_str);
2793 return bgp_vty_return (vty, ret);
2805 return peer_timers_set_vty (vty, argv[0], argv[1], argv[2]);
2816 return peer_timers_unset_vty (vty, argv[0]);
2821 peer_timers_connect_set_vty (struct vty *vty, char *ip_str, char *time_str)
2827 peer = peer_lookup_vty (vty, ip_str);
2839 peer_timers_connect_unset_vty (struct vty *vty, char *ip_str)
2844 peer = peer_and_group_lookup_vty (vty, ip_str);
2862 return peer_timers_connect_set_vty (vty, argv[0], argv[1]);
2874 return peer_timers_connect_unset_vty (vty, argv[0]);
2889 peer_advertise_interval_vty (struct vty *vty, char *ip_str, char *time_str,
2896 peer = peer_lookup_vty (vty, ip_str);
2919 return peer_advertise_interval_vty (vty, argv[0], argv[1], 1);
2930 return peer_advertise_interval_vty (vty, argv[0], NULL, 0);
2944 peer_version_vty (struct vty *vty, char *ip_str, char *str)
2950 peer = peer_lookup_vty (vty, ip_str);
2979 return peer_version_vty (vty, argv[0], argv[1]);
2990 return peer_version_vty (vty, argv[0], NULL);
2996 peer_interface_vty (struct vty *vty, char *ip_str, char *str)
3001 peer = peer_lookup_vty (vty, ip_str);
3021 return peer_interface_vty (vty, argv[0], argv[1]);
3033 return peer_interface_vty (vty, argv[0], NULL);
3039 peer_distribute_set_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
3046 peer = peer_and_group_lookup_vty (vty, ip_str);
3058 return bgp_vty_return (vty, ret);
3062 peer_distribute_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
3069 peer = peer_and_group_lookup_vty (vty, ip_str);
3081 return bgp_vty_return (vty, ret);
3096 return peer_distribute_set_vty (vty, argv[0], bgp_node_afi (vty),
3097 bgp_node_safi (vty), argv[1], argv[2]);
3113 return peer_distribute_unset_vty (vty, argv[0], bgp_node_afi (vty),
3114 bgp_node_safi (vty), argv[2]);
3120 peer_prefix_list_set_vty (struct vty *vty, char *ip_str, afi_t afi,
3127 peer = peer_and_group_lookup_vty (vty, ip_str);
3139 return bgp_vty_return (vty, ret);
3143 peer_prefix_list_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
3150 peer = peer_and_group_lookup_vty (vty, ip_str);
3162 return bgp_vty_return (vty, ret);
3175 return peer_prefix_list_set_vty (vty, argv[0], bgp_node_afi (vty),
3176 bgp_node_safi (vty), argv[1], argv[2]);
3190 return peer_prefix_list_unset_vty (vty, argv[0], bgp_node_afi (vty),
3191 bgp_node_safi (vty), argv[2]);
3196 peer_aslist_set_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
3203 peer = peer_and_group_lookup_vty (vty, ip_str);
3215 return bgp_vty_return (vty, ret);
3219 peer_aslist_unset_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
3226 peer = peer_and_group_lookup_vty (vty, ip_str);
3238 return bgp_vty_return (vty, ret);
3251 return peer_aslist_set_vty (vty, argv[0], bgp_node_afi (vty),
3252 bgp_node_safi (vty), argv[1], argv[2]);
3266 return peer_aslist_unset_vty (vty, argv[0], bgp_node_afi (vty),
3267 bgp_node_safi (vty), argv[2]);
3273 peer_route_map_set_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
3280 peer = peer_and_group_lookup_vty (vty, ip_str);
3292 return bgp_vty_return (vty, ret);
3296 peer_route_map_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
3303 peer = peer_and_group_lookup_vty (vty, ip_str);
3316 return bgp_vty_return (vty, ret);
3329 return peer_route_map_set_vty (vty, argv[0], bgp_node_afi (vty),
3330 bgp_node_safi (vty), argv[1], argv[2]);
3344 return peer_route_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
3345 bgp_node_safi (vty), argv[2]);
3351 peer_unsuppress_map_set_vty (struct vty *vty, char *ip_str, afi_t afi,
3357 peer = peer_and_group_lookup_vty (vty, ip_str);
3363 return bgp_vty_return (vty, ret);
3368 peer_unsuppress_map_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
3374 peer = peer_and_group_lookup_vty (vty, ip_str);
3380 return bgp_vty_return (vty, ret);
3391 return peer_unsuppress_map_set_vty (vty, argv[0], bgp_node_afi (vty),
3392 bgp_node_safi (vty), argv[1]);
3404 return peer_unsuppress_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
3405 bgp_node_safi (vty));
3410 peer_maximum_prefix_set_vty (struct vty *vty, char *ip_str, afi_t afi,
3417 peer = peer_lookup_vty (vty, ip_str);
3425 return bgp_vty_return (vty, ret);
3429 peer_maximum_prefix_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
3435 peer = peer_lookup_vty (vty, ip_str);
3441 return bgp_vty_return (vty, ret);
3455 return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
3456 bgp_node_safi (vty), argv[1], 0);
3468 return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
3469 bgp_node_safi (vty), argv[1], 1);
3480 return peer_maximum_prefix_unset_vty (vty, argv[0], bgp_node_afi (vty),
3481 bgp_node_safi (vty));
3516 peer = peer_and_group_lookup_vty (vty, argv[0]);
3525 ret = peer_allowas_in_set (peer, bgp_node_afi (vty), bgp_node_safi (vty),
3528 return bgp_vty_return (vty, ret);
3550 peer = peer_and_group_lookup_vty (vty, argv[0]);
3554 ret = peer_allowas_in_unset (peer, bgp_node_afi (vty), bgp_node_safi (vty));
3556 return bgp_vty_return (vty, ret);
3567 vty->node = BGP_IPV4_NODE;
3580 vty->node = BGP_IPV4M_NODE;
3582 vty->node = BGP_IPV4_NODE;
3594 vty->node = BGP_IPV6_NODE;
3610 vty->node = BGP_VPNV4_NODE;
3626 if (vty->node == BGP_IPV4M_NODE
3627 || vty->node == BGP_VPNV4_NODE
3628 || vty->node == BGP_IPV6_NODE)
3629 vty->node = BGP_NODE;
3645 bgp_clear_vty_error (struct vty *vty, struct peer *peer, afi_t afi,
3651 vty_out (vty,
3658 vty_out (vty, "%%BGP: Inbound soft reconfig for %s not possible as it%s has neither refresh capability, nor inbound soft reconfig%s", peer->host, VTY_NEWLINE, VTY_NEWLINE);
3667 bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
3685 bgp_clear_vty_error (vty, peer, afi, safi, ret);
3700 vty_out (vty, "Malformed address: %s%s", arg, VTY_NEWLINE);
3706 vty_out (vty, "%%BGP: Unknown neighbor - \"%s\"%s", arg, VTY_NEWLINE);
3716 bgp_clear_vty_error (vty, peer, afi, safi, ret);
3729 vty_out (vty, "%%BGP: No such peer-group %s%s", arg, VTY_NEWLINE);
3747 bgp_clear_vty_error (vty, peer, afi, safi, ret);
3765 bgp_clear_vty_error (vty, peer, afi, safi, ret);
3781 vty_out (vty, "Invalid AS number%s", VTY_NEWLINE);
3798 bgp_clear_vty_error (vty, peer, afi, safi, ret);
3801 vty_out (vty, "%%BGP: No peer is configured with AS %s%s", arg,
3810 bgp_clear_vty (struct vty *vty, char *name, afi_t afi, safi_t safi,
3822 vty_out (vty, "Can't find BGP view %s%s", name, VTY_NEWLINE);
3831 vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
3836 ret = bgp_clear (vty, bgp, afi, safi, sort, stype, arg);
3852 return bgp_clear_vty (vty, argv[0], 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL);
3854 return bgp_clear_vty (vty, NULL, 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL);
3900 return bgp_clear_vty (vty, NULL, 0, 0, clear_peer, BGP_CLEAR_SOFT_NONE, argv[0]);
3929 return bgp_clear_vty (vty, NULL, 0, 0, clear_group, BGP_CLEAR_SOFT_NONE, argv[0]);
3957 return bgp_clear_vty (vty, NULL, 0, 0, clear_external, BGP_CLEAR_SOFT_NONE, NULL);
3983 return bgp_clear_vty (vty, NULL, 0, 0, clear_as, BGP_CLEAR_SOFT_NONE, argv[0]);
4014 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4017 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4056 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
4059 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4090 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
4093 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4109 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
4134 return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
4137 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
4189 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
4216 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
4219 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
4247 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
4272 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
4317 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
4346 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
4349 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
4376 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
4420 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
4447 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
4450 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
4475 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
4516 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
4543 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
4546 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
4574 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
4598 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
4642 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4645 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4681 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4684 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4715 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
4718 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4750 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
4753 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4771 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
4774 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
4792 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
4795 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
4811 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
4836 return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
4839 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
4890 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
4914 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
4937 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
4955 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
4958 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
4988 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
4991 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
5007 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
5032 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
5076 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
5102 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5127 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5146 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
5149 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5181 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
5184 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5198 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
5242 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
5267 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5290 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5308 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
5311 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5341 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
5344 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5357 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
5397 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
5421 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
5444 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
5462 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
5465 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
5495 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
5498 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
5514 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
5538 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
5578 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
5604 return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
5607 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
5636 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
5639 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
5658 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
5661 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
5676 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
5689 return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
5692 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
5724 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
5741 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
5744 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
5759 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
5772 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
5796 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5814 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
5817 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
5830 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
5853 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5870 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
5873 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
5885 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
5907 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
5924 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
5927 return bgp_clear_vty (vty, NULL,AFI_IP, SAFI_UNICAST, clear_as,
5942 return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
5954 return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
5970 bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi)
5987 vty_out (vty,
5990 vty_out (vty,
5993 vty_out (vty,
5998 vty_out (vty, "Dampening enabled.%s", VTY_NEWLINE);
5999 vty_out (vty, "%s", VTY_NEWLINE);
6000 vty_out (vty, "%s%s", header, VTY_NEWLINE);
6004 len = vty_out (vty, "%s", peer->host);
6007 vty_out (vty, "%s%*s", VTY_NEWLINE, 16, " ");
6009 vty_out (vty, "%*s", len, " ");
6014 vty_out (vty, "4 ");
6017 vty_out (vty, "4-");
6021 vty_out (vty, "%5d %7d %7d %8d %4d %4ld ",
6029 vty_out (vty, "%8s",
6034 vty_out (vty, " %8ld", peer->pcount[afi][safi]);
6039 vty_out (vty, " Idle (Admin)");
6041 vty_out (vty, " Idle (PfxCt)");
6043 vty_out (vty, " %-11s", LOOKUP(bgp_status_msg, peer->status));
6046 vty_out (vty, "%s", VTY_NEWLINE);
6051 vty_out (vty, "%sTotal number of neighbors %d%s", VTY_NEWLINE,
6054 vty_out (vty, "No %s neighbor is configured%s",
6060 bgp_show_summary_vty (struct vty *vty, char *name, afi_t afi, safi_t safi)
6070 vty_out (vty, "%% No such BGP instance exist%s", VTY_NEWLINE);
6074 bgp_show_summary (vty, bgp, afi, safi);
6081 bgp_show_summary (vty, bgp, afi, safi);
6095 return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
6108 return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
6123 return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
6125 return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
6142 return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST);
6144 return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
6157 return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
6177 vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
6181 return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
6192 return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
6204 return bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
6234 return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
6246 return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
6259 bgp_show_peer_afi_orf_cap (struct vty *vty, struct peer *p,
6268 vty_out (vty, " Send-mode: ");
6270 vty_out (vty, "advertised");
6272 vty_out (vty, "%sreceived",
6275 vty_out (vty, "%s", VTY_NEWLINE);
6282 vty_out (vty, " Receive-mode: ");
6284 vty_out (vty, "advertised");
6286 vty_out (vty, "%sreceived",
6289 vty_out (vty, "%s", VTY_NEWLINE);
6294 bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi)
6302 vty_out (vty, " For address family: %s %s%s",
6308 vty_out (vty, " %s peer-group member%s", p->group->name, VTY_NEWLINE);
6316 vty_out (vty, " AF-dependant capabilities:%s", VTY_NEWLINE);
6323 vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:%s",
6325 bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
6336 vty_out (vty, " Outbound Route Filter (ORF) type (%d) Prefix-list:%s",
6338 bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
6351 vty_out (vty, " Outbound Route Filter (ORF):");
6353 vty_out (vty, " sent;");
6355 vty_out (vty, " received (%d entries)", orf_pfx_count);
6356 vty_out (vty, "%s", VTY_NEWLINE);
6359 vty_out (vty, " First update is deferred until ORF or ROUTE-REFRESH is received%s", VTY_NEWLINE);
6362 vty_out (vty, " Route-Reflector Client%s", VTY_NEWLINE);
6364 vty_out (vty, " Route-Server Client%s", VTY_NEWLINE);
6366 vty_out (vty, " Inbound soft reconfiguration allowed%s", VTY_NEWLINE);
6368 vty_out (vty, " Private AS number removed from updates to this neighbor%s", VTY_NEWLINE);
6370 vty_out (vty, " NEXT_HOP is always this router%s", VTY_NEWLINE);
6372 vty_out (vty, " AS_PATH is propagated unchanged to this neighbor%s", VTY_NEWLINE);
6374 vty_out (vty, " NEXT_HOP is propagated unchanged to this neighbor%s", VTY_NEWLINE);
6376 vty_out (vty, " MED is propagated unchanged to this neighbor%s", VTY_NEWLINE);
6380 vty_out (vty, " Community attribute sent to this neighbor");
6383 vty_out (vty, " (both)%s", VTY_NEWLINE);
6385 vty_out (vty, " (extended)%s", VTY_NEWLINE);
6387 vty_out (vty, " (standard)%s", VTY_NEWLINE);
6391 vty_out (vty, " Default information originate,");
6394 vty_out (vty, " default route-map %s%s,",
6398 vty_out (vty, " default sent%s", VTY_NEWLINE);
6400 vty_out (vty, " default not sent%s", VTY_NEWLINE);
6407 vty_out (vty, " Inbound path policy configured%s", VTY_NEWLINE);
6413 vty_out (vty, " Outbound path policy configured%s", VTY_NEWLINE);
6417 vty_out (vty, " Incoming update prefix filter list is %s%s%s",
6422 vty_out (vty, " Outgoing update prefix filter list is %s%s%s",
6429 vty_out (vty, " Incoming update network filter list is %s%s%s",
6434 vty_out (vty, " Outgoing update network filter list is %s%s%s",
6441 vty_out (vty, " Incoming update AS path filter list is %s%s%s",
6446 vty_out (vty, " Outgoing update AS path filter list is %s%s%s",
6453 vty_out (vty, " Route map for incoming advertisements is %s%s%s",
6458 vty_out (vty, " Route map for outgoing advertisements is %s%s%s",
6465 vty_out (vty, " Route map for selective unsuppress is %s%s%s",
6470 vty_out (vty, " %ld accepted prefixes",
6475 vty_out (vty, ", maximum limit %ld%s",
6479 vty_out (vty, "%s", VTY_NEWLINE);
6481 vty_out (vty, "%s", VTY_NEWLINE);
6485 bgp_show_peer (struct vty *vty, struct peer *p)
6494 vty_out (vty, "BGP neighbor is %s, ", p->host);
6495 vty_out (vty, "remote AS %d, ", p->as);
6496 vty_out (vty, "local AS %d%s, ",
6500 vty_out (vty, "%s link%s",
6506 vty_out (vty, " Description: %s%s", p->desc, VTY_NEWLINE);
6510 vty_out (vty, " Member of peer-group %s for session parameters%s",
6515 vty_out (vty, " Administratively shut down%s", VTY_NEWLINE);
6518 vty_out (vty, " BGP version 4");
6520 vty_out (vty, "(with draft-00 verion of multiporotocol extension)");
6521 vty_out (vty, ", remote router ID %s%s",
6527 vty_out (vty, " Neighbor under common administration%s", VTY_NEWLINE);
6530 vty_out (vty, " BGP state = %s",
6533 vty_out (vty, ", up for %8s",
6535 vty_out (vty, "%s", VTY_NEWLINE);
6538 vty_out (vty, " Last read %s", peer_uptime (p->readtime, timebuf, BGP_UPTIME_LEN));
6541 vty_out (vty, ", hold time is %d, keepalive interval is %d seconds%s",
6545 vty_out (vty, " Configured hold time is %d", p->holdtime);
6546 vty_out (vty, ", keepalive interval is %d seconds%s",
6571 vty_out (vty, " Neighbor capabilities:%s", VTY_NEWLINE);
6577 vty_out (vty, " Dynamic:");
6579 vty_out (vty, " advertised");
6583 vty_out (vty, " and");
6584 vty_out (vty, " received");
6586 vty_out (vty, "%s", VTY_NEWLINE);
6594 vty_out (vty, " Route refresh:");
6596 vty_out (vty, " advertised");
6601 vty_out (vty, " and");
6602 vty_out (vty, " received");
6605 vty_out (vty, " (old and new)");
6607 vty_out (vty, " (old)");
6609 vty_out (vty, " (new)");
6611 vty_out (vty, "%s", VTY_NEWLINE);
6618 vty_out (vty, " Address family IPv4 Unicast:");
6620 vty_out (vty, " advertised");
6624 vty_out (vty, " and");
6625 vty_out (vty, " received");
6627 vty_out (vty, "%s", VTY_NEWLINE);
6631 vty_out (vty, " Address family IPv4 Multicast:");
6633 vty_out (vty, " advertised");
6637 vty_out (vty, " and");
6638 vty_out (vty, " received");
6640 vty_out (vty, "%s", VTY_NEWLINE);
6644 vty_out (vty, " Address family VPNv4 Unicast:");
6646 vty_out (vty, " advertised");
6650 vty_out (vty, " and");
6651 vty_out (vty, " received");
6653 vty_out (vty, "%s", VTY_NEWLINE);
6659 vty_out (vty, " Address family IPv6 Unicast:");
6661 vty_out (vty, " advertised");
6665 vty_out (vty, " and");
6666 vty_out (vty, " received");
6668 vty_out (vty, "%s", VTY_NEWLINE);
6672 vty_out (vty, " Address family IPv6 Multicast:");
6674 vty_out (vty, " advertised");
6678 vty_out (vty, " and");
6679 vty_out (vty, " received");
6681 vty_out (vty, "%s", VTY_NEWLINE);
6688 vty_out(vty, " Received %d messages, %d notifications, %d in queue%s",
6691 vty_out(vty, " Sent %d messages, %d notifications, %ld in queue%s",
6694 vty_out(vty, " Route refresh request: received %d, sent %d%s",
6698 vty_out (vty, " Minimum time between advertisement runs is %d seconds%s",
6704 vty_out (vty, " Update source is ");
6706 vty_out (vty, "%s", p->update_if);
6708 vty_out (vty, "%s",
6710 vty_out (vty, "%s", VTY_NEWLINE);
6715 vty_out (vty, " Default weight %d%s", p->weight,
6718 vty_out (vty, "%s", VTY_NEWLINE);
6722 bgp_show_peer_afi (vty, p, AFI_IP, SAFI_UNICAST);
6724 bgp_show_peer_afi (vty, p, AFI_IP, SAFI_MULTICAST);
6726 bgp_show_peer_afi (vty, p, AFI_IP, SAFI_MPLS_VPN);
6729 bgp_show_peer_afi (vty, p, AFI_IP6, SAFI_UNICAST);
6731 bgp_show_peer_afi (vty, p, AFI_IP6, SAFI_MULTICAST);
6734 vty_out (vty, " Connections established %d; dropped %d%s",
6740 vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.%s", VTY_NEWLINE);
6741 vty_out (vty, " Reduce the no. of prefix and clear ip bgp %s to restore peering%s",
6747 vty_out (vty, " External BGP neighbor may be up to %d hops away.%s",
6753 vty_out (vty, "Local host: %s, Local port: %d%s%s",
6764 vty_out (vty, "Foreign host: %s, Foreign port: %d%s",
6773 vty_out (vty, "Nexthop: %s%s",
6777 vty_out (vty, "Nexthop global: %s%s",
6780 vty_out (vty, "Nexthop local: %s%s",
6783 vty_out (vty, "BGP connection: %s%s",
6791 vty_out (vty, "Next start timer due in %ld seconds%s",
6794 vty_out (vty, "Next connect timer due in %ld seconds%s",
6797 vty_out (vty, "Read thread: %s Write thread: %s%s",
6804 bgp_capability_vty_out (vty, p);
6806 vty_out (vty, "%s", VTY_NEWLINE);
6810 bgp_show_neighbor (struct vty *vty, struct bgp *bgp,
6822 bgp_show_peer (vty, peer);
6828 bgp_show_peer (vty, peer);
6835 vty_out (vty, "%% No such neighbor%s", VTY_NEWLINE);
6841 bgp_show_neighbor_vty (struct vty *vty, char *name, enum show_type type,
6853 vty_out (vty, "%% Malformed address: %s%s", ip_str, VTY_NEWLINE);
6864 vty_out (vty, "%% No such BGP instance exist%s", VTY_NEWLINE);
6868 bgp_show_neighbor (vty, bgp, type, &su);
6876 bgp_show_neighbor (vty, bgp, type, &su);
6890 return bgp_show_neighbor_vty (vty, NULL, show_all, NULL);
6950 return bgp_show_neighbor_vty (vty, NULL, show_peer, argv[argc - 1]);
7017 return bgp_show_neighbor_vty (vty, argv[0], show_all, NULL);
7032 return bgp_show_neighbor_vty (vty, argv[0], show_peer, argv[1]);
7047 vty_out (vty, "Address Refcnt Path%s", VTY_NEWLINE);
7048 aspath_print_all_vty (vty);
7063 vty_out (vty, "Address Refcnt Path\r\n");
7064 aspath_print_all_vty (vty);
7073 community_show_all_iterator (struct hash_backet *backet, struct vty *vty)
7078 vty_out (vty, "[%p] (%ld) %s%s", backet, com->refcnt,
7091 vty_out (vty, "Address Refcnt Community%s", VTY_NEWLINE);
7096 vty);
7109 attr_show_all (vty);
7168 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7171 return bgp_redistribute_set (vty->index, AFI_IP, type);
7191 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7195 bgp_redistribute_rmap_set (vty->index, AFI_IP, type, argv[1]);
7196 return bgp_redistribute_set (vty->index, AFI_IP, type);
7217 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7222 bgp_redistribute_metric_set (vty->index, AFI_IP, type, metric);
7223 return bgp_redistribute_set (vty->index, AFI_IP, type);
7246 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7251 bgp_redistribute_rmap_set (vty->index, AFI_IP, type, argv[1]);
7252 bgp_redistribute_metric_set (vty->index, AFI_IP, type, metric);
7253 return bgp_redistribute_set (vty->index, AFI_IP, type);
7276 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7281 bgp_redistribute_metric_set (vty->index, AFI_IP, type, metric);
7282 bgp_redistribute_rmap_set (vty->index, AFI_IP, type, argv[2]);
7283 return bgp_redistribute_set (vty->index, AFI_IP, type);
7302 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7306 return bgp_redistribute_unset (vty->index, AFI_IP, type);
7327 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7331 bgp_redistribute_routemap_unset (vty->index, AFI_IP, type);
7353 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7357 bgp_redistribute_metric_unset (vty->index, AFI_IP, type);
7381 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7385 bgp_redistribute_metric_unset (vty->index, AFI_IP, type);
7386 bgp_redistribute_routemap_unset (vty->index, AFI_IP, type);
7422 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7426 return bgp_redistribute_set (vty->index, AFI_IP6, type);
7446 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7450 bgp_redistribute_rmap_set (vty->index, AFI_IP6, type, argv[1]);
7451 return bgp_redistribute_set (vty->index, AFI_IP6, type);
7472 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7477 bgp_redistribute_metric_set (vty->index, AFI_IP6, type, metric);
7478 return bgp_redistribute_set (vty->index, AFI_IP6, type);
7501 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7506 bgp_redistribute_rmap_set (vty->index, AFI_IP6, type, argv[1]);
7507 bgp_redistribute_metric_set (vty->index, AFI_IP6, type, metric);
7508 return bgp_redistribute_set (vty->index, AFI_IP6, type);
7531 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7536 bgp_redistribute_metric_set (vty->index, AFI_IP6, type, metric);
7537 bgp_redistribute_rmap_set (vty->index, AFI_IP6, type, argv[2]);
7538 return bgp_redistribute_set (vty->index, AFI_IP6, type);
7557 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7561 return bgp_redistribute_unset (vty->index, AFI_IP6, type);
7582 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7586 bgp_redistribute_routemap_unset (vty->index, AFI_IP6, type);
7608 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7612 bgp_redistribute_metric_unset (vty->index, AFI_IP6, type);
7636 vty_out (vty, "%% Invalid route type%s", VTY_NEWLINE);
7640 bgp_redistribute_metric_unset (vty->index, AFI_IP6, type);
7641 bgp_redistribute_routemap_unset (vty->index, AFI_IP6, type);
7663 bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi,
7680 bgp_config_write_family_header (vty, afi, safi, write);
7683 vty_out (vty, " redistribute %s", str[i]);
7686 vty_out (vty, " metric %d", bgp->redist_metric[afi][i]);
7689 vty_out (vty, " route-map %s", bgp->rmap[afi][i].name);
7691 vty_out (vty, "%s", VTY_NEWLINE);
7738 int bgp_config_write (struct vty *);
8628 community_list_perror (struct vty *vty, int ret)
8633 vty_out (vty, "%% Can't find communit-list%s", VTY_NEWLINE);
8636 vty_out (vty, "%% Malformed community-list value%s", VTY_NEWLINE);
8639 vty_out (vty, "%% Community name conflict, previously defined as standard community%s", VTY_NEWLINE);
8642 vty_out (vty, "%% Community name conflict, previously defined as expanded community%s", VTY_NEWLINE);
8649 community_list_set_vty (struct vty *vty, int argc, char **argv, int style,
8663 vty_out (vty, "%% Matching condition must be permit or deny%s",
8671 vty_out (vty, "%% Community name cannot have all digits%s", VTY_NEWLINE);
8693 community_list_perror (vty, ret);
8702 community_list_unset_all_vty (struct vty *vty, char *name)
8710 community_list_perror (vty, ret);
8718 community_list_unset_vty (struct vty *vty, int argc, char **argv, int style)
8731 vty_out (vty, "%% Matching condition must be permit or deny%s",
8748 community_list_perror (vty, ret);
8769 return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_AUTO, 1);
8782 return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD, 0);
8804 return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED, 0);
8818 return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD, 1);
8842 return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED, 1);
8855 return community_list_unset_all_vty (vty, argv[0]);
8868 return community_list_unset_all_vty (vty, argv[1]);
8882 return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_AUTO);
8896 return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD);
8910 return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED);
8925 return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD);
8940 return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED);
8944 community_list_show (struct vty *vty, struct community_list *list)
8953 vty_out (vty, "Community %s list %s%s",
8958 vty_out (vty, "Named Community %s list %s%s",
8964 vty_out (vty, " %s%s",
8967 vty_out (vty, " %s %s%s",
8990 community_list_show (vty, list);
8993 community_list_show (vty, list);
9012 vty_out (vty, "%% Can't find communit-list%s", VTY_NEWLINE);
9016 community_list_show (vty, list);
9023 extcommunity_list_set_vty (struct vty *vty, int argc, char **argv, int style,
9037 vty_out (vty, "%% Matching condition must be permit or deny%s",
9045 vty_out (vty, "%% Community name cannot have all digits%s", VTY_NEWLINE);
9064 community_list_perror (vty, ret);
9071 extcommunity_list_unset_all_vty (struct vty *vty, char *name)
9079 community_list_perror (vty, ret);
9086 extcommunity_list_unset_vty (struct vty *vty, int argc, char **argv, int style)
9099 vty_out (vty, "%% Matching condition must be permit or deny%s",
9116 community_list_perror (vty, ret);
9137 return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD, 0);
9159 return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED, 0);
9173 return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD, 1);
9197 return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED, 1);
9209 return extcommunity_list_unset_all_vty (vty, argv[0]);
9222 return extcommunity_list_unset_all_vty (vty, argv[1]);
9236 return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD);
9250 return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED);
9265 return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD);
9280 return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED);
9284 extcommunity_list_show (struct vty *vty, struct community_list *list)
9293 vty_out (vty, "Extended community %s list %s%s",
9298 vty_out (vty, "Named extended community %s list %s%s",
9304 vty_out (vty, " %s%s",
9307 vty_out (vty, " %s %s%s",
9330 extcommunity_list_show (vty, list);
9333 extcommunity_list_show (vty, list);
9352 vty_out (vty, "%% Can't find extcommunit-list%s", VTY_NEWLINE);
9356 extcommunity_list_show (vty, list);
9382 community_list_config_write (struct vty *vty)
9396 vty_out (vty, "ip community-list %s %s %s%s",
9401 vty_out (vty, "ip community-list %s %s %s %s%s",
9412 vty_out (vty, "ip community-list %s %s %s %s%s",
9428 vty_out (vty, "ip extcommunity-list %s %s %s%s",
9432 vty_out (vty, "ip extcommunity-list %s %s %s %s%s",
9442 vty_out (vty, "ip extcommunity-list %s %s %s %s%s",