Diff for /embedaddon/quagga/bgpd/bgp_vty.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2013/07/21 23:54:38 version 1.1.1.4, 2016/11/02 10:09:10
Line 30  Software Foundation, Inc., 59 Temple Place - Suite 330 Line 30  Software Foundation, Inc., 59 Temple Place - Suite 330
 #include "log.h"  #include "log.h"
 #include "memory.h"  #include "memory.h"
 #include "hash.h"  #include "hash.h"
   #include "filter.h"
   
 #include "bgpd/bgpd.h"  #include "bgpd/bgpd.h"
 #include "bgpd/bgp_advertise.h"  #include "bgpd/bgp_advertise.h"
Line 56  extern struct in_addr router_id_zebra; Line 57  extern struct in_addr router_id_zebra;
 afi_t  afi_t
 bgp_node_afi (struct vty *vty)  bgp_node_afi (struct vty *vty)
 {  {
  if (vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE)  afi_t afi;
    return AFI_IP6;  switch (vty->node)
  return AFI_IP;    {
     case BGP_IPV6_NODE:
     case BGP_IPV6M_NODE:
     case BGP_VPNV6_NODE:
     case BGP_ENCAPV6_NODE:
       afi = AFI_IP6;
       break;
     default:
       afi = AFI_IP;
       break;
     }
   return afi;
 }  }
   
 /* Utility function to get subsequent address family from current  /* Utility function to get subsequent address family from current
Line 66  bgp_node_afi (struct vty *vty) Line 78  bgp_node_afi (struct vty *vty)
 safi_t  safi_t
 bgp_node_safi (struct vty *vty)  bgp_node_safi (struct vty *vty)
 {  {
  if (vty->node == BGP_VPNV4_NODE)  safi_t safi;
    return SAFI_MPLS_VPN;  switch (vty->node)
  if (vty->node == BGP_IPV4M_NODE || vty->node == BGP_IPV6M_NODE)    {
    return SAFI_MULTICAST;    case BGP_ENCAP_NODE:
  return SAFI_UNICAST;    case BGP_ENCAPV6_NODE:
       safi = SAFI_ENCAP;
       break;
     case BGP_VPNV4_NODE:
     case BGP_VPNV6_NODE:
       safi = SAFI_MPLS_VPN;
       break;
     case BGP_IPV4M_NODE:
     case BGP_IPV6M_NODE:
       safi = SAFI_MULTICAST;
       break;
     default:
       safi = SAFI_UNICAST;
       break;
   }
   return safi;
 }  }
   
   int
   bgp_parse_afi(const char *str, afi_t *afi)
   {
       if (!strcmp(str, "ipv4")) {
           *afi = AFI_IP;
           return 0;
       }
       if (!strcmp(str, "ipv6")) {
           *afi = AFI_IP6;
           return 0;
       }
       return -1;
   }
   
   int
   bgp_parse_safi(const char *str, safi_t *safi)
   {
       if (!strcmp(str, "encap")) {
           *safi = SAFI_ENCAP;
           return 0;
       }
       if (!strcmp(str, "multicast")) {
           *safi =  SAFI_MULTICAST;
           return 0;
       }
       if (!strcmp(str, "unicast")) {
           *safi =  SAFI_UNICAST;
           return 0;
       }
       if (!strcmp(str, "vpn")) {
           *safi =  SAFI_MPLS_VPN;
           return 0;
       }
       return -1;
   }
   
 static int  static int
 peer_address_self_check (union sockunion *su)  peer_address_self_check (union sockunion *su)
 {  {
Line 80  peer_address_self_check (union sockunion *su) Line 143  peer_address_self_check (union sockunion *su)
   
   if (su->sa.sa_family == AF_INET)    if (su->sa.sa_family == AF_INET)
     ifp = if_lookup_by_ipv4_exact (&su->sin.sin_addr);      ifp = if_lookup_by_ipv4_exact (&su->sin.sin_addr);
 #ifdef HAVE_IPV6  
   else if (su->sa.sa_family == AF_INET6)    else if (su->sa.sa_family == AF_INET6)
     ifp = if_lookup_by_ipv6_exact (&su->sin6.sin6_addr);      ifp = if_lookup_by_ipv6_exact (&su->sin6.sin6_addr);
 #endif /* HAVE IPV6 */  
   
   if (ifp)    if (ifp)
     return 1;      return 1;
Line 314  DEFUN_DEPRECATED (neighbor_version, Line 375  DEFUN_DEPRECATED (neighbor_version,
 {  {
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "router bgp" commands. */  /* "router bgp" commands. */
 DEFUN (router_bgp,   DEFUN (router_bgp, 
        router_bgp_cmd,          router_bgp_cmd, 
Line 364  ALIAS (router_bgp, Line 425  ALIAS (router_bgp,
        AS_STR         AS_STR
        "BGP view\n"         "BGP view\n"
        "view name\n")         "view name\n")
 /* "no router bgp" commands. */  /* "no router bgp" commands. */
 DEFUN (no_router_bgp,  DEFUN (no_router_bgp,
        no_router_bgp_cmd,         no_router_bgp_cmd,
Line 405  ALIAS (no_router_bgp, Line 466  ALIAS (no_router_bgp,
        AS_STR         AS_STR
        "BGP view\n"         "BGP view\n"
        "view name\n")         "view name\n")
 /* BGP router-id.  */  /* BGP router-id.  */
   
 DEFUN (bgp_router_id,  DEFUN (bgp_router_id,
Line 476  ALIAS (no_bgp_router_id, Line 537  ALIAS (no_bgp_router_id,
        BGP_STR         BGP_STR
        "Override configured router identifier\n"         "Override configured router identifier\n"
        "Manually configured router identifier\n")         "Manually configured router identifier\n")
 /* BGP Cluster ID.  */  /* BGP Cluster ID.  */
   
 DEFUN (bgp_cluster_id,  DEFUN (bgp_cluster_id,
Line 546  ALIAS (no_bgp_cluster_id, Line 607  ALIAS (no_bgp_cluster_id,
        BGP_STR         BGP_STR
        "Configure Route-Reflector Cluster-id\n"         "Configure Route-Reflector Cluster-id\n"
        "Route-Reflector Cluster-id in IP address format\n")         "Route-Reflector Cluster-id in IP address format\n")
 DEFUN (bgp_confederation_identifier,  DEFUN (bgp_confederation_identifier,
        bgp_confederation_identifier_cmd,         bgp_confederation_identifier_cmd,
        "bgp confederation identifier " CMD_AS_RANGE,         "bgp confederation identifier " CMD_AS_RANGE,
Line 576  DEFUN (no_bgp_confederation_identifier, Line 637  DEFUN (no_bgp_confederation_identifier,
        "AS number\n")         "AS number\n")
 {  {
   struct bgp *bgp;    struct bgp *bgp;
  as_t as;  as_t as __attribute__((unused)); /* Dummy for VTY_GET_INTEGER_RANGE */
   
   bgp = vty->index;    bgp = vty->index;
   
Line 596  ALIAS (no_bgp_confederation_identifier, Line 657  ALIAS (no_bgp_confederation_identifier,
        "AS confederation parameters\n"         "AS confederation parameters\n"
        "AS number\n"         "AS number\n"
        "Set routing domain confederation AS\n")         "Set routing domain confederation AS\n")
 DEFUN (bgp_confederation_peers,  DEFUN (bgp_confederation_peers,
        bgp_confederation_peers_cmd,         bgp_confederation_peers_cmd,
        "bgp confederation peers ." CMD_AS_RANGE,         "bgp confederation peers ." CMD_AS_RANGE,
Line 650  DEFUN (no_bgp_confederation_peers, Line 711  DEFUN (no_bgp_confederation_peers,
     }      }
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* Maximum-paths configuration */  /* Maximum-paths configuration */
 DEFUN (bgp_maxpaths,  DEFUN (bgp_maxpaths,
        bgp_maxpaths_cmd,         bgp_maxpaths_cmd,
       "maximum-paths <1-255>",       "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
        "Forward packets over multiple paths\n"         "Forward packets over multiple paths\n"
        "Number of paths\n")         "Number of paths\n")
 {  {
Line 681  DEFUN (bgp_maxpaths, Line 742  DEFUN (bgp_maxpaths,
   
 DEFUN (bgp_maxpaths_ibgp,  DEFUN (bgp_maxpaths_ibgp,
        bgp_maxpaths_ibgp_cmd,         bgp_maxpaths_ibgp_cmd,
       "maximum-paths ibgp <1-255>",       "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
        "Forward packets over multiple paths\n"         "Forward packets over multiple paths\n"
        "iBGP-multipath\n"         "iBGP-multipath\n"
        "Number of paths\n")         "Number of paths\n")
Line 734  DEFUN (no_bgp_maxpaths, Line 795  DEFUN (no_bgp_maxpaths,
   
 ALIAS (no_bgp_maxpaths,  ALIAS (no_bgp_maxpaths,
        no_bgp_maxpaths_arg_cmd,         no_bgp_maxpaths_arg_cmd,
       "no maximum-paths <1-255>",       "no maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
        NO_STR         NO_STR
        "Forward packets over multiple paths\n"         "Forward packets over multiple paths\n"
        "Number of paths\n")         "Number of paths\n")
Line 767  DEFUN (no_bgp_maxpaths_ibgp, Line 828  DEFUN (no_bgp_maxpaths_ibgp,
   
 ALIAS (no_bgp_maxpaths_ibgp,  ALIAS (no_bgp_maxpaths_ibgp,
        no_bgp_maxpaths_ibgp_arg_cmd,         no_bgp_maxpaths_ibgp_arg_cmd,
       "no maximum-paths ibgp <1-255>",       "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
        NO_STR         NO_STR
        "Forward packets over multiple paths\n"         "Forward packets over multiple paths\n"
        "iBGP-multipath\n"         "iBGP-multipath\n"
Line 793  bgp_config_write_maxpaths (struct vty *vty, struct bgp Line 854  bgp_config_write_maxpaths (struct vty *vty, struct bgp
   
   return 0;    return 0;
 }  }
 /* BGP timers.  */  /* BGP timers.  */
   
 DEFUN (bgp_timers,  DEFUN (bgp_timers,
Line 849  ALIAS (no_bgp_timers, Line 910  ALIAS (no_bgp_timers,
        "BGP timers\n"         "BGP timers\n"
        "Keepalive interval\n"         "Keepalive interval\n"
        "Holdtime\n")         "Holdtime\n")
 DEFUN (bgp_client_to_client_reflection,  DEFUN (bgp_client_to_client_reflection,
        bgp_client_to_client_reflection_cmd,         bgp_client_to_client_reflection_cmd,
        "bgp client-to-client reflection",         "bgp client-to-client reflection",
Line 906  DEFUN (no_bgp_always_compare_med, Line 967  DEFUN (no_bgp_always_compare_med,
   bgp_flag_unset (bgp, BGP_FLAG_ALWAYS_COMPARE_MED);    bgp_flag_unset (bgp, BGP_FLAG_ALWAYS_COMPARE_MED);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp deterministic-med" configuration. */  /* "bgp deterministic-med" configuration. */
 DEFUN (bgp_deterministic_med,  DEFUN (bgp_deterministic_med,
        bgp_deterministic_med_cmd,         bgp_deterministic_med_cmd,
Line 1037  DEFUN (no_bgp_fast_external_failover, Line 1098  DEFUN (no_bgp_fast_external_failover,
   bgp_flag_set (bgp, BGP_FLAG_NO_FAST_EXT_FAILOVER);    bgp_flag_set (bgp, BGP_FLAG_NO_FAST_EXT_FAILOVER);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp enforce-first-as" configuration. */  /* "bgp enforce-first-as" configuration. */
 DEFUN (bgp_enforce_first_as,  DEFUN (bgp_enforce_first_as,
        bgp_enforce_first_as_cmd,         bgp_enforce_first_as_cmd,
Line 1065  DEFUN (no_bgp_enforce_first_as, Line 1126  DEFUN (no_bgp_enforce_first_as,
   bgp_flag_unset (bgp, BGP_FLAG_ENFORCE_FIRST_AS);    bgp_flag_unset (bgp, BGP_FLAG_ENFORCE_FIRST_AS);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp bestpath compare-routerid" configuration.  */  /* "bgp bestpath compare-routerid" configuration.  */
 DEFUN (bgp_bestpath_compare_router_id,  DEFUN (bgp_bestpath_compare_router_id,
        bgp_bestpath_compare_router_id_cmd,         bgp_bestpath_compare_router_id_cmd,
Line 1095  DEFUN (no_bgp_bestpath_compare_router_id, Line 1156  DEFUN (no_bgp_bestpath_compare_router_id,
   bgp_flag_unset (bgp, BGP_FLAG_COMPARE_ROUTER_ID);    bgp_flag_unset (bgp, BGP_FLAG_COMPARE_ROUTER_ID);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp bestpath as-path ignore" configuration.  */  /* "bgp bestpath as-path ignore" configuration.  */
 DEFUN (bgp_bestpath_aspath_ignore,  DEFUN (bgp_bestpath_aspath_ignore,
        bgp_bestpath_aspath_ignore_cmd,         bgp_bestpath_aspath_ignore_cmd,
Line 1127  DEFUN (no_bgp_bestpath_aspath_ignore, Line 1188  DEFUN (no_bgp_bestpath_aspath_ignore,
   bgp_flag_unset (bgp, BGP_FLAG_ASPATH_IGNORE);    bgp_flag_unset (bgp, BGP_FLAG_ASPATH_IGNORE);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp bestpath as-path confed" configuration.  */  /* "bgp bestpath as-path confed" configuration.  */
 DEFUN (bgp_bestpath_aspath_confed,  DEFUN (bgp_bestpath_aspath_confed,
        bgp_bestpath_aspath_confed_cmd,         bgp_bestpath_aspath_confed_cmd,
Line 1159  DEFUN (no_bgp_bestpath_aspath_confed, Line 1220  DEFUN (no_bgp_bestpath_aspath_confed,
   bgp_flag_unset (bgp, BGP_FLAG_ASPATH_CONFED);    bgp_flag_unset (bgp, BGP_FLAG_ASPATH_CONFED);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp bestpath as-path multipath-relax" configuration.  */
 DEFUN (bgp_bestpath_aspath_multipath_relax,
        bgp_bestpath_aspath_multipath_relax_cmd,
        "bgp bestpath as-path multipath-relax",
        "BGP specific commands\n"
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Allow load sharing across routes that have different AS paths (but same length)\n")
 {
   struct bgp *bgp;
 
   bgp = vty->index;
   bgp_flag_set (bgp, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
   return CMD_SUCCESS;
 }
 
 DEFUN (no_bgp_bestpath_aspath_multipath_relax,
        no_bgp_bestpath_aspath_multipath_relax_cmd,
        "no bgp bestpath as-path multipath-relax",
        NO_STR
        "BGP specific commands\n"
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Allow load sharing across routes that have different AS paths (but same length)\n")
 {
   struct bgp *bgp;
 
   bgp = vty->index;
   bgp_flag_unset (bgp, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
   return CMD_SUCCESS;
 }
 
 /* "bgp log-neighbor-changes" configuration.  */  /* "bgp log-neighbor-changes" configuration.  */
 DEFUN (bgp_log_neighbor_changes,  DEFUN (bgp_log_neighbor_changes,
        bgp_log_neighbor_changes_cmd,         bgp_log_neighbor_changes_cmd,
Line 1187  DEFUN (no_bgp_log_neighbor_changes, Line 1280  DEFUN (no_bgp_log_neighbor_changes,
   bgp_flag_unset (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES);    bgp_flag_unset (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp bestpath med" configuration. */  /* "bgp bestpath med" configuration. */
 DEFUN (bgp_bestpath_med,  DEFUN (bgp_bestpath_med,
        bgp_bestpath_med_cmd,         bgp_bestpath_med_cmd,
Line 1285  ALIAS (no_bgp_bestpath_med2, Line 1378  ALIAS (no_bgp_bestpath_med2,
        "MED attribute\n"         "MED attribute\n"
        "Treat missing MED as the least preferred one\n"         "Treat missing MED as the least preferred one\n"
        "Compare MED among confederation paths\n")         "Compare MED among confederation paths\n")
 /* "no bgp default ipv4-unicast". */  /* "no bgp default ipv4-unicast". */
 DEFUN (no_bgp_default_ipv4_unicast,  DEFUN (no_bgp_default_ipv4_unicast,
        no_bgp_default_ipv4_unicast_cmd,         no_bgp_default_ipv4_unicast_cmd,
Line 1315  DEFUN (bgp_default_ipv4_unicast, Line 1408  DEFUN (bgp_default_ipv4_unicast,
   bgp_flag_unset (bgp, BGP_FLAG_NO_DEFAULT_IPV4);    bgp_flag_unset (bgp, BGP_FLAG_NO_DEFAULT_IPV4);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* "bgp import-check" configuration.  */  /* "bgp import-check" configuration.  */
 DEFUN (bgp_network_import_check,  DEFUN (bgp_network_import_check,
        bgp_network_import_check_cmd,         bgp_network_import_check_cmd,
Line 1345  DEFUN (no_bgp_network_import_check, Line 1438  DEFUN (no_bgp_network_import_check,
   bgp_flag_unset (bgp, BGP_FLAG_IMPORT_CHECK);    bgp_flag_unset (bgp, BGP_FLAG_IMPORT_CHECK);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 DEFUN (bgp_default_local_preference,  DEFUN (bgp_default_local_preference,
        bgp_default_local_preference_cmd,         bgp_default_local_preference_cmd,
        "bgp default local-preference <0-4294967295>",         "bgp default local-preference <0-4294967295>",
Line 1389  ALIAS (no_bgp_default_local_preference, Line 1482  ALIAS (no_bgp_default_local_preference,
        "Configure BGP defaults\n"         "Configure BGP defaults\n"
        "local preference (higher=more preferred)\n"         "local preference (higher=more preferred)\n"
        "Configure default local preference value\n")         "Configure default local preference value\n")
 static int  static int
 peer_remote_as_vty (struct vty *vty, const char *peer_str,   peer_remote_as_vty (struct vty *vty, const char *peer_str, 
                     const char *as_str, afi_t afi, safi_t safi)                      const char *as_str, afi_t afi, safi_t safi)
Line 1449  DEFUN (neighbor_remote_as, Line 1542  DEFUN (neighbor_remote_as,
 {  {
   return peer_remote_as_vty (vty, argv[0], argv[1], AFI_IP, SAFI_UNICAST);    return peer_remote_as_vty (vty, argv[0], argv[1], AFI_IP, SAFI_UNICAST);
 }  }
 DEFUN (neighbor_peer_group,  DEFUN (neighbor_peer_group,
        neighbor_peer_group_cmd,         neighbor_peer_group_cmd,
        "neighbor WORD peer-group",         "neighbor WORD peer-group",
Line 1554  DEFUN (no_neighbor_peer_group_remote_as, Line 1647  DEFUN (no_neighbor_peer_group_remote_as,
     }      }
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 DEFUN (neighbor_local_as,  DEFUN (neighbor_local_as,
        neighbor_local_as_cmd,         neighbor_local_as_cmd,
        NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE,         NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE,
Line 1664  ALIAS (no_neighbor_local_as, Line 1757  ALIAS (no_neighbor_local_as,
        "AS number used as local AS\n"         "AS number used as local AS\n"
        "Do not prepend local-as to updates from ebgp peers\n"         "Do not prepend local-as to updates from ebgp peers\n"
        "Do not prepend local-as to updates from ibgp peers\n")         "Do not prepend local-as to updates from ibgp peers\n")
 DEFUN (neighbor_password,  DEFUN (neighbor_password,
        neighbor_password_cmd,         neighbor_password_cmd,
        NEIGHBOR_CMD2 "password LINE",         NEIGHBOR_CMD2 "password LINE",
Line 1702  DEFUN (no_neighbor_password, Line 1795  DEFUN (no_neighbor_password,
   ret = peer_password_unset (peer);    ret = peer_password_unset (peer);
   return bgp_vty_return (vty, ret);    return bgp_vty_return (vty, ret);
 }  }
 DEFUN (neighbor_activate,  DEFUN (neighbor_activate,
        neighbor_activate_cmd,         neighbor_activate_cmd,
        NEIGHBOR_CMD2 "activate",         NEIGHBOR_CMD2 "activate",
Line 1741  DEFUN (no_neighbor_activate, Line 1834  DEFUN (no_neighbor_activate,
   
   return bgp_vty_return (vty, ret);    return bgp_vty_return (vty, ret);
 }  }
 DEFUN (neighbor_set_peer_group,  DEFUN (neighbor_set_peer_group,
        neighbor_set_peer_group_cmd,         neighbor_set_peer_group_cmd,
        NEIGHBOR_CMD "peer-group WORD",         NEIGHBOR_CMD "peer-group WORD",
Line 1823  DEFUN (no_neighbor_set_peer_group, Line 1916  DEFUN (no_neighbor_set_peer_group,
   
   return bgp_vty_return (vty, ret);    return bgp_vty_return (vty, ret);
 }  }
 static int  static int
 peer_flag_modify_vty (struct vty *vty, const char *ip_str,   peer_flag_modify_vty (struct vty *vty, const char *ip_str, 
                       u_int16_t flag, int set)                        u_int16_t flag, int set)
Line 1876  DEFUN (no_neighbor_passive, Line 1969  DEFUN (no_neighbor_passive,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_PASSIVE);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_PASSIVE);
 }  }
 /* neighbor shutdown. */  /* neighbor shutdown. */
 DEFUN (neighbor_shutdown,  DEFUN (neighbor_shutdown,
        neighbor_shutdown_cmd,         neighbor_shutdown_cmd,
Line 1898  DEFUN (no_neighbor_shutdown, Line 1991  DEFUN (no_neighbor_shutdown,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_SHUTDOWN);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_SHUTDOWN);
 }  }
 /* Deprecated neighbor capability route-refresh. */  /* Deprecated neighbor capability route-refresh. */
 DEFUN_DEPRECATED (neighbor_capability_route_refresh,  DEFUN_DEPRECATED (neighbor_capability_route_refresh,
                   neighbor_capability_route_refresh_cmd,                    neighbor_capability_route_refresh_cmd,
Line 1922  DEFUN_DEPRECATED (no_neighbor_capability_route_refresh Line 2015  DEFUN_DEPRECATED (no_neighbor_capability_route_refresh
 {  {
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* neighbor capability dynamic. */  /* neighbor capability dynamic. */
 DEFUN (neighbor_capability_dynamic,  DEFUN (neighbor_capability_dynamic,
        neighbor_capability_dynamic_cmd,         neighbor_capability_dynamic_cmd,
Line 1946  DEFUN (no_neighbor_capability_dynamic, Line 2039  DEFUN (no_neighbor_capability_dynamic,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DYNAMIC_CAPABILITY);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DYNAMIC_CAPABILITY);
 }  }
 /* neighbor dont-capability-negotiate */  /* neighbor dont-capability-negotiate */
 DEFUN (neighbor_dont_capability_negotiate,  DEFUN (neighbor_dont_capability_negotiate,
        neighbor_dont_capability_negotiate_cmd,         neighbor_dont_capability_negotiate_cmd,
Line 1968  DEFUN (no_neighbor_dont_capability_negotiate, Line 2061  DEFUN (no_neighbor_dont_capability_negotiate,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DONT_CAPABILITY);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DONT_CAPABILITY);
 }  }
 static int  static int
 peer_af_flag_modify_vty (struct vty *vty, const char *peer_str, afi_t afi,  peer_af_flag_modify_vty (struct vty *vty, const char *peer_str, afi_t afi,
                          safi_t safi, u_int32_t flag, int set)                           safi_t safi, u_int32_t flag, int set)
Line 2001  peer_af_flag_unset_vty (struct vty *vty, const char *p Line 2094  peer_af_flag_unset_vty (struct vty *vty, const char *p
 {  {
   return peer_af_flag_modify_vty (vty, peer_str, afi, safi, flag, 0);    return peer_af_flag_modify_vty (vty, peer_str, afi, safi, flag, 0);
 }  }
 /* neighbor capability orf prefix-list. */  /* neighbor capability orf prefix-list. */
 DEFUN (neighbor_capability_orf_prefix,  DEFUN (neighbor_capability_orf_prefix,
        neighbor_capability_orf_prefix_cmd,         neighbor_capability_orf_prefix_cmd,
Line 2057  DEFUN (no_neighbor_capability_orf_prefix, Line 2150  DEFUN (no_neighbor_capability_orf_prefix,
   return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                  bgp_node_safi (vty), flag);                                   bgp_node_safi (vty), flag);
 }  }
 /* neighbor next-hop-self. */  /* neighbor next-hop-self. */
 DEFUN (neighbor_nexthop_self,  DEFUN (neighbor_nexthop_self,
        neighbor_nexthop_self_cmd,         neighbor_nexthop_self_cmd,
       NEIGHBOR_CMD2 "next-hop-self",       NEIGHBOR_CMD2 "next-hop-self {all}",
        NEIGHBOR_STR         NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
       "Disable the next hop calculation for this neighbor\n")       "Disable the next hop calculation for this neighbor\n"
        "Apply also to ibgp-learned routes when acting as a route reflector\n")
 {  {
  return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),  u_int32_t flags = PEER_FLAG_NEXTHOP_SELF, unset = 0;
                               bgp_node_safi (vty), PEER_FLAG_NEXTHOP_SELF);  int rc;
 
   /* Check if "all" is specified */
   if (argv[1] != NULL)
     flags |= PEER_FLAG_NEXTHOP_SELF_ALL;
   else
     unset |= PEER_FLAG_NEXTHOP_SELF_ALL;
 
   rc = peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty),
                              bgp_node_safi (vty), flags);
   if ( rc == CMD_SUCCESS && unset )
     rc = peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                  bgp_node_safi (vty), unset);
   return rc;
 }  }
   
 DEFUN (no_neighbor_nexthop_self,  DEFUN (no_neighbor_nexthop_self,
        no_neighbor_nexthop_self_cmd,         no_neighbor_nexthop_self_cmd,
       NO_NEIGHBOR_CMD2 "next-hop-self",       NO_NEIGHBOR_CMD2 "next-hop-self {all}",
        NO_STR         NO_STR
        NEIGHBOR_STR         NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
       "Disable the next hop calculation for this neighbor\n")       "Disable the next hop calculation for this neighbor\n"
        "Apply also to ibgp-learned routes when acting as a route reflector\n")
 {  {
   return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                 bgp_node_safi (vty), PEER_FLAG_NEXTHOP_SELF);                                 bgp_node_safi (vty),
                                  PEER_FLAG_NEXTHOP_SELF|PEER_FLAG_NEXTHOP_SELF_ALL);
 }  }
 /* neighbor remove-private-AS. */  /* neighbor remove-private-AS. */
 DEFUN (neighbor_remove_private_as,  DEFUN (neighbor_remove_private_as,
        neighbor_remove_private_as_cmd,         neighbor_remove_private_as_cmd,
Line 2107  DEFUN (no_neighbor_remove_private_as, Line 2216  DEFUN (no_neighbor_remove_private_as,
                                  bgp_node_safi (vty),                                   bgp_node_safi (vty),
                                  PEER_FLAG_REMOVE_PRIVATE_AS);                                   PEER_FLAG_REMOVE_PRIVATE_AS);
 }  }
 /* neighbor send-community. */  /* neighbor send-community. */
 DEFUN (neighbor_send_community,  DEFUN (neighbor_send_community,
        neighbor_send_community_cmd,         neighbor_send_community_cmd,
Line 2133  DEFUN (no_neighbor_send_community, Line 2242  DEFUN (no_neighbor_send_community,
                                  bgp_node_safi (vty),                                   bgp_node_safi (vty),
                                  PEER_FLAG_SEND_COMMUNITY);                                   PEER_FLAG_SEND_COMMUNITY);
 }  }
 /* neighbor send-community extended. */  /* neighbor send-community extended. */
 DEFUN (neighbor_send_community_type,  DEFUN (neighbor_send_community_type,
        neighbor_send_community_type_cmd,         neighbor_send_community_type_cmd,
Line 2185  DEFUN (no_neighbor_send_community_type, Line 2294  DEFUN (no_neighbor_send_community_type,
                                  (PEER_FLAG_SEND_COMMUNITY |                                   (PEER_FLAG_SEND_COMMUNITY |
                                   PEER_FLAG_SEND_EXT_COMMUNITY));                                    PEER_FLAG_SEND_EXT_COMMUNITY));
 }  }
 /* neighbor soft-reconfig. */  /* neighbor soft-reconfig. */
 DEFUN (neighbor_soft_reconfiguration,  DEFUN (neighbor_soft_reconfiguration,
        neighbor_soft_reconfiguration_cmd,         neighbor_soft_reconfiguration_cmd,
Line 2213  DEFUN (no_neighbor_soft_reconfiguration, Line 2322  DEFUN (no_neighbor_soft_reconfiguration,
                                  bgp_node_afi (vty), bgp_node_safi (vty),                                   bgp_node_afi (vty), bgp_node_safi (vty),
                                  PEER_FLAG_SOFT_RECONFIG);                                   PEER_FLAG_SOFT_RECONFIG);
 }  }
 DEFUN (neighbor_route_reflector_client,  DEFUN (neighbor_route_reflector_client,
        neighbor_route_reflector_client_cmd,         neighbor_route_reflector_client_cmd,
        NEIGHBOR_CMD2 "route-reflector-client",         NEIGHBOR_CMD2 "route-reflector-client",
Line 2245  DEFUN (no_neighbor_route_reflector_client, Line 2354  DEFUN (no_neighbor_route_reflector_client,
                                  bgp_node_safi (vty),                                   bgp_node_safi (vty),
                                  PEER_FLAG_REFLECTOR_CLIENT);                                   PEER_FLAG_REFLECTOR_CLIENT);
 }  }
 static int  static int
 peer_rsclient_set_vty (struct vty *vty, const char *peer_str,   peer_rsclient_set_vty (struct vty *vty, const char *peer_str, 
                        int afi, int safi)                         int afi, int safi)
Line 2393  peer_rsclient_unset_vty (struct vty *vty, const char * Line 2502  peer_rsclient_unset_vty (struct vty *vty, const char *
   
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* neighbor route-server-client. */  /* neighbor route-server-client. */
 DEFUN (neighbor_route_server_client,  DEFUN (neighbor_route_server_client,
        neighbor_route_server_client_cmd,         neighbor_route_server_client_cmd,
Line 2417  DEFUN (no_neighbor_route_server_client, Line 2526  DEFUN (no_neighbor_route_server_client,
   return peer_rsclient_unset_vty (vty, argv[0], bgp_node_afi(vty),    return peer_rsclient_unset_vty (vty, argv[0], bgp_node_afi(vty),
                   bgp_node_safi(vty));                    bgp_node_safi(vty));
 }  }
 DEFUN (neighbor_nexthop_local_unchanged,  DEFUN (neighbor_nexthop_local_unchanged,
        neighbor_nexthop_local_unchanged_cmd,         neighbor_nexthop_local_unchanged_cmd,
        NEIGHBOR_CMD2 "nexthop-local unchanged",         NEIGHBOR_CMD2 "nexthop-local unchanged",
Line 2430  DEFUN (neighbor_nexthop_local_unchanged, Line 2539  DEFUN (neighbor_nexthop_local_unchanged,
                                 bgp_node_safi (vty),                                  bgp_node_safi (vty),
                                 PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED );                                  PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED );
 }  }
 DEFUN (no_neighbor_nexthop_local_unchanged,  DEFUN (no_neighbor_nexthop_local_unchanged,
        no_neighbor_nexthop_local_unchanged_cmd,         no_neighbor_nexthop_local_unchanged_cmd,
        NO_NEIGHBOR_CMD2 "nexthop-local unchanged",         NO_NEIGHBOR_CMD2 "nexthop-local unchanged",
Line 2444  DEFUN (no_neighbor_nexthop_local_unchanged, Line 2553  DEFUN (no_neighbor_nexthop_local_unchanged,
                                  bgp_node_safi (vty),                                   bgp_node_safi (vty),
                                 PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED );                                  PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED );
 }  }
 DEFUN (neighbor_attr_unchanged,  DEFUN (neighbor_attr_unchanged,
        neighbor_attr_unchanged_cmd,         neighbor_attr_unchanged_cmd,
        NEIGHBOR_CMD2 "attribute-unchanged",         NEIGHBOR_CMD2 "attribute-unchanged",
Line 2801  DEFUN_DEPRECATED (neighbor_transparent_nexthop, Line 2910  DEFUN_DEPRECATED (neighbor_transparent_nexthop,
                                bgp_node_safi (vty),                                 bgp_node_safi (vty),
                                PEER_FLAG_NEXTHOP_UNCHANGED);                                 PEER_FLAG_NEXTHOP_UNCHANGED);
 }  }
 /* EBGP multihop configuration. */  /* EBGP multihop configuration. */
 static int  static int
 peer_ebgp_multihop_set_vty (struct vty *vty, const char *ip_str,   peer_ebgp_multihop_set_vty (struct vty *vty, const char *ip_str, 
Line 2875  ALIAS (no_neighbor_ebgp_multihop, Line 2984  ALIAS (no_neighbor_ebgp_multihop,
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
        "Allow EBGP neighbors not on directly connected networks\n"         "Allow EBGP neighbors not on directly connected networks\n"
        "maximum hop count\n")         "maximum hop count\n")
 /* disable-connected-check */  /* disable-connected-check */
 DEFUN (neighbor_disable_connected_check,  DEFUN (neighbor_disable_connected_check,
        neighbor_disable_connected_check_cmd,         neighbor_disable_connected_check_cmd,
Line 2914  ALIAS (no_neighbor_disable_connected_check, Line 3023  ALIAS (no_neighbor_disable_connected_check,
        NEIGHBOR_STR         NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
        "Enforce EBGP neighbors perform multihop\n")         "Enforce EBGP neighbors perform multihop\n")
 DEFUN (neighbor_description,  DEFUN (neighbor_description,
        neighbor_description_cmd,         neighbor_description_cmd,
        NEIGHBOR_CMD2 "description .LINE",         NEIGHBOR_CMD2 "description .LINE",
Line 2969  ALIAS (no_neighbor_description, Line 3078  ALIAS (no_neighbor_description,
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
        "Neighbor specific description\n"         "Neighbor specific description\n"
        "Up to 80 characters describing this neighbor\n")         "Up to 80 characters describing this neighbor\n")
 /* Neighbor update-source. */  /* Neighbor update-source. */
 static int  static int
 peer_update_source_vty (struct vty *vty, const char *peer_str,   peer_update_source_vty (struct vty *vty, const char *peer_str, 
Line 3024  DEFUN (no_neighbor_update_source, Line 3133  DEFUN (no_neighbor_update_source,
 {  {
   return peer_update_source_vty (vty, argv[0], NULL);    return peer_update_source_vty (vty, argv[0], NULL);
 }  }
 static int  static int
 peer_default_originate_set_vty (struct vty *vty, const char *peer_str,   peer_default_originate_set_vty (struct vty *vty, const char *peer_str, 
                                 afi_t afi, safi_t safi,                                   afi_t afi, safi_t safi, 
Line 3091  ALIAS (no_neighbor_default_originate, Line 3200  ALIAS (no_neighbor_default_originate,
        "Originate default route to this neighbor\n"         "Originate default route to this neighbor\n"
        "Route-map to specify criteria to originate default\n"         "Route-map to specify criteria to originate default\n"
        "route-map name\n")         "route-map name\n")
 /* Set neighbor's BGP port.  */  /* Set neighbor's BGP port.  */
 static int  static int
 peer_port_vty (struct vty *vty, const char *ip_str, int afi,   peer_port_vty (struct vty *vty, const char *ip_str, int afi, 
Line 3151  ALIAS (no_neighbor_port, Line 3260  ALIAS (no_neighbor_port,
        NEIGHBOR_ADDR_STR         NEIGHBOR_ADDR_STR
        "Neighbor's BGP port\n"         "Neighbor's BGP port\n"
        "TCP port number\n")         "TCP port number\n")
 /* neighbor weight. */  /* neighbor weight. */
 static int  static int
 peer_weight_set_vty (struct vty *vty, const char *ip_str,   peer_weight_set_vty (struct vty *vty, const char *ip_str, 
                      const char *weight_str)                       const char *weight_str)
 {  {
   int ret;  
   struct peer *peer;    struct peer *peer;
   unsigned long weight;    unsigned long weight;
   
Line 3167  peer_weight_set_vty (struct vty *vty, const char *ip_s Line 3275  peer_weight_set_vty (struct vty *vty, const char *ip_s
   
   VTY_GET_INTEGER_RANGE("weight", weight, weight_str, 0, 65535);    VTY_GET_INTEGER_RANGE("weight", weight, weight_str, 0, 65535);
   
  ret = peer_weight_set (peer, weight);  return bgp_vty_return (vty, peer_weight_set (peer, weight));
 
  return CMD_SUCCESS; 
 }  }
   
 static int  static int
Line 3181  peer_weight_unset_vty (struct vty *vty, const char *ip Line 3287  peer_weight_unset_vty (struct vty *vty, const char *ip
   if (! peer)    if (! peer)
     return CMD_WARNING;      return CMD_WARNING;
   
  peer_weight_unset (peer);  return bgp_vty_return (vty, peer_weight_unset (peer));
 
  return CMD_SUCCESS; 
 }  }
   
 DEFUN (neighbor_weight,  DEFUN (neighbor_weight,
Line 3216  ALIAS (no_neighbor_weight, Line 3320  ALIAS (no_neighbor_weight,
        NEIGHBOR_ADDR_STR2         NEIGHBOR_ADDR_STR2
        "Set default weight for routes from this neighbor\n"         "Set default weight for routes from this neighbor\n"
        "default weight\n")         "default weight\n")
 /* Override capability negotiation. */  /* Override capability negotiation. */
 DEFUN (neighbor_override_capability,  DEFUN (neighbor_override_capability,
        neighbor_override_capability_cmd,         neighbor_override_capability_cmd,
Line 3238  DEFUN (no_neighbor_override_capability, Line 3342  DEFUN (no_neighbor_override_capability,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_OVERRIDE_CAPABILITY);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_OVERRIDE_CAPABILITY);
 }  }
 DEFUN (neighbor_strict_capability,  DEFUN (neighbor_strict_capability,
        neighbor_strict_capability_cmd,         neighbor_strict_capability_cmd,
        NEIGHBOR_CMD "strict-capability-match",         NEIGHBOR_CMD "strict-capability-match",
Line 3259  DEFUN (no_neighbor_strict_capability, Line 3363  DEFUN (no_neighbor_strict_capability,
 {  {
   return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_STRICT_CAP_MATCH);    return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_STRICT_CAP_MATCH);
 }  }
 static int  static int
 peer_timers_set_vty (struct vty *vty, const char *ip_str,   peer_timers_set_vty (struct vty *vty, const char *ip_str, 
                      const char *keep_str, const char *hold_str)                       const char *keep_str, const char *hold_str)
Line 3280  peer_timers_set_vty (struct vty *vty, const char *ip_s Line 3384  peer_timers_set_vty (struct vty *vty, const char *ip_s
   
   return bgp_vty_return (vty, ret);    return bgp_vty_return (vty, ret);
 }  }
 static int  static int
 peer_timers_unset_vty (struct vty *vty, const char *ip_str)  peer_timers_unset_vty (struct vty *vty, const char *ip_str)
 {  {
Line 3318  DEFUN (no_neighbor_timers, Line 3422  DEFUN (no_neighbor_timers,
 {  {
   return peer_timers_unset_vty (vty, argv[0]);    return peer_timers_unset_vty (vty, argv[0]);
 }  }
 static int  static int
 peer_timers_connect_set_vty (struct vty *vty, const char *ip_str,   peer_timers_connect_set_vty (struct vty *vty, const char *ip_str, 
                              const char *time_str)                               const char *time_str)
 {  {
   int ret;  
   struct peer *peer;    struct peer *peer;
   u_int32_t connect;    u_int32_t connect;
   
  peer = peer_lookup_vty (vty, ip_str);  peer = peer_and_group_lookup_vty (vty, ip_str);
   if (! peer)    if (! peer)
     return CMD_WARNING;      return CMD_WARNING;
   
   VTY_GET_INTEGER_RANGE ("Connect time", connect, time_str, 0, 65535);    VTY_GET_INTEGER_RANGE ("Connect time", connect, time_str, 0, 65535);
   
  ret = peer_timers_connect_set (peer, connect);  return bgp_vty_return (vty, peer_timers_connect_set (peer, connect));
 
  return CMD_SUCCESS; 
 }  }
   
 static int  static int
 peer_timers_connect_unset_vty (struct vty *vty, const char *ip_str)  peer_timers_connect_unset_vty (struct vty *vty, const char *ip_str)
 {  {
   int ret;  
   struct peer *peer;    struct peer *peer;
   
   peer = peer_and_group_lookup_vty (vty, ip_str);    peer = peer_and_group_lookup_vty (vty, ip_str);
   if (! peer)    if (! peer)
     return CMD_WARNING;      return CMD_WARNING;
   
  ret = peer_timers_connect_unset (peer);  return bgp_vty_return (vty, peer_timers_connect_unset (peer));
 
  return CMD_SUCCESS; 
 }  }
   
 DEFUN (neighbor_timers_connect,  DEFUN (neighbor_timers_connect,
        neighbor_timers_connect_cmd,         neighbor_timers_connect_cmd,
       NEIGHBOR_CMD "timers connect <0-65535>",       NEIGHBOR_CMD2 "timers connect <1-65535>",
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "BGP per neighbor timers\n"         "BGP per neighbor timers\n"
        "BGP connect timer\n"         "BGP connect timer\n"
        "Connect timer\n")         "Connect timer\n")
Line 3367  DEFUN (neighbor_timers_connect, Line 3465  DEFUN (neighbor_timers_connect,
   
 DEFUN (no_neighbor_timers_connect,  DEFUN (no_neighbor_timers_connect,
        no_neighbor_timers_connect_cmd,         no_neighbor_timers_connect_cmd,
       NO_NEIGHBOR_CMD "timers connect",       NO_NEIGHBOR_CMD2 "timers connect",
        NO_STR         NO_STR
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "BGP per neighbor timers\n"         "BGP per neighbor timers\n"
        "BGP connect timer\n")         "BGP connect timer\n")
 {  {
Line 3379  DEFUN (no_neighbor_timers_connect, Line 3477  DEFUN (no_neighbor_timers_connect,
   
 ALIAS (no_neighbor_timers_connect,  ALIAS (no_neighbor_timers_connect,
        no_neighbor_timers_connect_val_cmd,         no_neighbor_timers_connect_val_cmd,
       NO_NEIGHBOR_CMD "timers connect <0-65535>",       NO_NEIGHBOR_CMD2 "timers connect <1-65535>",
        NO_STR         NO_STR
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "BGP per neighbor timers\n"         "BGP per neighbor timers\n"
        "BGP connect timer\n"         "BGP connect timer\n"
        "Connect timer\n")         "Connect timer\n")
 static int  static int
 peer_advertise_interval_vty (struct vty *vty, const char *ip_str,   peer_advertise_interval_vty (struct vty *vty, const char *ip_str, 
                              const char *time_str, int set)                                 const char *time_str, int set)  
Line 3395  peer_advertise_interval_vty (struct vty *vty, const ch Line 3493  peer_advertise_interval_vty (struct vty *vty, const ch
   struct peer *peer;    struct peer *peer;
   u_int32_t routeadv = 0;    u_int32_t routeadv = 0;
   
  peer = peer_lookup_vty (vty, ip_str);  peer = peer_and_group_lookup_vty (vty, ip_str);
   if (! peer)    if (! peer)
     return CMD_WARNING;      return CMD_WARNING;
   
Line 3407  peer_advertise_interval_vty (struct vty *vty, const ch Line 3505  peer_advertise_interval_vty (struct vty *vty, const ch
   else    else
     ret = peer_advertise_interval_unset (peer);      ret = peer_advertise_interval_unset (peer);
   
  return CMD_SUCCESS;  return bgp_vty_return (vty, ret);
 }  }
   
 DEFUN (neighbor_advertise_interval,  DEFUN (neighbor_advertise_interval,
        neighbor_advertise_interval_cmd,         neighbor_advertise_interval_cmd,
       NEIGHBOR_CMD "advertisement-interval <0-600>",       NEIGHBOR_CMD2 "advertisement-interval <0-600>",
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "Minimum interval between sending BGP routing updates\n"         "Minimum interval between sending BGP routing updates\n"
        "time in seconds\n")         "time in seconds\n")
 {  {
Line 3423  DEFUN (neighbor_advertise_interval, Line 3521  DEFUN (neighbor_advertise_interval,
   
 DEFUN (no_neighbor_advertise_interval,  DEFUN (no_neighbor_advertise_interval,
        no_neighbor_advertise_interval_cmd,         no_neighbor_advertise_interval_cmd,
       NO_NEIGHBOR_CMD "advertisement-interval",       NO_NEIGHBOR_CMD2 "advertisement-interval",
        NO_STR         NO_STR
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "Minimum interval between sending BGP routing updates\n")         "Minimum interval between sending BGP routing updates\n")
 {  {
   return peer_advertise_interval_vty (vty, argv[0], NULL, 0);    return peer_advertise_interval_vty (vty, argv[0], NULL, 0);
Line 3434  DEFUN (no_neighbor_advertise_interval, Line 3532  DEFUN (no_neighbor_advertise_interval,
   
 ALIAS (no_neighbor_advertise_interval,  ALIAS (no_neighbor_advertise_interval,
        no_neighbor_advertise_interval_val_cmd,         no_neighbor_advertise_interval_val_cmd,
       NO_NEIGHBOR_CMD "advertisement-interval <0-600>",       NO_NEIGHBOR_CMD2 "advertisement-interval <0-600>",
        NO_STR         NO_STR
        NEIGHBOR_STR         NEIGHBOR_STR
       NEIGHBOR_ADDR_STR       NEIGHBOR_ADDR_STR2
        "Minimum interval between sending BGP routing updates\n"         "Minimum interval between sending BGP routing updates\n"
        "time in seconds\n")         "time in seconds\n")
 /* neighbor interface */  /* neighbor interface */
 static int  static int
 peer_interface_vty (struct vty *vty, const char *ip_str, const char *str)  peer_interface_vty (struct vty *vty, const char *ip_str, const char *str)
Line 3457  peer_interface_vty (struct vty *vty, const char *ip_st Line 3555  peer_interface_vty (struct vty *vty, const char *ip_st
   else    else
     ret = peer_interface_unset (peer);      ret = peer_interface_unset (peer);
   
  return CMD_SUCCESS;  return bgp_vty_return (vty, ret);
 }  }
   
 DEFUN (neighbor_interface,  DEFUN (neighbor_interface,
Line 3482  DEFUN (no_neighbor_interface, Line 3580  DEFUN (no_neighbor_interface,
 {  {
   return peer_interface_vty (vty, argv[0], NULL);    return peer_interface_vty (vty, argv[0], NULL);
 }  }
 /* Set distribute list to the peer. */  /* Set distribute list to the peer. */
 static int  static int
 peer_distribute_set_vty (struct vty *vty, const char *ip_str,   peer_distribute_set_vty (struct vty *vty, const char *ip_str, 
Line 3563  DEFUN (no_neighbor_distribute_list, Line 3661  DEFUN (no_neighbor_distribute_list,
   return peer_distribute_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_distribute_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                     bgp_node_safi (vty), argv[2]);                                      bgp_node_safi (vty), argv[2]);
 }  }
 /* Set prefix list to the peer. */  /* Set prefix list to the peer. */
 static int  static int
 peer_prefix_list_set_vty (struct vty *vty, const char *ip_str, afi_t afi,  peer_prefix_list_set_vty (struct vty *vty, const char *ip_str, afi_t afi,
Line 3640  DEFUN (no_neighbor_prefix_list, Line 3738  DEFUN (no_neighbor_prefix_list,
   return peer_prefix_list_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_prefix_list_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                      bgp_node_safi (vty), argv[2]);                                       bgp_node_safi (vty), argv[2]);
 }  }
 static int  static int
 peer_aslist_set_vty (struct vty *vty, const char *ip_str,   peer_aslist_set_vty (struct vty *vty, const char *ip_str, 
                      afi_t afi, safi_t safi,                       afi_t afi, safi_t safi,
Line 3717  DEFUN (no_neighbor_filter_list, Line 3815  DEFUN (no_neighbor_filter_list,
   return peer_aslist_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_aslist_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                 bgp_node_safi (vty), argv[2]);                                  bgp_node_safi (vty), argv[2]);
 }  }
 /* Set route-map to the peer. */  /* Set route-map to the peer. */
 static int  static int
 peer_route_map_set_vty (struct vty *vty, const char *ip_str,   peer_route_map_set_vty (struct vty *vty, const char *ip_str, 
Line 3806  DEFUN (no_neighbor_route_map, Line 3904  DEFUN (no_neighbor_route_map,
   return peer_route_map_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_route_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                    bgp_node_safi (vty), argv[2]);                                     bgp_node_safi (vty), argv[2]);
 }  }
 /* Set unsuppress-map to the peer. */  /* Set unsuppress-map to the peer. */
 static int  static int
 peer_unsuppress_map_set_vty (struct vty *vty, const char *ip_str, afi_t afi,  peer_unsuppress_map_set_vty (struct vty *vty, const char *ip_str, afi_t afi,
Line 3865  DEFUN (no_neighbor_unsuppress_map, Line 3963  DEFUN (no_neighbor_unsuppress_map,
   return peer_unsuppress_map_unset_vty (vty, argv[0], bgp_node_afi (vty),    return peer_unsuppress_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
                                         bgp_node_safi (vty));                                          bgp_node_safi (vty));
 }  }
 static int  static int
 peer_maximum_prefix_set_vty (struct vty *vty, const char *ip_str, afi_t afi,  peer_maximum_prefix_set_vty (struct vty *vty, const char *ip_str, afi_t afi,
                              safi_t safi, const char *num_str,                                 safi_t safi, const char *num_str,  
Line 4075  ALIAS (no_neighbor_maximum_prefix, Line 4173  ALIAS (no_neighbor_maximum_prefix,
        "Threshold value (%) at which to generate a warning msg\n"         "Threshold value (%) at which to generate a warning msg\n"
        "Restart bgp connection after limit is exceeded\n"         "Restart bgp connection after limit is exceeded\n"
        "Restart interval in minutes")         "Restart interval in minutes")
 /* "neighbor allowas-in" */  /* "neighbor allowas-in" */
 DEFUN (neighbor_allowas_in,  DEFUN (neighbor_allowas_in,
        neighbor_allowas_in_cmd,         neighbor_allowas_in_cmd,
Line 4130  DEFUN (no_neighbor_allowas_in, Line 4228  DEFUN (no_neighbor_allowas_in,
   
   return bgp_vty_return (vty, ret);    return bgp_vty_return (vty, ret);
 }  }
 DEFUN (neighbor_ttl_security,  DEFUN (neighbor_ttl_security,
        neighbor_ttl_security_cmd,         neighbor_ttl_security_cmd,
        NEIGHBOR_CMD2 "ttl-security hops <1-254>",         NEIGHBOR_CMD2 "ttl-security hops <1-254>",
Line 4166  DEFUN (no_neighbor_ttl_security, Line 4264  DEFUN (no_neighbor_ttl_security,
   
   return bgp_vty_return (vty, peer_ttl_security_hops_unset (peer));    return bgp_vty_return (vty, peer_ttl_security_hops_unset (peer));
 }  }
 /* Address family configuration.  */  /* Address family configuration.  */
 DEFUN (address_family_ipv4,  DEFUN (address_family_ipv4,
        address_family_ipv4_cmd,         address_family_ipv4_cmd,
Line 4237  ALIAS (address_family_vpnv4, Line 4335  ALIAS (address_family_vpnv4,
        "Address family\n"         "Address family\n"
        "Address Family Modifier\n")         "Address Family Modifier\n")
   
   DEFUN (address_family_vpnv6,
          address_family_vpnv6_cmd,
          "address-family vpnv6",
          "Enter Address Family command mode\n"
          "Address family\n")
   {
     vty->node = BGP_VPNV6_NODE;
     return CMD_SUCCESS;
   }
   
   ALIAS (address_family_vpnv6,
          address_family_vpnv6_unicast_cmd,
          "address-family vpnv6 unicast",
          "Enter Address Family command mode\n"
          "Address family\n"
          "Address Family Modifier\n")
   
   DEFUN (address_family_encap,
          address_family_encap_cmd,
          "address-family encap",
          "Enter Address Family command mode\n"
          "Address family\n")
   {
     vty->node = BGP_ENCAP_NODE;
     return CMD_SUCCESS;
   }
   
   ALIAS (address_family_encap,
          address_family_encapv4_cmd,
          "address-family encapv4",
          "Enter Address Family command mode\n"
          "Address family\n")
   
   DEFUN (address_family_encapv6,
          address_family_encapv6_cmd,
          "address-family encapv6",
          "Enter Address Family command mode\n"
          "Address family\n")
   {
     vty->node = BGP_ENCAPV6_NODE;
     return CMD_SUCCESS;
   }
   
 DEFUN (exit_address_family,  DEFUN (exit_address_family,
        exit_address_family_cmd,         exit_address_family_cmd,
        "exit-address-family",         "exit-address-family",
        "Exit from Address Family configuration mode\n")         "Exit from Address Family configuration mode\n")
 {  {
     /* should match list in command.c:config_exit */
   if (vty->node == BGP_IPV4_NODE    if (vty->node == BGP_IPV4_NODE
         || vty->node == BGP_ENCAP_NODE
         || vty->node == BGP_ENCAPV6_NODE
       || vty->node == BGP_IPV4M_NODE        || vty->node == BGP_IPV4M_NODE
       || vty->node == BGP_VPNV4_NODE        || vty->node == BGP_VPNV4_NODE
         || vty->node == BGP_VPNV6_NODE
       || vty->node == BGP_IPV6_NODE        || vty->node == BGP_IPV6_NODE
       || vty->node == BGP_IPV6M_NODE)        || vty->node == BGP_IPV6M_NODE)
     vty->node = BGP_NODE;      vty->node = BGP_NODE;
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* BGP clear sort. */  /* BGP clear sort. */
 enum clear_sort  enum clear_sort
 {  {
Line 4604  ALIAS (clear_ip_bgp_as, Line 4749  ALIAS (clear_ip_bgp_as,
        BGP_STR         BGP_STR
        "Address family\n"         "Address family\n"
        "Clear peers with the AS number\n")         "Clear peers with the AS number\n")
 /* Outbound soft-reconfiguration */  /* Outbound soft-reconfiguration */
 DEFUN (clear_ip_bgp_all_soft_out,  DEFUN (clear_ip_bgp_all_soft_out,
        clear_ip_bgp_all_soft_out_cmd,         clear_ip_bgp_all_soft_out_cmd,
Line 4727  ALIAS (clear_ip_bgp_all_vpnv4_soft_out, Line 4872  ALIAS (clear_ip_bgp_all_vpnv4_soft_out,
        "Address Family Modifier\n"         "Address Family Modifier\n"
        "Soft reconfig outbound update\n")         "Soft reconfig outbound update\n")
   
   DEFUN (clear_ip_bgp_all_encap_soft_out,
          clear_ip_bgp_all_encap_soft_out_cmd,
          "clear ip bgp * encap unicast soft out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear all peers\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n"
          "Soft reconfig outbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_all,
                           BGP_CLEAR_SOFT_OUT, NULL);
   }
   
   ALIAS (clear_ip_bgp_all_encap_soft_out,
          clear_ip_bgp_all_encap_out_cmd,
          "clear ip bgp * encap unicast out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear all peers\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig outbound update\n")
   
 DEFUN (clear_bgp_all_soft_out,  DEFUN (clear_bgp_all_soft_out,
        clear_bgp_all_soft_out_cmd,         clear_bgp_all_soft_out_cmd,
        "clear bgp * soft out",         "clear bgp * soft out",
Line 4865  ALIAS (clear_ip_bgp_peer_vpnv4_soft_out, Line 5037  ALIAS (clear_ip_bgp_peer_vpnv4_soft_out,
        "Address Family Modifier\n"         "Address Family Modifier\n"
        "Soft reconfig outbound update\n")         "Soft reconfig outbound update\n")
   
   DEFUN (clear_ip_bgp_peer_encap_soft_out,
          clear_ip_bgp_peer_encap_soft_out_cmd,
          "clear ip bgp A.B.C.D encap unicast soft out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "BGP neighbor address to clear\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n"
          "Soft reconfig outbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_peer,
                           BGP_CLEAR_SOFT_OUT, argv[0]);
   }
   
   ALIAS (clear_ip_bgp_peer_encap_soft_out,
          clear_ip_bgp_peer_encap_out_cmd,
          "clear ip bgp A.B.C.D encap unicast out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "BGP neighbor address to clear\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig outbound update\n")
   
 DEFUN (clear_bgp_peer_soft_out,  DEFUN (clear_bgp_peer_soft_out,
        clear_bgp_peer_soft_out_cmd,         clear_bgp_peer_soft_out_cmd,
        "clear bgp (A.B.C.D|X:X::X:X) soft out",         "clear bgp (A.B.C.D|X:X::X:X) soft out",
Line 5192  ALIAS (clear_ip_bgp_as_vpnv4_soft_out, Line 5391  ALIAS (clear_ip_bgp_as_vpnv4_soft_out,
        "Address Family modifier\n"         "Address Family modifier\n"
        "Soft reconfig outbound update\n")         "Soft reconfig outbound update\n")
   
   DEFUN (clear_ip_bgp_as_encap_soft_out,
          clear_ip_bgp_as_encap_soft_out_cmd,
          "clear ip bgp " CMD_AS_RANGE " encap unicast soft out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear peers with the AS number\n"
          "Address family\n"
          "Address Family modifier\n"
          "Soft reconfig\n"
          "Soft reconfig outbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_as,
                           BGP_CLEAR_SOFT_OUT, argv[0]);
   }
   
   ALIAS (clear_ip_bgp_as_encap_soft_out,
          clear_ip_bgp_as_encap_out_cmd,
          "clear ip bgp " CMD_AS_RANGE " encap unicast out",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear peers with the AS number\n"
          "Address family\n"
          "Address Family modifier\n"
          "Soft reconfig outbound update\n")
   
 DEFUN (clear_bgp_as_soft_out,  DEFUN (clear_bgp_as_soft_out,
        clear_bgp_as_soft_out_cmd,         clear_bgp_as_soft_out_cmd,
        "clear bgp " CMD_AS_RANGE " soft out",         "clear bgp " CMD_AS_RANGE " soft out",
Line 5231  ALIAS (clear_bgp_as_soft_out, Line 5457  ALIAS (clear_bgp_as_soft_out,
        "Address family\n"         "Address family\n"
        "Clear peers with the AS number\n"         "Clear peers with the AS number\n"
        "Soft reconfig outbound update\n")         "Soft reconfig outbound update\n")
 /* Inbound soft-reconfiguration */  /* Inbound soft-reconfiguration */
 DEFUN (clear_ip_bgp_all_soft_in,  DEFUN (clear_ip_bgp_all_soft_in,
        clear_ip_bgp_all_soft_in_cmd,         clear_ip_bgp_all_soft_in_cmd,
Line 5428  ALIAS (clear_ip_bgp_all_vpnv4_soft_in, Line 5654  ALIAS (clear_ip_bgp_all_vpnv4_soft_in,
        "Address Family Modifier\n"         "Address Family Modifier\n"
        "Soft reconfig inbound update\n")         "Soft reconfig inbound update\n")
   
   DEFUN (clear_ip_bgp_all_encap_soft_in,
          clear_ip_bgp_all_encap_soft_in_cmd,
          "clear ip bgp * encap unicast soft in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear all peers\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n"
          "Soft reconfig inbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_all,
                           BGP_CLEAR_SOFT_IN, NULL);
   }
   
   ALIAS (clear_ip_bgp_all_encap_soft_in,
          clear_ip_bgp_all_encap_in_cmd,
          "clear ip bgp * encap unicast in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear all peers\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig inbound update\n")
   
 DEFUN (clear_bgp_all_soft_in,  DEFUN (clear_bgp_all_soft_in,
        clear_bgp_all_soft_in_cmd,         clear_bgp_all_soft_in_cmd,
        "clear bgp * soft in",         "clear bgp * soft in",
Line 5624  ALIAS (clear_ip_bgp_peer_vpnv4_soft_in, Line 5877  ALIAS (clear_ip_bgp_peer_vpnv4_soft_in,
        "Address Family Modifier\n"         "Address Family Modifier\n"
        "Soft reconfig inbound update\n")         "Soft reconfig inbound update\n")
   
   DEFUN (clear_ip_bgp_peer_encap_soft_in,
          clear_ip_bgp_peer_encap_soft_in_cmd,
          "clear ip bgp A.B.C.D encap unicast soft in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "BGP neighbor address to clear\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n"
          "Soft reconfig inbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_peer,
                           BGP_CLEAR_SOFT_IN, argv[0]);
   }
   
   ALIAS (clear_ip_bgp_peer_encap_soft_in,
          clear_ip_bgp_peer_encap_in_cmd,
          "clear ip bgp A.B.C.D encap unicast in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "BGP neighbor address to clear\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig inbound update\n")
   
 DEFUN (clear_bgp_peer_soft_in,  DEFUN (clear_bgp_peer_soft_in,
        clear_bgp_peer_soft_in_cmd,         clear_bgp_peer_soft_in_cmd,
        "clear bgp (A.B.C.D|X:X::X:X) soft in",         "clear bgp (A.B.C.D|X:X::X:X) soft in",
Line 6131  ALIAS (clear_ip_bgp_as_vpnv4_soft_in, Line 6411  ALIAS (clear_ip_bgp_as_vpnv4_soft_in,
        "Address Family modifier\n"         "Address Family modifier\n"
        "Soft reconfig inbound update\n")         "Soft reconfig inbound update\n")
   
   DEFUN (clear_ip_bgp_as_encap_soft_in,
          clear_ip_bgp_as_encap_soft_in_cmd,
          "clear ip bgp " CMD_AS_RANGE " encap unicast soft in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear peers with the AS number\n"
          "Address family\n"
          "Address Family modifier\n"
          "Soft reconfig\n"
          "Soft reconfig inbound update\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_as,
                           BGP_CLEAR_SOFT_IN, argv[0]);
   }
   
   ALIAS (clear_ip_bgp_as_encap_soft_in,
          clear_ip_bgp_as_encap_in_cmd,
          "clear ip bgp " CMD_AS_RANGE " encap unicast in",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear peers with the AS number\n"
          "Address family\n"
          "Address Family modifier\n"
          "Soft reconfig inbound update\n")
   
 DEFUN (clear_bgp_as_soft_in,  DEFUN (clear_bgp_as_soft_in,
        clear_bgp_as_soft_in_cmd,         clear_bgp_as_soft_in_cmd,
        "clear bgp " CMD_AS_RANGE " soft in",         "clear bgp " CMD_AS_RANGE " soft in",
Line 6193  ALIAS (clear_bgp_as_in_prefix_filter, Line 6500  ALIAS (clear_bgp_as_in_prefix_filter,
        "Clear peers with the AS number\n"         "Clear peers with the AS number\n"
        "Soft reconfig inbound update\n"         "Soft reconfig inbound update\n"
        "Push out prefix-list ORF and do inbound soft reconfig\n")         "Push out prefix-list ORF and do inbound soft reconfig\n")
 /* Both soft-reconfiguration */  /* Both soft-reconfiguration */
 DEFUN (clear_ip_bgp_all_soft,  DEFUN (clear_ip_bgp_all_soft,
        clear_ip_bgp_all_soft_cmd,         clear_ip_bgp_all_soft_cmd,
Line 6281  DEFUN (clear_ip_bgp_all_vpnv4_soft, Line 6588  DEFUN (clear_ip_bgp_all_vpnv4_soft,
                         BGP_CLEAR_SOFT_BOTH, argv[0]);                          BGP_CLEAR_SOFT_BOTH, argv[0]);
 }  }
   
   DEFUN (clear_ip_bgp_all_encap_soft,
          clear_ip_bgp_all_encap_soft_cmd,
          "clear ip bgp * encap unicast soft",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear all peers\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_all,
                           BGP_CLEAR_SOFT_BOTH, argv[0]);
   }
   
 DEFUN (clear_bgp_all_soft,  DEFUN (clear_bgp_all_soft,
        clear_bgp_all_soft_cmd,         clear_bgp_all_soft_cmd,
        "clear bgp * soft",         "clear bgp * soft",
Line 6364  DEFUN (clear_ip_bgp_peer_vpnv4_soft, Line 6686  DEFUN (clear_ip_bgp_peer_vpnv4_soft,
                         BGP_CLEAR_SOFT_BOTH, argv[0]);                          BGP_CLEAR_SOFT_BOTH, argv[0]);
 }  }
   
   DEFUN (clear_ip_bgp_peer_encap_soft,
          clear_ip_bgp_peer_encap_soft_cmd,
          "clear ip bgp A.B.C.D encap unicast soft",
          CLEAR_STR
          IP_STR
          BGP_STR
          "BGP neighbor address to clear\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_peer,
                           BGP_CLEAR_SOFT_BOTH, argv[0]);
   }
   
 DEFUN (clear_bgp_peer_soft,  DEFUN (clear_bgp_peer_soft,
        clear_bgp_peer_soft_cmd,         clear_bgp_peer_soft_cmd,
        "clear bgp (A.B.C.D|X:X::X:X) soft",         "clear bgp (A.B.C.D|X:X::X:X) soft",
Line 6547  DEFUN (clear_ip_bgp_as_vpnv4_soft, Line 6884  DEFUN (clear_ip_bgp_as_vpnv4_soft,
                         BGP_CLEAR_SOFT_BOTH, argv[0]);                          BGP_CLEAR_SOFT_BOTH, argv[0]);
 }  }
   
   DEFUN (clear_ip_bgp_as_encap_soft,
          clear_ip_bgp_as_encap_soft_cmd,
          "clear ip bgp " CMD_AS_RANGE " encap unicast soft",
          CLEAR_STR
          IP_STR
          BGP_STR
          "Clear peers with the AS number\n"
          "Address family\n"
          "Address Family Modifier\n"
          "Soft reconfig\n")
   {
     return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_as,
                           BGP_CLEAR_SOFT_BOTH, argv[0]);
   }
   
 DEFUN (clear_bgp_as_soft,  DEFUN (clear_bgp_as_soft,
        clear_bgp_as_soft_cmd,         clear_bgp_as_soft_cmd,
        "clear bgp " CMD_AS_RANGE " soft",         "clear bgp " CMD_AS_RANGE " soft",
Line 6567  ALIAS (clear_bgp_as_soft, Line 6919  ALIAS (clear_bgp_as_soft,
        "Address family\n"         "Address family\n"
        "Clear peers with the AS number\n"         "Clear peers with the AS number\n"
        "Soft reconfig\n")         "Soft reconfig\n")
 /* RS-client soft reconfiguration. */  /* RS-client soft reconfiguration. */
 #ifdef HAVE_IPV6  
 DEFUN (clear_bgp_all_rsclient,  DEFUN (clear_bgp_all_rsclient,
        clear_bgp_all_rsclient_cmd,         clear_bgp_all_rsclient_cmd,
        "clear bgp * rsclient",         "clear bgp * rsclient",
Line 6615  ALIAS (clear_bgp_all_rsclient, Line 6966  ALIAS (clear_bgp_all_rsclient,
        "view name\n"         "view name\n"
        "Clear all peers\n"         "Clear all peers\n"
        "Soft reconfig for rsclient RIB\n")         "Soft reconfig for rsclient RIB\n")
 #endif /* HAVE_IPV6 */  
   
 DEFUN (clear_ip_bgp_all_rsclient,  DEFUN (clear_ip_bgp_all_rsclient,
        clear_ip_bgp_all_rsclient_cmd,         clear_ip_bgp_all_rsclient_cmd,
Line 6645  ALIAS (clear_ip_bgp_all_rsclient, Line 6995  ALIAS (clear_ip_bgp_all_rsclient,
        "Clear all peers\n"         "Clear all peers\n"
        "Soft reconfig for rsclient RIB\n")         "Soft reconfig for rsclient RIB\n")
   
 #ifdef HAVE_IPV6  
 DEFUN (clear_bgp_peer_rsclient,  DEFUN (clear_bgp_peer_rsclient,
        clear_bgp_peer_rsclient_cmd,         clear_bgp_peer_rsclient_cmd,
        "clear bgp (A.B.C.D|X:X::X:X) rsclient",         "clear bgp (A.B.C.D|X:X::X:X) rsclient",
Line 6695  ALIAS (clear_bgp_peer_rsclient, Line 7044  ALIAS (clear_bgp_peer_rsclient,
        "BGP neighbor IP address to clear\n"         "BGP neighbor IP address to clear\n"
        "BGP IPv6 neighbor to clear\n"         "BGP IPv6 neighbor to clear\n"
        "Soft reconfig for rsclient RIB\n")         "Soft reconfig for rsclient RIB\n")
 #endif /* HAVE_IPV6 */  
   
 DEFUN (clear_ip_bgp_peer_rsclient,  DEFUN (clear_ip_bgp_peer_rsclient,
        clear_ip_bgp_peer_rsclient_cmd,         clear_ip_bgp_peer_rsclient_cmd,
Line 6900  bgp_show_summary (struct vty *vty, struct bgp *bgp, in Line 7248  bgp_show_summary (struct vty *vty, struct bgp *bgp, in
   int len;    int len;
   
   /* Header string for each address family. */    /* Header string for each address family. */
  static char header[] = "Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd";  static char header[] = "Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd";
       
   for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))    for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
     {      {
Line 7069  DEFUN (show_ip_bgp_ipv4_summary,  Line 7417  DEFUN (show_ip_bgp_ipv4_summary, 
   return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);    return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
 }  }
   
 ALIAS (show_ip_bgp_ipv4_summary,  
        show_bgp_ipv4_safi_summary_cmd,  
        "show bgp ipv4 (unicast|multicast) summary",  
        SHOW_STR  
        BGP_STR  
        "Address family\n"  
        "Address Family modifier\n"  
        "Address Family modifier\n"  
        "Summary of BGP neighbor status\n")  
   
 DEFUN (show_ip_bgp_instance_ipv4_summary,  DEFUN (show_ip_bgp_instance_ipv4_summary,
        show_ip_bgp_instance_ipv4_summary_cmd,         show_ip_bgp_instance_ipv4_summary_cmd,
        "show ip bgp view WORD ipv4 (unicast|multicast) summary",         "show ip bgp view WORD ipv4 (unicast|multicast) summary",
Line 7098  DEFUN (show_ip_bgp_instance_ipv4_summary, Line 7436  DEFUN (show_ip_bgp_instance_ipv4_summary,
     return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);      return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
 }  }
   
 ALIAS (show_ip_bgp_instance_ipv4_summary,  
        show_bgp_instance_ipv4_safi_summary_cmd,  
        "show bgp view WORD ipv4 (unicast|multicast) summary",  
        SHOW_STR  
        BGP_STR  
        "BGP view\n"  
        "View name\n"  
        "Address family\n"  
        "Address Family modifier\n"  
        "Address Family modifier\n"  
        "Summary of BGP neighbor status\n")  
   
 DEFUN (show_ip_bgp_vpnv4_all_summary,  DEFUN (show_ip_bgp_vpnv4_all_summary,
        show_ip_bgp_vpnv4_all_summary_cmd,         show_ip_bgp_vpnv4_all_summary_cmd,
        "show ip bgp vpnv4 all summary",         "show ip bgp vpnv4 all summary",
Line 7147  DEFUN (show_ip_bgp_vpnv4_rd_summary, Line 7473  DEFUN (show_ip_bgp_vpnv4_rd_summary,
   return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);    return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
 }  }
   
#ifdef HAVE_IPV6DEFUN (show_bgp_ipv4_safi_summary,
DEFUN (show_bgp_summary,        show_bgp_ipv4_safi_summary_cmd,
       show_bgp_summary_cmd,       "show bgp ipv4 (unicast|multicast) summary",
       "show bgp summary", 
        SHOW_STR         SHOW_STR
        BGP_STR         BGP_STR
          "Address family\n"
          "Address Family modifier\n"
          "Address Family modifier\n"
        "Summary of BGP neighbor status\n")         "Summary of BGP neighbor status\n")
 {  {
  return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);  if (strncmp (argv[0], "m", 1) == 0)
     return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
 
   return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
 }  }
   
   DEFUN (show_bgp_instance_ipv4_safi_summary,
          show_bgp_instance_ipv4_safi_summary_cmd,
          "show bgp view WORD ipv4 (unicast|multicast) summary",
          SHOW_STR
          BGP_STR
          "BGP view\n"
          "View name\n"
          "Address family\n"
          "Address Family modifier\n"
          "Address Family modifier\n"
          "Summary of BGP neighbor status\n")
   {
     if (strncmp (argv[1], "m", 1) == 0)
       return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST);
     else
       return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
   }
   
   DEFUN (show_bgp_ipv4_vpn_summary,
          show_bgp_ipv4_vpn_summary_cmd,
          "show bgp ipv4 vpn summary",
          SHOW_STR
          BGP_STR
          "IPv4\n"
          "Display VPN NLRI specific information\n"
          "Summary of BGP neighbor status\n")
   {
     return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
   }
   
   /* `show ip bgp summary' commands. */
   DEFUN (show_bgp_ipv6_vpn_summary,
          show_bgp_ipv6_vpn_summary_cmd,
          "show bgp ipv6 vpn summary",
          SHOW_STR
          BGP_STR
          "IPv6\n"
          "Display VPN NLRI specific information\n"
          "Summary of BGP neighbor status\n")
   {
     return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
   }
   
   DEFUN (show_bgp_ipv4_encap_summary,
          show_bgp_ipv4_encap_summary_cmd,
          "show bgp ipv4 encap summary",
          SHOW_STR
          BGP_STR
          "IPv4\n"
          "Display ENCAP NLRI specific information\n"
          "Summary of BGP neighbor status\n")
   {
     return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP);
   }
   
   DEFUN (show_bgp_ipv6_encap_summary,
          show_bgp_ipv6_encap_summary_cmd,
          "show bgp ipv6 encap summary",
          SHOW_STR
          BGP_STR
          "IPv6\n"
          "Display ENCAP NLRI specific information\n"
          "Summary of BGP neighbor status\n")
   {
     return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
   }
   
 DEFUN (show_bgp_instance_summary,  DEFUN (show_bgp_instance_summary,
        show_bgp_instance_summary_cmd,         show_bgp_instance_summary_cmd,
        "show bgp view WORD summary",         "show bgp view WORD summary",
Line 7167  DEFUN (show_bgp_instance_summary, Line 7565  DEFUN (show_bgp_instance_summary,
        "View name\n"         "View name\n"
        "Summary of BGP neighbor status\n")         "Summary of BGP neighbor status\n")
 {  {
  return bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);    vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_ENCAP);
 
     vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
     vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_MULTICAST);
     vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP);
 
     return CMD_SUCCESS;
 }  }
   
ALIAS (show_bgp_summary, DEFUN (show_bgp_instance_ipv4_summary,
       show_bgp_ipv6_summary_cmd,       show_bgp_instance_ipv4_summary_cmd,
       "show bgp ipv6 summary",       "show bgp view WORD ipv4 summary",
        SHOW_STR         SHOW_STR
        BGP_STR         BGP_STR
       "Address family\n"       IP_STR
        "Address Family modifier\n"
        "Address Family modifier\n"
        "BGP view\n"
        "View name\n"
        "Summary of BGP neighbor status\n")         "Summary of BGP neighbor status\n")
   {
       vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "---------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
       vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST);
       vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_MPLS_VPN);
       vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_ENCAP);
   
ALIAS (show_bgp_instance_summary,    return CMD_SUCCESS;
 }
 
 DEFUN (show_bgp_instance_ipv6_summary,
        show_bgp_instance_ipv6_summary_cmd,         show_bgp_instance_ipv6_summary_cmd,
        "show bgp view WORD ipv6 summary",         "show bgp view WORD ipv6 summary",
        SHOW_STR         SHOW_STR
        BGP_STR         BGP_STR
          IPV6_STR
          "Address Family modifier\n"
          "Address Family modifier\n"
        "BGP view\n"         "BGP view\n"
        "View name\n"         "View name\n"
        "Address family\n"  
        "Summary of BGP neighbor status\n")         "Summary of BGP neighbor status\n")
   {
       vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "---------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
       vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_MULTICAST);
       vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_MPLS_VPN);
       vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-------------------%s", VTY_NEWLINE);
       bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP);
   
       return CMD_SUCCESS;
   }
   
 DEFUN (show_bgp_ipv6_safi_summary,  DEFUN (show_bgp_ipv6_safi_summary,
        show_bgp_ipv6_safi_summary_cmd,         show_bgp_ipv6_safi_summary_cmd,
        "show bgp ipv6 (unicast|multicast) summary",         "show bgp ipv6 (unicast|multicast) summary",
Line 7245  DEFUN (show_ipv6_mbgp_summary,  Line 7707  DEFUN (show_ipv6_mbgp_summary, 
 {  {
   return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);    return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
 }  }
#endif /* HAVE_IPV6 */
/* variations of show bgp [...] summary */
 
 /* This one is for the 0-keyword variant */
 DEFUN (show_bgp_summary,
        show_bgp_summary_cmd,
        "show bgp summary",
        SHOW_STR
        BGP_STR
        "Summary of BGP neighbor status\n")
 {
     vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP);
 
     vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
     vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
     vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
 
     return CMD_SUCCESS;
 }
 
 ALIAS (show_bgp_summary, 
        show_bgp_ipv6_summary_cmd,
        "show bgp ipv6 summary",
        SHOW_STR
        BGP_STR
        "Address family\n"
        "Summary of BGP neighbor status\n")
 
 DEFUN (show_bgp_summary_1w,
        show_bgp_summary_1w_cmd,
        "show bgp (ipv4|ipv6|unicast|multicast|vpn|encap) summary",
        SHOW_STR
        BGP_STR
        IP_STR
        IP6_STR
        "Address Family modifier\n"
        "Address Family modifier\n"
        "Address Family modifier\n"
        "Address Family modifier\n"
        "Summary of BGP neighbor status\n")
 {
   if (strcmp (argv[0], "ipv4") == 0) {
     vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP);
     return CMD_SUCCESS;
   }
 
   if (strcmp (argv[0], "ipv6") == 0) {
     vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
     vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
     vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
     return CMD_SUCCESS;
   }
 
   if (strcmp (argv[0], "unicast") == 0) {
     vty_out(vty, "IPv4 Unicast Summary:%s", VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%s", VTY_NEWLINE);
     vty_out(vty, "IPv6 Unicast Summary:%s", VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
     return CMD_SUCCESS;
   }
   if (strcmp (argv[0], "multicast") == 0) {
     vty_out(vty, "IPv4 Multicast Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%s", VTY_NEWLINE);
     vty_out(vty, "IPv6 Multicast Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
     return CMD_SUCCESS;
   }
   if (strcmp (argv[0], "vpn") == 0) {
     vty_out(vty, "IPv4 VPN Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%s", VTY_NEWLINE);
     vty_out(vty, "IPv6 VPN Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
     return CMD_SUCCESS;
   }
   if (strcmp (argv[0], "encap") == 0) {
     vty_out(vty, "IPv4 Encap Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP);
     vty_out(vty, "%s", VTY_NEWLINE);
     vty_out(vty, "IPv6 Encap Summary:%s", VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
     return CMD_SUCCESS;
   }
   vty_out(vty, "Unknown keyword: %s%s", argv[0], VTY_NEWLINE);
   return CMD_WARNING;
 }
 
 
 
 const char *  const char *
 afi_safi_print (afi_t afi, safi_t safi)  afi_safi_print (afi_t afi, safi_t safi)
 {  {
Line 7255  afi_safi_print (afi_t afi, safi_t safi) Line 7854  afi_safi_print (afi_t afi, safi_t safi)
   else if (afi == AFI_IP && safi == SAFI_MULTICAST)    else if (afi == AFI_IP && safi == SAFI_MULTICAST)
     return "IPv4 Multicast";      return "IPv4 Multicast";
   else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)    else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
    return "VPNv4 Unicast";    return "VPN-IPv4 Unicast";
   else if (afi == AFI_IP && safi == SAFI_ENCAP)
     return "ENCAP-IPv4 Unicast";
   else if (afi == AFI_IP6 && safi == SAFI_UNICAST)    else if (afi == AFI_IP6 && safi == SAFI_UNICAST)
     return "IPv6 Unicast";      return "IPv6 Unicast";
   else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)    else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
     return "IPv6 Multicast";      return "IPv6 Multicast";
     else if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
       return "VPN-IPv6 Unicast";
     else if (afi == AFI_IP6 && safi == SAFI_ENCAP)
       return "ENCAP-IPv6 Unicast";
   else    else
     return "Unknown";      return "Unknown";
 }  }
Line 7597  bgp_show_peer (struct vty *vty, struct peer *p) Line 8202  bgp_show_peer (struct vty *vty, struct peer *p)
           || p->afc_recv[AFI_IP][SAFI_UNICAST]            || p->afc_recv[AFI_IP][SAFI_UNICAST]
           || p->afc_adv[AFI_IP][SAFI_MULTICAST]            || p->afc_adv[AFI_IP][SAFI_MULTICAST]
           || p->afc_recv[AFI_IP][SAFI_MULTICAST]            || p->afc_recv[AFI_IP][SAFI_MULTICAST]
 #ifdef HAVE_IPV6  
           || p->afc_adv[AFI_IP6][SAFI_UNICAST]            || p->afc_adv[AFI_IP6][SAFI_UNICAST]
           || p->afc_recv[AFI_IP6][SAFI_UNICAST]            || p->afc_recv[AFI_IP6][SAFI_UNICAST]
           || p->afc_adv[AFI_IP6][SAFI_MULTICAST]            || p->afc_adv[AFI_IP6][SAFI_MULTICAST]
           || p->afc_recv[AFI_IP6][SAFI_MULTICAST]            || p->afc_recv[AFI_IP6][SAFI_MULTICAST]
#endif /* HAVE_IPV6 */          || p->afc_adv[AFI_IP6][SAFI_MPLS_VPN]
           || p->afc_recv[AFI_IP6][SAFI_MPLS_VPN]
           || p->afc_adv[AFI_IP6][SAFI_ENCAP]
           || p->afc_recv[AFI_IP6][SAFI_ENCAP]
           || p->afc_adv[AFI_IP][SAFI_ENCAP]
           || p->afc_recv[AFI_IP][SAFI_ENCAP]
           || p->afc_adv[AFI_IP][SAFI_MPLS_VPN]            || p->afc_adv[AFI_IP][SAFI_MPLS_VPN]
           || p->afc_recv[AFI_IP][SAFI_MPLS_VPN])            || p->afc_recv[AFI_IP][SAFI_MPLS_VPN])
         {          {
Line 7825  bgp_show_peer (struct vty *vty, struct peer *p) Line 8434  bgp_show_peer (struct vty *vty, struct peer *p)
         vty_out (vty, "  External BGP neighbor may be up to %d hops away.%s",          vty_out (vty, "  External BGP neighbor may be up to %d hops away.%s",
                  p->ttl, VTY_NEWLINE);                   p->ttl, VTY_NEWLINE);
     }      }
     else
       {
         if (p->gtsm_hops > 0)
           vty_out (vty, "  Internal BGP neighbor may be up to %d hops away.%s",
                    p->gtsm_hops, VTY_NEWLINE);
       }
   
   /* Local address. */    /* Local address. */
   if (p->su_local)    if (p->su_local)
Line 7850  bgp_show_peer (struct vty *vty, struct peer *p) Line 8465  bgp_show_peer (struct vty *vty, struct peer *p)
       vty_out (vty, "Nexthop: %s%s",         vty_out (vty, "Nexthop: %s%s", 
                inet_ntop (AF_INET, &p->nexthop.v4, buf1, BUFSIZ),                 inet_ntop (AF_INET, &p->nexthop.v4, buf1, BUFSIZ),
                VTY_NEWLINE);                 VTY_NEWLINE);
 #ifdef HAVE_IPV6  
       vty_out (vty, "Nexthop global: %s%s",         vty_out (vty, "Nexthop global: %s%s", 
                inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, BUFSIZ),                 inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, BUFSIZ),
                VTY_NEWLINE);                 VTY_NEWLINE);
Line 7860  bgp_show_peer (struct vty *vty, struct peer *p) Line 8474  bgp_show_peer (struct vty *vty, struct peer *p)
       vty_out (vty, "BGP connection: %s%s",        vty_out (vty, "BGP connection: %s%s",
                p->shared_network ? "shared network" : "non shared network",                 p->shared_network ? "shared network" : "non shared network",
                VTY_NEWLINE);                 VTY_NEWLINE);
 #endif /* HAVE_IPV6 */  
     }      }
   
     /* TCP metrics. */
     if (p->status == Established && p->rtt)
       vty_out (vty, "Estimated round trip time: %d ms%s",
                p->rtt, VTY_NEWLINE);
   
   /* Timer information. */    /* Timer information. */
   if (p->t_start)    if (p->t_start)
     vty_out (vty, "Next start timer due in %ld seconds%s",      vty_out (vty, "Next start timer due in %ld seconds%s",
Line 7955  bgp_show_neighbor_vty (struct vty *vty, const char *na Line 8573  bgp_show_neighbor_vty (struct vty *vty, const char *na
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
   
/* "show ip bgp neighbors" commands.  *//* "show ip bgp neighbors" commands.  */DEFUN (show_ip_bgp_neighbors,
DEFUN (show_ip_bgp_neighbors, 
        show_ip_bgp_neighbors_cmd,         show_ip_bgp_neighbors_cmd,
        "show ip bgp neighbors",         "show ip bgp neighbors",
        SHOW_STR         SHOW_STR
Line 8000  ALIAS (show_ip_bgp_neighbors, Line 8617  ALIAS (show_ip_bgp_neighbors,
        "Detailed information on TCP and BGP neighbor connections\n")         "Detailed information on TCP and BGP neighbor connections\n")
   
 ALIAS (show_ip_bgp_neighbors,  ALIAS (show_ip_bgp_neighbors,
        show_bgp_neighbors_cmd,  
        "show bgp neighbors",  
        SHOW_STR  
        BGP_STR  
        "Detailed information on TCP and BGP neighbor connections\n")  
   
 ALIAS (show_ip_bgp_neighbors,  
        show_bgp_ipv6_neighbors_cmd,         show_bgp_ipv6_neighbors_cmd,
        "show bgp ipv6 neighbors",         "show bgp ipv6 neighbors",
        SHOW_STR         SHOW_STR
Line 8063  ALIAS (show_ip_bgp_neighbors_peer, Line 8673  ALIAS (show_ip_bgp_neighbors_peer,
        "Neighbor to display information about\n")         "Neighbor to display information about\n")
   
 ALIAS (show_ip_bgp_neighbors_peer,  ALIAS (show_ip_bgp_neighbors_peer,
        show_bgp_neighbors_peer_cmd,  
        "show bgp neighbors (A.B.C.D|X:X::X:X)",  
        SHOW_STR  
        BGP_STR  
        "Detailed information on TCP and BGP neighbor connections\n"  
        "Neighbor to display information about\n"  
        "Neighbor to display information about\n")  
   
 ALIAS (show_ip_bgp_neighbors_peer,  
        show_bgp_ipv6_neighbors_peer_cmd,         show_bgp_ipv6_neighbors_peer_cmd,
        "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X)",         "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X)",
        SHOW_STR         SHOW_STR
Line 8095  DEFUN (show_ip_bgp_instance_neighbors, Line 8696  DEFUN (show_ip_bgp_instance_neighbors,
 }  }
   
 ALIAS (show_ip_bgp_instance_neighbors,  ALIAS (show_ip_bgp_instance_neighbors,
        show_bgp_instance_neighbors_cmd,  
        "show bgp view WORD neighbors",  
        SHOW_STR  
        BGP_STR  
        "BGP view\n"  
        "View name\n"  
        "Detailed information on TCP and BGP neighbor connections\n")  
   
 ALIAS (show_ip_bgp_instance_neighbors,  
        show_bgp_instance_ipv6_neighbors_cmd,         show_bgp_instance_ipv6_neighbors_cmd,
        "show bgp view WORD ipv6 neighbors",         "show bgp view WORD ipv6 neighbors",
        SHOW_STR         SHOW_STR
Line 8128  DEFUN (show_ip_bgp_instance_neighbors_peer, Line 8720  DEFUN (show_ip_bgp_instance_neighbors_peer,
   return bgp_show_neighbor_vty (vty, argv[0], show_peer, argv[1]);    return bgp_show_neighbor_vty (vty, argv[0], show_peer, argv[1]);
 }  }
   
 ALIAS (show_ip_bgp_instance_neighbors_peer,  
        show_bgp_instance_neighbors_peer_cmd,  
        "show bgp view WORD neighbors (A.B.C.D|X:X::X:X)",  
        SHOW_STR  
        BGP_STR  
        "BGP view\n"  
        "View name\n"  
        "Detailed information on TCP and BGP neighbor connections\n"  
        "Neighbor to display information about\n"  
        "Neighbor to display information about\n")  
   
 ALIAS (show_ip_bgp_instance_neighbors_peer,  
        show_bgp_instance_ipv6_neighbors_peer_cmd,  
        "show bgp view WORD ipv6 neighbors (A.B.C.D|X:X::X:X)",  
        SHOW_STR  
        BGP_STR  
        "BGP view\n"  
        "View name\n"  
        "Address family\n"  
        "Detailed information on TCP and BGP neighbor connections\n"  
        "Neighbor to display information about\n"  
        "Neighbor to display information about\n")  
          
 /* Show BGP's AS paths internal data.  There are both `show ip bgp  /* Show BGP's AS paths internal data.  There are both `show ip bgp
    paths' and `show ip mbgp paths'.  Those functions results are the     paths' and `show ip mbgp paths'.  Those functions results are the
    same.*/     same.*/
Line 8183  DEFUN (show_ip_bgp_ipv4_paths,  Line 8752  DEFUN (show_ip_bgp_ipv4_paths, 
   
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 DEFUN (show_bgp_neighbors,
        show_bgp_neighbors_cmd,
        "show bgp neighbors",
        SHOW_STR
        BGP_STR
        "Detailed information on TCP and BGP neighbor connections\n")
 {
   return bgp_show_neighbor_vty (vty, NULL, show_all, NULL);
 }
 
 DEFUN (show_bgp_neighbors_peer,
        show_bgp_neighbors_peer_cmd,
        "show bgp neighbors (A.B.C.D|X:X::X:X)",
        SHOW_STR
        BGP_STR
        "Detailed information on TCP and BGP neighbor connections\n"
        "Neighbor to display information about\n"
        "Neighbor to display information about\n")
 {
   return bgp_show_neighbor_vty (vty, NULL, show_peer, argv[argc - 1]);
 }
 
 DEFUN (show_bgp_instance_neighbors,
        show_bgp_instance_neighbors_cmd,
        "show bgp view WORD neighbors",
        SHOW_STR
        BGP_STR
        "BGP view\n"
        "View name\n"
        "Detailed information on TCP and BGP neighbor connections\n")
 {
   return bgp_show_neighbor_vty (vty, argv[0], show_all, NULL);
 }
 
 DEFUN (show_bgp_instance_neighbors_peer,
        show_bgp_instance_neighbors_peer_cmd,
        "show bgp view WORD neighbors (A.B.C.D|X:X::X:X)",
        SHOW_STR
        BGP_STR
        "BGP view\n"
        "View name\n"
        "Detailed information on TCP and BGP neighbor connections\n"
        "Neighbor to display information about\n"
        "Neighbor to display information about\n")
 {
   return bgp_show_neighbor_vty (vty, argv[0], show_peer, argv[1]);
 }
 
 ALIAS (show_bgp_instance_neighbors_peer,
        show_bgp_instance_ipv6_neighbors_peer_cmd,
        "show bgp view WORD ipv6 neighbors (A.B.C.D|X:X::X:X)",
        SHOW_STR
        BGP_STR
        "BGP view\n"
        "View name\n"
        "Address family\n"
        "Detailed information on TCP and BGP neighbor connections\n"
        "Neighbor to display information about\n"
        "Neighbor to display information about\n")
        
 /* Show BGP's AS paths internal data.  There are both `show ip bgp
    paths' and `show ip mbgp paths'.  Those functions results are the
    same.*/
 DEFUN (show_bgp_ipv4_paths, 
        show_bgp_ipv4_paths_cmd,
        "show bgp paths",
        SHOW_STR
        BGP_STR
        "Path information\n")
 {
   vty_out (vty, "Address Refcnt Path%s", VTY_NEWLINE);
   aspath_print_all_vty (vty);
   return CMD_SUCCESS;
 }
 
 #include "hash.h"  #include "hash.h"
   
 static void  static void
Line 8192  community_show_all_iterator (struct hash_backet *backe Line 8836  community_show_all_iterator (struct hash_backet *backe
   struct community *com;    struct community *com;
   
   com = (struct community *) backet->data;    com = (struct community *) backet->data;
  vty_out (vty, "[%p] (%ld) %s%s", backet, com->refcnt,  vty_out (vty, "[%p] (%ld) %s%s", (void *)backet, com->refcnt,
            community_str (com), VTY_NEWLINE);             community_str (com), VTY_NEWLINE);
 }  }
   
Line 8226  DEFUN (show_ip_bgp_attr_info,  Line 8870  DEFUN (show_ip_bgp_attr_info, 
   attr_show_all (vty);    attr_show_all (vty);
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 static int  static int
 bgp_write_rsclient_summary (struct vty *vty, struct peer *rsclient,  bgp_write_rsclient_summary (struct vty *vty, struct peer *rsclient,
         afi_t afi, safi_t safi)          afi_t afi, safi_t safi)
Line 8259  bgp_write_rsclient_summary (struct vty *vty, struct pe Line 8903  bgp_write_rsclient_summary (struct vty *vty, struct pe
   
   vty_out (vty, "4 ");    vty_out (vty, "4 ");
   
  vty_out (vty, "%11d ", rsclient->as);  vty_out (vty, "%10u ", rsclient->as);
   
   rmname = ROUTE_MAP_EXPORT_NAME(&rsclient->filter[afi][safi]);    rmname = ROUTE_MAP_EXPORT_NAME(&rsclient->filter[afi][safi]);
   if ( rmname && strlen (rmname) > 13 )    if ( rmname && strlen (rmname) > 13 )
Line 8304  bgp_show_rsclient_summary (struct vty *vty, struct bgp Line 8948  bgp_show_rsclient_summary (struct vty *vty, struct bgp
   int count = 0;    int count = 0;
   
   /* Header string for each address family. */    /* Header string for each address family. */
  static char header[] = "Neighbor        V    AS  Export-Policy  Import-Policy  Up/Down  State";  static char header[] = "Neighbor        V         AS  Export-Policy  Import-Policy  Up/Down  State";
   
   for (ALL_LIST_ELEMENTS (bgp->rsclient, node, nnode, peer))    for (ALL_LIST_ELEMENTS (bgp->rsclient, node, nnode, peer))
     {      {
Line 8466  ALIAS (show_bgp_instance_ipv4_safi_rsclient_summary, Line 9110  ALIAS (show_bgp_instance_ipv4_safi_rsclient_summary,
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
   
 #ifdef HAVE_IPV6  
 DEFUN (show_bgp_rsclient_summary,  DEFUN (show_bgp_rsclient_summary,
        show_bgp_rsclient_summary_cmd,         show_bgp_rsclient_summary_cmd,
        "show bgp rsclient summary",         "show bgp rsclient summary",
Line 8475  DEFUN (show_bgp_rsclient_summary, Line 9118  DEFUN (show_bgp_rsclient_summary,
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
 {  {
  return bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);    vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP);
 
     vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
     vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
     vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
 
     return CMD_SUCCESS;
 }  }
   
 DEFUN (show_bgp_instance_rsclient_summary,  DEFUN (show_bgp_instance_rsclient_summary,
Line 8488  DEFUN (show_bgp_instance_rsclient_summary, Line 9157  DEFUN (show_bgp_instance_rsclient_summary,
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
 {  {
  return bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);    vty_out(vty, "%sIPv4 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
     vty_out(vty, "%sIPv4 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST);
     vty_out(vty, "%sIPv4 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv4 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP, SAFI_ENCAP);
 
     vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "---------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
     vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_MULTICAST);
     vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-----------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_MPLS_VPN);
     vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
     vty_out(vty, "-------------------%s", VTY_NEWLINE);
     bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP);
 
     return CMD_SUCCESS;
 }  }
   
ALIAS (show_bgp_rsclient_summary,DEFUN (show_bgp_ipv6_rsclient_summary,
       show_bgp_ipv6_rsclient_summary_cmd,        show_bgp_ipv6_rsclient_summary_cmd,
       "show bgp ipv6 rsclient summary",        "show bgp ipv6 rsclient summary",
        SHOW_STR         SHOW_STR
Line 8499  ALIAS (show_bgp_rsclient_summary, Line 9194  ALIAS (show_bgp_rsclient_summary,
        "Address family\n"         "Address family\n"
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
   {
       vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "---------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
       vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
       vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN);
       vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP);
   
ALIAS (show_bgp_instance_rsclient_summary,    return CMD_SUCCESS;
 }
 
 DEFUN (show_bgp_instance_ipv6_rsclient_summary,
       show_bgp_instance_ipv6_rsclient_summary_cmd,        show_bgp_instance_ipv6_rsclient_summary_cmd,
        "show bgp view WORD ipv6 rsclient summary",         "show bgp view WORD ipv6 rsclient summary",
        SHOW_STR         SHOW_STR
Line 8510  ALIAS (show_bgp_instance_rsclient_summary, Line 9221  ALIAS (show_bgp_instance_rsclient_summary,
        "Address family\n"         "Address family\n"
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
   {
       vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "---------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
       vty_out(vty, "%sIPv6 Multicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_MULTICAST);
       vty_out(vty, "%sIPv6 VPN Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-----------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_MPLS_VPN);
       vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE);
       vty_out(vty, "-------------------%s", VTY_NEWLINE);
       bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP);
   
       return CMD_SUCCESS;
   }
   
 DEFUN (show_bgp_instance_ipv6_safi_rsclient_summary,  DEFUN (show_bgp_instance_ipv6_safi_rsclient_summary,
        show_bgp_instance_ipv6_safi_rsclient_summary_cmd,         show_bgp_instance_ipv6_safi_rsclient_summary_cmd,
        "show bgp view WORD ipv6 (unicast|multicast) rsclient summary",         "show bgp view WORD ipv6 (unicast|multicast) rsclient summary",
Line 8540  ALIAS (show_bgp_instance_ipv6_safi_rsclient_summary, Line 9267  ALIAS (show_bgp_instance_ipv6_safi_rsclient_summary,
        "show bgp ipv6 (unicast|multicast) rsclient summary",         "show bgp ipv6 (unicast|multicast) rsclient summary",
        SHOW_STR         SHOW_STR
        BGP_STR         BGP_STR
       "Address family\n"       IPV6_STR
        "Address Family modifier\n"         "Address Family modifier\n"
        "Address Family modifier\n"         "Address Family modifier\n"
        "Information about Route Server Clients\n"         "Information about Route Server Clients\n"
        "Summary of all Route Server Clients\n")         "Summary of all Route Server Clients\n")
   
 #endif /* HAVE IPV6 */  
   
 /* Redistribute VTY commands.  */  /* Redistribute VTY commands.  */
   
 DEFUN (bgp_redistribute_ipv4,  DEFUN (bgp_redistribute_ipv4,
Line 8761  ALIAS (no_bgp_redistribute_ipv4_rmap_metric, Line 9486  ALIAS (no_bgp_redistribute_ipv4_rmap_metric,
        "Default metric\n"         "Default metric\n"
        "Route map reference\n"         "Route map reference\n"
        "Pointer to route-map entries\n")         "Pointer to route-map entries\n")
#ifdef HAVE_IPV6 
 DEFUN (bgp_redistribute_ipv6,  DEFUN (bgp_redistribute_ipv6,
        bgp_redistribute_ipv6_cmd,         bgp_redistribute_ipv6_cmd,
        "redistribute " QUAGGA_IP6_REDIST_STR_BGPD,         "redistribute " QUAGGA_IP6_REDIST_STR_BGPD,
Line 8975  ALIAS (no_bgp_redistribute_ipv6_rmap_metric, Line 9699  ALIAS (no_bgp_redistribute_ipv6_rmap_metric,
        "Default metric\n"         "Default metric\n"
        "Route map reference\n"         "Route map reference\n"
        "Pointer to route-map entries\n")         "Pointer to route-map entries\n")
#endif /* HAVE_IPV6 */
 
 int  int
 bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi,  bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi,
                                safi_t safi, int *write)                                 safi_t safi, int *write)
Line 9009  bgp_config_write_redistribute (struct vty *vty, struct Line 9732  bgp_config_write_redistribute (struct vty *vty, struct
     }      }
   return *write;    return *write;
 }  }
 /* BGP node structure. */  /* BGP node structure. */
 static struct cmd_node bgp_node =  static struct cmd_node bgp_node =
 {  {
Line 9052  static struct cmd_node bgp_vpnv4_node = Line 9775  static struct cmd_node bgp_vpnv4_node =
   "%s(config-router-af)# ",    "%s(config-router-af)# ",
   1    1
 };  };
 static struct cmd_node bgp_vpnv6_node =
 {
   BGP_VPNV6_NODE,
   "%s(config-router-af-vpnv6)# ",
   1
 };
 
 static struct cmd_node bgp_encap_node =
 {
   BGP_ENCAP_NODE,
   "%s(config-router-af-encap)# ",
   1
 };
 
 static struct cmd_node bgp_encapv6_node =
 {
   BGP_ENCAPV6_NODE,
   "%s(config-router-af-encapv6)# ",
   1
 };
 
 static void community_list_vty (void);  static void community_list_vty (void);
   
 void  void
Line 9065  bgp_vty_init (void) Line 9809  bgp_vty_init (void)
   install_node (&bgp_ipv6_unicast_node, NULL);    install_node (&bgp_ipv6_unicast_node, NULL);
   install_node (&bgp_ipv6_multicast_node, NULL);    install_node (&bgp_ipv6_multicast_node, NULL);
   install_node (&bgp_vpnv4_node, NULL);    install_node (&bgp_vpnv4_node, NULL);
     install_node (&bgp_vpnv6_node, NULL);
     install_node (&bgp_encap_node, NULL);
     install_node (&bgp_encapv6_node, NULL);
   
   /* Install default VTY commands to new nodes.  */    /* Install default VTY commands to new nodes.  */
   install_default (BGP_NODE);    install_default (BGP_NODE);
Line 9073  bgp_vty_init (void) Line 9820  bgp_vty_init (void)
   install_default (BGP_IPV6_NODE);    install_default (BGP_IPV6_NODE);
   install_default (BGP_IPV6M_NODE);    install_default (BGP_IPV6M_NODE);
   install_default (BGP_VPNV4_NODE);    install_default (BGP_VPNV4_NODE);
     install_default (BGP_VPNV6_NODE);
     install_default (BGP_ENCAP_NODE);
     install_default (BGP_ENCAPV6_NODE);
       
   /* "bgp multiple-instance" commands. */    /* "bgp multiple-instance" commands. */
   install_element (CONFIG_NODE, &bgp_multiple_instance_cmd);    install_element (CONFIG_NODE, &bgp_multiple_instance_cmd);
Line 9172  bgp_vty_init (void) Line 9922  bgp_vty_init (void)
   install_element (BGP_NODE, &bgp_bestpath_aspath_confed_cmd);    install_element (BGP_NODE, &bgp_bestpath_aspath_confed_cmd);
   install_element (BGP_NODE, &no_bgp_bestpath_aspath_confed_cmd);    install_element (BGP_NODE, &no_bgp_bestpath_aspath_confed_cmd);
   
     /* "bgp bestpath as-path multipath-relax" commands */
     install_element (BGP_NODE, &bgp_bestpath_aspath_multipath_relax_cmd);
     install_element (BGP_NODE, &no_bgp_bestpath_aspath_multipath_relax_cmd);
   
   /* "bgp log-neighbor-changes" commands */    /* "bgp log-neighbor-changes" commands */
   install_element (BGP_NODE, &bgp_log_neighbor_changes_cmd);    install_element (BGP_NODE, &bgp_log_neighbor_changes_cmd);
   install_element (BGP_NODE, &no_bgp_log_neighbor_changes_cmd);    install_element (BGP_NODE, &no_bgp_log_neighbor_changes_cmd);
Line 9227  bgp_vty_init (void) Line 9981  bgp_vty_init (void)
   install_element (BGP_IPV6_NODE, &neighbor_activate_cmd);    install_element (BGP_IPV6_NODE, &neighbor_activate_cmd);
   install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd);    install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_activate_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_activate_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_activate_cmd);
   
   /* "no neighbor activate" commands. */    /* "no neighbor activate" commands. */
   install_element (BGP_NODE, &no_neighbor_activate_cmd);    install_element (BGP_NODE, &no_neighbor_activate_cmd);
Line 9235  bgp_vty_init (void) Line 9992  bgp_vty_init (void)
   install_element (BGP_IPV6_NODE, &no_neighbor_activate_cmd);    install_element (BGP_IPV6_NODE, &no_neighbor_activate_cmd);
   install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_activate_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_activate_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_activate_cmd);
   
   /* "neighbor peer-group set" commands. */    /* "neighbor peer-group set" commands. */
   install_element (BGP_NODE, &neighbor_set_peer_group_cmd);    install_element (BGP_NODE, &neighbor_set_peer_group_cmd);
Line 9243  bgp_vty_init (void) Line 10003  bgp_vty_init (void)
   install_element (BGP_IPV6_NODE, &neighbor_set_peer_group_cmd);    install_element (BGP_IPV6_NODE, &neighbor_set_peer_group_cmd);
   install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd);    install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_set_peer_group_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_set_peer_group_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_set_peer_group_cmd);
       
   /* "no neighbor peer-group unset" commands. */    /* "no neighbor peer-group unset" commands. */
   install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd);    install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd);
Line 9251  bgp_vty_init (void) Line 10014  bgp_vty_init (void)
   install_element (BGP_IPV6_NODE, &no_neighbor_set_peer_group_cmd);    install_element (BGP_IPV6_NODE, &no_neighbor_set_peer_group_cmd);
   install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_set_peer_group_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_set_peer_group_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_set_peer_group_cmd);
       
   /* "neighbor softreconfiguration inbound" commands.*/    /* "neighbor softreconfiguration inbound" commands.*/
   install_element (BGP_NODE, &neighbor_soft_reconfiguration_cmd);    install_element (BGP_NODE, &neighbor_soft_reconfiguration_cmd);
Line 9265  bgp_vty_init (void) Line 10031  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_soft_reconfiguration_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_soft_reconfiguration_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_soft_reconfiguration_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_soft_reconfiguration_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_soft_reconfiguration_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_soft_reconfiguration_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_soft_reconfiguration_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_soft_reconfiguration_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_soft_reconfiguration_cmd);
   
   /* "neighbor attribute-unchanged" commands.  */    /* "neighbor attribute-unchanged" commands.  */
   install_element (BGP_NODE, &neighbor_attr_unchanged_cmd);    install_element (BGP_NODE, &neighbor_attr_unchanged_cmd);
Line 9400  bgp_vty_init (void) Line 10172  bgp_vty_init (void)
   install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged9_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged9_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged10_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged10_cmd);
   
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged1_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged2_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged3_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged4_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged5_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged6_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged7_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged8_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged9_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged10_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged1_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged2_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged3_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged4_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged5_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged6_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged7_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged8_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged9_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged10_cmd);
   
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged1_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged2_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged3_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged4_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged5_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged6_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged7_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged8_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged9_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged10_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged1_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged2_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged3_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged4_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged5_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged6_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged7_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged8_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged9_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged10_cmd);
   
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged1_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged2_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged3_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged4_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged5_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged6_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged7_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged8_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged9_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged10_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged1_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged2_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged3_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged4_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged5_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged6_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged7_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged8_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged9_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged10_cmd);
   
   /* "nexthop-local unchanged" commands */    /* "nexthop-local unchanged" commands */
   install_element (BGP_IPV6_NODE, &neighbor_nexthop_local_unchanged_cmd);    install_element (BGP_IPV6_NODE, &neighbor_nexthop_local_unchanged_cmd);
   install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_local_unchanged_cmd);    install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_local_unchanged_cmd);
Line 9422  bgp_vty_init (void) Line 10263  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_nexthop_self_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_nexthop_self_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_nexthop_self_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_nexthop_self_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_nexthop_self_cmd);
   
   /* "neighbor remove-private-AS" commands. */    /* "neighbor remove-private-AS" commands. */
   install_element (BGP_NODE, &neighbor_remove_private_as_cmd);    install_element (BGP_NODE, &neighbor_remove_private_as_cmd);
Line 9436  bgp_vty_init (void) Line 10283  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_remove_private_as_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_remove_private_as_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_remove_private_as_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_remove_private_as_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_remove_private_as_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_remove_private_as_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_remove_private_as_cmd);
   
   /* "neighbor send-community" commands.*/    /* "neighbor send-community" commands.*/
   install_element (BGP_NODE, &neighbor_send_community_cmd);    install_element (BGP_NODE, &neighbor_send_community_cmd);
Line 9462  bgp_vty_init (void) Line 10315  bgp_vty_init (void)
   install_element (BGP_VPNV4_NODE, &neighbor_send_community_type_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_send_community_type_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_type_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_type_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_send_community_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_send_community_type_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_type_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_send_community_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_send_community_type_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_type_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_type_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_type_cmd);
   
   /* "neighbor route-reflector" commands.*/    /* "neighbor route-reflector" commands.*/
   install_element (BGP_NODE, &neighbor_route_reflector_client_cmd);    install_element (BGP_NODE, &neighbor_route_reflector_client_cmd);
Line 9476  bgp_vty_init (void) Line 10341  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_route_reflector_client_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_route_reflector_client_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_route_reflector_client_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_route_reflector_client_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_route_reflector_client_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_route_reflector_client_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_route_reflector_client_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_route_reflector_client_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_reflector_client_cmd);
   
   /* "neighbor route-server" commands.*/    /* "neighbor route-server" commands.*/
   install_element (BGP_NODE, &neighbor_route_server_client_cmd);    install_element (BGP_NODE, &neighbor_route_server_client_cmd);
Line 9490  bgp_vty_init (void) Line 10361  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_route_server_client_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_route_server_client_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_route_server_client_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_route_server_client_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_route_server_client_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_route_server_client_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_route_server_client_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_route_server_client_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_server_client_cmd);
   
   /* "neighbor passive" commands. */    /* "neighbor passive" commands. */
   install_element (BGP_NODE, &neighbor_passive_cmd);    install_element (BGP_NODE, &neighbor_passive_cmd);
Line 9618  bgp_vty_init (void) Line 10495  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_distribute_list_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_distribute_list_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_distribute_list_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_distribute_list_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_distribute_list_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_distribute_list_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_distribute_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_distribute_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_distribute_list_cmd);
   
   /* "neighbor prefix-list" commands. */    /* "neighbor prefix-list" commands. */
   install_element (BGP_NODE, &neighbor_prefix_list_cmd);    install_element (BGP_NODE, &neighbor_prefix_list_cmd);
Line 9632  bgp_vty_init (void) Line 10515  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_prefix_list_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_prefix_list_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_prefix_list_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_prefix_list_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_prefix_list_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_prefix_list_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_prefix_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_prefix_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_prefix_list_cmd);
   
   /* "neighbor filter-list" commands. */    /* "neighbor filter-list" commands. */
   install_element (BGP_NODE, &neighbor_filter_list_cmd);    install_element (BGP_NODE, &neighbor_filter_list_cmd);
Line 9646  bgp_vty_init (void) Line 10535  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_filter_list_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_filter_list_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_filter_list_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_filter_list_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_filter_list_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_filter_list_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_filter_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_filter_list_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_filter_list_cmd);
   
   /* "neighbor route-map" commands. */    /* "neighbor route-map" commands. */
   install_element (BGP_NODE, &neighbor_route_map_cmd);    install_element (BGP_NODE, &neighbor_route_map_cmd);
Line 9660  bgp_vty_init (void) Line 10555  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &no_neighbor_route_map_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_route_map_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_route_map_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_route_map_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_route_map_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_route_map_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_route_map_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_route_map_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_map_cmd);
   
   /* "neighbor unsuppress-map" commands. */    /* "neighbor unsuppress-map" commands. */
   install_element (BGP_NODE, &neighbor_unsuppress_map_cmd);    install_element (BGP_NODE, &neighbor_unsuppress_map_cmd);
Line 9673  bgp_vty_init (void) Line 10574  bgp_vty_init (void)
   install_element (BGP_IPV6M_NODE, &neighbor_unsuppress_map_cmd);    install_element (BGP_IPV6M_NODE, &neighbor_unsuppress_map_cmd);
   install_element (BGP_IPV6M_NODE, &no_neighbor_unsuppress_map_cmd);    install_element (BGP_IPV6M_NODE, &no_neighbor_unsuppress_map_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_unsuppress_map_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_unsuppress_map_cmd);
  install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd);
   install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd);
   install_element (BGP_VPNV6_NODE, &no_neighbor_unsuppress_map_cmd);
   install_element (BGP_ENCAP_NODE, &neighbor_unsuppress_map_cmd);
   install_element (BGP_ENCAP_NODE, &no_neighbor_unsuppress_map_cmd);
   install_element (BGP_ENCAPV6_NODE, &neighbor_unsuppress_map_cmd);
   install_element (BGP_ENCAPV6_NODE, &no_neighbor_unsuppress_map_cmd);
   
   /* "neighbor maximum-prefix" commands. */    /* "neighbor maximum-prefix" commands. */
   install_element (BGP_NODE, &neighbor_maximum_prefix_cmd);    install_element (BGP_NODE, &neighbor_maximum_prefix_cmd);
Line 9755  bgp_vty_init (void) Line 10662  bgp_vty_init (void)
   install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_restart_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_restart_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd);
   
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_val_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd);
   
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_val_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd);
   
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_val_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_warning_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_restart_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd);
   
   /* "neighbor allowas-in" */    /* "neighbor allowas-in" */
   install_element (BGP_NODE, &neighbor_allowas_in_cmd);    install_element (BGP_NODE, &neighbor_allowas_in_cmd);
   install_element (BGP_NODE, &neighbor_allowas_in_arg_cmd);    install_element (BGP_NODE, &neighbor_allowas_in_arg_cmd);
Line 9774  bgp_vty_init (void) Line 10723  bgp_vty_init (void)
   install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_cmd);
   install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_arg_cmd);    install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_arg_cmd);
   install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd);    install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd);
     install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_arg_cmd);
     install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_cmd);
     install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_arg_cmd);
     install_element (BGP_ENCAP_NODE, &no_neighbor_allowas_in_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_cmd);
     install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_arg_cmd);
     install_element (BGP_ENCAPV6_NODE, &no_neighbor_allowas_in_cmd);
   
   /* address-family commands. */    /* address-family commands. */
   install_element (BGP_NODE, &address_family_ipv4_cmd);    install_element (BGP_NODE, &address_family_ipv4_cmd);
   install_element (BGP_NODE, &address_family_ipv4_safi_cmd);    install_element (BGP_NODE, &address_family_ipv4_safi_cmd);
 #ifdef HAVE_IPV6  
   install_element (BGP_NODE, &address_family_ipv6_cmd);    install_element (BGP_NODE, &address_family_ipv6_cmd);
   install_element (BGP_NODE, &address_family_ipv6_safi_cmd);    install_element (BGP_NODE, &address_family_ipv6_safi_cmd);
 #endif /* HAVE_IPV6 */  
   install_element (BGP_NODE, &address_family_vpnv4_cmd);    install_element (BGP_NODE, &address_family_vpnv4_cmd);
   install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd);    install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd);
   
     install_element (BGP_NODE, &address_family_vpnv6_cmd);
     install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd);
   
     install_element (BGP_NODE, &address_family_encap_cmd);
     install_element (BGP_NODE, &address_family_encapv4_cmd);
     install_element (BGP_NODE, &address_family_encapv6_cmd);
   
   /* "exit-address-family" command. */    /* "exit-address-family" command. */
   install_element (BGP_IPV4_NODE, &exit_address_family_cmd);    install_element (BGP_IPV4_NODE, &exit_address_family_cmd);
   install_element (BGP_IPV4M_NODE, &exit_address_family_cmd);    install_element (BGP_IPV4M_NODE, &exit_address_family_cmd);
   install_element (BGP_IPV6_NODE, &exit_address_family_cmd);    install_element (BGP_IPV6_NODE, &exit_address_family_cmd);
   install_element (BGP_IPV6M_NODE, &exit_address_family_cmd);    install_element (BGP_IPV6M_NODE, &exit_address_family_cmd);
   install_element (BGP_VPNV4_NODE, &exit_address_family_cmd);    install_element (BGP_VPNV4_NODE, &exit_address_family_cmd);
     install_element (BGP_VPNV6_NODE, &exit_address_family_cmd);
     install_element (BGP_ENCAP_NODE, &exit_address_family_cmd);
     install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd);
   
   /* "clear ip bgp commands" */    /* "clear ip bgp commands" */
   install_element (ENABLE_NODE, &clear_ip_bgp_all_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_cmd);
Line 9799  bgp_vty_init (void) Line 10765  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_external_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_external_cmd);
 #ifdef HAVE_IPV6  
   install_element (ENABLE_NODE, &clear_bgp_all_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_cmd);
   install_element (ENABLE_NODE, &clear_bgp_instance_all_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_all_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_all_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_all_cmd);
Line 9811  bgp_vty_init (void) Line 10776  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_bgp_ipv6_external_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_external_cmd);
   install_element (ENABLE_NODE, &clear_bgp_as_cmd);    install_element (ENABLE_NODE, &clear_bgp_as_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "clear ip bgp neighbor soft in" */    /* "clear ip bgp neighbor soft in" */
   install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_in_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_in_cmd);
Line 9854  bgp_vty_init (void) Line 10818  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_in_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_in_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_in_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_in_cmd);
#ifdef HAVE_IPV6  install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_in_cmd);
   install_element (ENABLE_NODE, &clear_bgp_all_soft_in_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_in_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_bgp_all_in_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_in_cmd);
Line 9886  bgp_vty_init (void) Line 10855  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_in_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_in_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_prefix_filter_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_prefix_filter_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "clear ip bgp neighbor soft out" */    /* "clear ip bgp neighbor soft out" */
   install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_out_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_out_cmd);
Line 9917  bgp_vty_init (void) Line 10885  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_out_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_out_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_out_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_out_cmd);
#ifdef HAVE_IPV6  install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_out_cmd);
   install_element (ENABLE_NODE, &clear_bgp_all_soft_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_bgp_all_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_out_cmd);
Line 9939  bgp_vty_init (void) Line 10912  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_bgp_ipv6_external_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_external_out_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_out_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_out_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_out_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "clear ip bgp neighbor soft" */    /* "clear ip bgp neighbor soft" */
   install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_cmd);
Line 9957  bgp_vty_init (void) Line 10929  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_soft_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_soft_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_soft_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_soft_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_cmd);
#ifdef HAVE_IPV6  install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_cmd);
   install_element (ENABLE_NODE, &clear_bgp_all_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_soft_cmd);
   install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_cmd);
   install_element (ENABLE_NODE, &clear_bgp_peer_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_peer_soft_cmd);
Line 9969  bgp_vty_init (void) Line 10943  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "clear ip bgp neighbor rsclient" */    /* "clear ip bgp neighbor rsclient" */
   install_element (ENABLE_NODE, &clear_ip_bgp_all_rsclient_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_all_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_rsclient_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_peer_rsclient_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_peer_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_rsclient_cmd);    install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_rsclient_cmd);
 #ifdef HAVE_IPV6  
   install_element (ENABLE_NODE, &clear_bgp_all_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_all_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_bgp_instance_all_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_all_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_all_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_all_rsclient_cmd);
Line 9985  bgp_vty_init (void) Line 10957  bgp_vty_init (void)
   install_element (ENABLE_NODE, &clear_bgp_instance_peer_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_instance_peer_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_rsclient_cmd);
   install_element (ENABLE_NODE, &clear_bgp_ipv6_instance_peer_rsclient_cmd);    install_element (ENABLE_NODE, &clear_bgp_ipv6_instance_peer_rsclient_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "show ip bgp summary" commands. */    /* "show ip bgp summary" commands. */
  install_element (VIEW_NODE, &show_ip_bgp_summary_cmd);  install_element (VIEW_NODE, &show_bgp_summary_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_instance_summary_cmd);  install_element (RESTRICTED_NODE, &show_bgp_summary_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_ipv4_summary_cmd);  install_element (ENABLE_NODE, &show_bgp_summary_cmd);
 
   install_element (VIEW_NODE, &show_bgp_summary_1w_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_summary_1w_cmd);
   install_element (ENABLE_NODE, &show_bgp_summary_1w_cmd);
 
   install_element (VIEW_NODE, &show_bgp_ipv4_safi_summary_cmd);    install_element (VIEW_NODE, &show_bgp_ipv4_safi_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);  install_element (VIEW_NODE, &show_bgp_instance_ipv4_summary_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
#ifdef HAVE_IPV6  install_element (VIEW_NODE, &show_bgp_ipv4_vpn_summary_cmd);
  install_element (VIEW_NODE, &show_bgp_summary_cmd);  install_element (VIEW_NODE, &show_bgp_ipv4_encap_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_vpn_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_encap_summary_cmd);
 
   install_element (VIEW_NODE, &show_bgp_instance_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_summary_cmd);  
   install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd);    install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);
 #endif /* HAVE_IPV6 */  
   install_element (RESTRICTED_NODE, &show_ip_bgp_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_summary_cmd);
  install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);  install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);
  install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
  install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);  install_element (RESTRICTED_NODE, &show_bgp_ipv4_vpn_summary_cmd);
#ifdef HAVE_IPV6  install_element (RESTRICTED_NODE, &show_bgp_ipv4_encap_summary_cmd);
  install_element (RESTRICTED_NODE, &show_bgp_summary_cmd);  install_element (RESTRICTED_NODE, &show_bgp_ipv6_vpn_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_encap_summary_cmd);
 
   install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);
 #endif /* HAVE_IPV6 */  
   install_element (ENABLE_NODE, &show_ip_bgp_summary_cmd);  
   install_element (ENABLE_NODE, &show_ip_bgp_instance_summary_cmd);  
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_summary_cmd);  
   install_element (ENABLE_NODE, &show_bgp_ipv4_safi_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_ipv4_safi_summary_cmd);
  install_element (ENABLE_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);  install_element (ENABLE_NODE, &show_bgp_instance_ipv4_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);  install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_summary_cmd);
#ifdef HAVE_IPV6  install_element (ENABLE_NODE, &show_bgp_ipv4_encap_summary_cmd);
  install_element (ENABLE_NODE, &show_bgp_summary_cmd);  install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_encap_summary_cmd);
 
   install_element (ENABLE_NODE, &show_bgp_instance_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_summary_cmd);  
   install_element (ENABLE_NODE, &show_bgp_ipv6_safi_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_ipv6_safi_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv6_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "show ip bgp neighbors" commands. */    /* "show ip bgp neighbors" commands. */
  install_element (VIEW_NODE, &show_ip_bgp_neighbors_cmd);  install_element (VIEW_NODE, &show_bgp_instance_neighbors_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_cmd);  install_element (ENABLE_NODE, &show_bgp_instance_neighbors_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_neighbors_peer_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_cmd); 
  install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); 
  install_element (RESTRICTED_NODE, &show_ip_bgp_neighbors_peer_cmd); 
  install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); 
  install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); 
  install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); 
  install_element (RESTRICTED_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_neighbors_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_neighbors_peer_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); 
   
 #ifdef HAVE_IPV6  
   install_element (VIEW_NODE, &show_bgp_neighbors_cmd);    install_element (VIEW_NODE, &show_bgp_neighbors_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd);  
   install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd);    install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_peer_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_neighbors_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_neighbors_peer_cmd);    install_element (VIEW_NODE, &show_bgp_instance_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_neighbors_peer_cmd);    install_element (RESTRICTED_NODE, &show_bgp_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_neighbors_peer_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_instance_neighbors_peer_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);  
   install_element (ENABLE_NODE, &show_bgp_neighbors_cmd);    install_element (ENABLE_NODE, &show_bgp_neighbors_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_cmd);  
   install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd);    install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_peer_cmd);  
   install_element (ENABLE_NODE, &show_bgp_instance_neighbors_cmd);  
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_cmd);  
   install_element (ENABLE_NODE, &show_bgp_instance_neighbors_peer_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_neighbors_peer_cmd);
     install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd);
     install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
     install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
     install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
   
   /* Old commands.  */  
   install_element (VIEW_NODE, &show_ipv6_bgp_summary_cmd);  
   install_element (VIEW_NODE, &show_ipv6_mbgp_summary_cmd);  
   install_element (ENABLE_NODE, &show_ipv6_bgp_summary_cmd);  
   install_element (ENABLE_NODE, &show_ipv6_mbgp_summary_cmd);  
 #endif /* HAVE_IPV6 */  
   
   /* "show ip bgp rsclient" commands. */    /* "show ip bgp rsclient" commands. */
   install_element (VIEW_NODE, &show_ip_bgp_rsclient_summary_cmd);  
   install_element (VIEW_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);  
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);  
   install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd);
   
 #ifdef HAVE_IPV6  
   install_element (VIEW_NODE, &show_bgp_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_rsclient_summary_cmd);  
   install_element (VIEW_NODE, &show_bgp_instance_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_rsclient_summary_cmd);
     install_element (RESTRICTED_NODE, &show_bgp_rsclient_summary_cmd);
     install_element (RESTRICTED_NODE, &show_bgp_instance_rsclient_summary_cmd);
     install_element (ENABLE_NODE, &show_bgp_rsclient_summary_cmd);
     install_element (ENABLE_NODE, &show_bgp_instance_rsclient_summary_cmd);
     install_element (VIEW_NODE, &show_bgp_ipv6_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);    install_element (VIEW_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_ipv6_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_rsclient_summary_cmd);  
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);    install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_bgp_ipv6_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_ipv6_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_rsclient_summary_cmd);  
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);    install_element (ENABLE_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* "show ip bgp paths" commands. */    /* "show ip bgp paths" commands. */
  install_element (VIEW_NODE, &show_ip_bgp_paths_cmd);  install_element (VIEW_NODE, &show_bgp_ipv4_paths_cmd);
  install_element (VIEW_NODE, &show_ip_bgp_ipv4_paths_cmd);  install_element (ENABLE_NODE, &show_bgp_ipv4_paths_cmd);
  install_element (ENABLE_NODE, &show_ip_bgp_paths_cmd); 
  install_element (ENABLE_NODE, &show_ip_bgp_ipv4_paths_cmd); 
   
   /* "show ip bgp community" commands. */    /* "show ip bgp community" commands. */
   install_element (VIEW_NODE, &show_ip_bgp_community_info_cmd);    install_element (VIEW_NODE, &show_ip_bgp_community_info_cmd);
Line 10159  bgp_vty_init (void) Line 11075  bgp_vty_init (void)
   install_element (BGP_NODE, &bgp_redistribute_ipv4_metric_rmap_cmd);    install_element (BGP_NODE, &bgp_redistribute_ipv4_metric_rmap_cmd);
   install_element (BGP_NODE, &no_bgp_redistribute_ipv4_rmap_metric_cmd);    install_element (BGP_NODE, &no_bgp_redistribute_ipv4_rmap_metric_cmd);
   install_element (BGP_NODE, &no_bgp_redistribute_ipv4_metric_rmap_cmd);    install_element (BGP_NODE, &no_bgp_redistribute_ipv4_metric_rmap_cmd);
 #ifdef HAVE_IPV6  
   install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_cmd);    install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_cmd);
   install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_cmd);    install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_cmd);
   install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_cmd);    install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_cmd);
Line 10170  bgp_vty_init (void) Line 11085  bgp_vty_init (void)
   install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd);    install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd);
   install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_metric_cmd);    install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_metric_cmd);
   install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_rmap_cmd);    install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_rmap_cmd);
 #endif /* HAVE_IPV6 */  
   
   /* ttl_security commands */    /* ttl_security commands */
   install_element (BGP_NODE, &neighbor_ttl_security_cmd);    install_element (BGP_NODE, &neighbor_ttl_security_cmd);
Line 10185  bgp_vty_init (void) Line 11099  bgp_vty_init (void)
   install_element (VIEW_NODE, &show_bgp_views_cmd);    install_element (VIEW_NODE, &show_bgp_views_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_views_cmd);    install_element (RESTRICTED_NODE, &show_bgp_views_cmd);
   install_element (ENABLE_NODE, &show_bgp_views_cmd);    install_element (ENABLE_NODE, &show_bgp_views_cmd);
  
   /* non afi/safi forms of commands */
   install_element (VIEW_NODE, &show_ip_bgp_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_neighbors_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_neighbors_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd);
   install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
   install_element (RESTRICTED_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_cmd);
   install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
   install_element (VIEW_NODE, &show_ipv6_bgp_summary_cmd);
   install_element (VIEW_NODE, &show_ipv6_mbgp_summary_cmd);
   install_element (ENABLE_NODE, &show_ipv6_bgp_summary_cmd);
   install_element (ENABLE_NODE, &show_ipv6_mbgp_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);
   install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_rsclient_summary_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_instance_ipv4_rsclient_summary_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_paths_cmd);
   install_element (VIEW_NODE, &show_ip_bgp_ipv4_paths_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_paths_cmd);
   install_element (ENABLE_NODE, &show_ip_bgp_ipv4_paths_cmd);
   /* Community-list. */    /* Community-list. */
   community_list_vty ();    community_list_vty ();
 }  }
 #include "memory.h"  #include "memory.h"
 #include "bgp_regex.h"  #include "bgp_regex.h"
 #include "bgp_clist.h"  #include "bgp_clist.h"
Line 10588  DEFUN (show_ip_community_list_arg, Line 11574  DEFUN (show_ip_community_list_arg,
   
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 static int  static int
 extcommunity_list_set_vty (struct vty *vty, int argc, const char **argv,   extcommunity_list_set_vty (struct vty *vty, int argc, const char **argv, 
                            int style, int reject_all_digit_name)                             int style, int reject_all_digit_name)
Line 10938  DEFUN (show_ip_extcommunity_list_arg, Line 11924  DEFUN (show_ip_extcommunity_list_arg,
   
   return CMD_SUCCESS;    return CMD_SUCCESS;
 }  }
 /* Return configuration string of community-list entry.  */  /* Return configuration string of community-list entry.  */
 static const char *  static const char *
 community_list_config_str (struct community_entry *entry)  community_list_config_str (struct community_entry *entry)

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>