bgp_vty.c
上传用户:xiaozhuqw
上传日期:2009-11-15
资源大小:1338k
文件大小:293k
- else if (strncmp (direct_str, "o", 1) == 0)
- direct = FILTER_OUT;
- ret = peer_aslist_set (peer, afi, safi, direct, name_str);
- return bgp_vty_return (vty, ret);
- }
- int
- peer_aslist_unset_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
- char *direct_str)
- {
- int ret;
- struct peer *peer;
- int direct = FILTER_IN;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- /* Check filter direction. */
- if (strncmp (direct_str, "i", 1) == 0)
- direct = FILTER_IN;
- else if (strncmp (direct_str, "o", 1) == 0)
- direct = FILTER_OUT;
- ret = peer_aslist_unset (peer, afi, safi, direct);
- return bgp_vty_return (vty, ret);
- }
- DEFUN (neighbor_filter_list,
- neighbor_filter_list_cmd,
- NEIGHBOR_CMD2 "filter-list WORD (in|out)",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Establish BGP filtersn"
- "AS path access-list namen"
- "Filter incoming routesn"
- "Filter outgoing routesn")
- {
- return peer_aslist_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], argv[2]);
- }
- DEFUN (no_neighbor_filter_list,
- no_neighbor_filter_list_cmd,
- NO_NEIGHBOR_CMD2 "filter-list WORD (in|out)",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Establish BGP filtersn"
- "AS path access-list namen"
- "Filter incoming routesn"
- "Filter outgoing routesn")
- {
- return peer_aslist_unset_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[2]);
- }
- /* Set route-map to the peer. */
- int
- peer_route_map_set_vty (struct vty *vty, char *ip_str, afi_t afi, safi_t safi,
- char *name_str, char *direct_str)
- {
- int ret;
- struct peer *peer;
- int direct = FILTER_IN;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- /* Check filter direction. */
- if (strncmp (direct_str, "i", 1) == 0)
- direct = FILTER_IN;
- else if (strncmp (direct_str, "o", 1) == 0)
- direct = FILTER_OUT;
- ret = peer_route_map_set (peer, afi, safi, direct, name_str);
- return bgp_vty_return (vty, ret);
- }
- int
- peer_route_map_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
- safi_t safi, char *direct_str)
- {
- int ret;
- struct peer *peer;
- int direct = FILTER_IN;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- /* Check filter direction. */
- if (strncmp (direct_str, "i", 1) == 0)
- direct = FILTER_IN;
- else if (strncmp (direct_str, "o", 1) == 0)
- direct = FILTER_OUT;
- ret = peer_route_map_unset (peer, afi, safi, direct);
- return bgp_vty_return (vty, ret);
- }
- DEFUN (neighbor_route_map,
- neighbor_route_map_cmd,
- NEIGHBOR_CMD2 "route-map WORD (in|out)",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Apply route map to neighborn"
- "Name of route mapn"
- "Apply map to incoming routesn"
- "Apply map to outbound routesn")
- {
- return peer_route_map_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], argv[2]);
- }
- DEFUN (no_neighbor_route_map,
- no_neighbor_route_map_cmd,
- NO_NEIGHBOR_CMD2 "route-map WORD (in|out)",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Apply route map to neighborn"
- "Name of route mapn"
- "Apply map to incoming routesn"
- "Apply map to outbound routesn")
- {
- return peer_route_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[2]);
- }
- /* Set unsuppress-map to the peer. */
- int
- peer_unsuppress_map_set_vty (struct vty *vty, char *ip_str, afi_t afi,
- safi_t safi, char *name_str)
- {
- int ret;
- struct peer *peer;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- ret = peer_unsuppress_map_set (peer, afi, safi, name_str);
- return bgp_vty_return (vty, ret);
- }
- /* Unset route-map from the peer. */
- int
- peer_unsuppress_map_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
- safi_t safi)
- {
- int ret;
- struct peer *peer;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- ret = peer_unsuppress_map_unset (peer, afi, safi);
- return bgp_vty_return (vty, ret);
- }
- DEFUN (neighbor_unsuppress_map,
- neighbor_unsuppress_map_cmd,
- NEIGHBOR_CMD2 "unsuppress-map WORD",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Route-map to selectively unsuppress suppressed routesn"
- "Name of route mapn")
- {
- return peer_unsuppress_map_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1]);
- }
- DEFUN (no_neighbor_unsuppress_map,
- no_neighbor_unsuppress_map_cmd,
- NO_NEIGHBOR_CMD2 "unsuppress-map WORD",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Route-map to selectively unsuppress suppressed routesn"
- "Name of route mapn")
- {
- return peer_unsuppress_map_unset_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty));
- }
- int
- peer_maximum_prefix_set_vty (struct vty *vty, char *ip_str, afi_t afi,
- safi_t safi, char *num_str, char *threshold_str,
- int warning, char *restart_str)
- {
- int ret;
- struct peer *peer;
- u_int32_t max;
- u_char threshold;
- u_int16_t restart;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- VTY_GET_INTEGER ("maxmum number", max, num_str);
- if (threshold_str)
- threshold = atoi (threshold_str);
- else
- threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT;
- if (restart_str)
- restart = atoi (restart_str);
- else
- restart = 0;
- ret = peer_maximum_prefix_set (peer, afi, safi, max, threshold, warning, restart);
- return bgp_vty_return (vty, ret);
- }
- int
- peer_maximum_prefix_unset_vty (struct vty *vty, char *ip_str, afi_t afi,
- safi_t safi)
- {
- int ret;
- struct peer *peer;
- peer = peer_and_group_lookup_vty (vty, ip_str);
- if (! peer)
- return CMD_WARNING;
- ret = peer_maximum_prefix_unset (peer, afi, safi);
- return bgp_vty_return (vty, ret);
- }
- /* Maximum number of prefix configuration. prefix count is different
- for each peer configuration. So this configuration can be set for
- each peer configuration. */
- DEFUN (neighbor_maximum_prefix,
- neighbor_maximum_prefix_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], NULL, 0 ,NULL);
- }
- DEFUN (neighbor_maximum_prefix_threshold,
- neighbor_maximum_prefix_threshold_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], argv[2], 0, NULL);
- }
- DEFUN (neighbor_maximum_prefix_warning,
- neighbor_maximum_prefix_warning_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Only give warning message when limit is exceededn")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], NULL, 1, NULL);
- }
- DEFUN (neighbor_maximum_prefix_threshold_warning,
- neighbor_maximum_prefix_threshold_warning_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn"
- "Only give warning message when limit is exceededn")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], argv[2], 1, NULL);
- }
- DEFUN (neighbor_maximum_prefix_restart,
- neighbor_maximum_prefix_restart_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Restart bgp connection after limit is exceededn"
- "Restart interval in minutes")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], NULL, 0, argv[2]);
- }
- DEFUN (neighbor_maximum_prefix_threshold_restart,
- neighbor_maximum_prefix_threshold_restart_cmd,
- NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn"
- "Restart bgp connection after limit is exceededn"
- "Restart interval in minutes")
- {
- return peer_maximum_prefix_set_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty), argv[1], argv[2], 0, argv[3]);
- }
- DEFUN (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern")
- {
- return peer_maximum_prefix_unset_vty (vty, argv[0], bgp_node_afi (vty),
- bgp_node_safi (vty));
- }
-
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_val_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn");
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_threshold_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn")
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_warning_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Only give warning message when limit is exceededn");
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_threshold_warning_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn"
- "Only give warning message when limit is exceededn");
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_restart_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Restart bgp connection after limit is exceededn"
- "Restart interval in minutes")
- ALIAS (no_neighbor_maximum_prefix,
- no_neighbor_maximum_prefix_threshold_restart_cmd,
- NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Maximum number of prefix accept from this peern"
- "maximum no. of prefix limitn"
- "Threshold value (%) at which to generate a warning msgn"
- "Restart bgp connection after limit is exceededn"
- "Restart interval in minutes")
- /* "neighbor allowas-in" */
- DEFUN (neighbor_allowas_in,
- neighbor_allowas_in_cmd,
- NEIGHBOR_CMD2 "allowas-in",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Accept as-path with my AS present in itn")
- {
- int ret;
- struct peer *peer;
- int allow_num;
- peer = peer_and_group_lookup_vty (vty, argv[0]);
- if (! peer)
- return CMD_WARNING;
- if (argc == 1)
- allow_num = 3;
- else
- VTY_GET_INTEGER_RANGE ("AS number", allow_num, argv[1], 1, 10);
- ret = peer_allowas_in_set (peer, bgp_node_afi (vty), bgp_node_safi (vty),
- allow_num);
- return bgp_vty_return (vty, ret);
- }
- ALIAS (neighbor_allowas_in,
- neighbor_allowas_in_arg_cmd,
- NEIGHBOR_CMD2 "allowas-in <1-10>",
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "Accept as-path with my AS present in itn"
- "Number of occurances of AS numbern");
- DEFUN (no_neighbor_allowas_in,
- no_neighbor_allowas_in_cmd,
- NO_NEIGHBOR_CMD2 "allowas-in",
- NO_STR
- NEIGHBOR_STR
- NEIGHBOR_ADDR_STR2
- "allow local ASN appears in aspath attributen")
- {
- int ret;
- struct peer *peer;
- peer = peer_and_group_lookup_vty (vty, argv[0]);
- if (! peer)
- return CMD_WARNING;
- ret = peer_allowas_in_unset (peer, bgp_node_afi (vty), bgp_node_safi (vty));
- return bgp_vty_return (vty, ret);
- }
- /* Address family configuration. */
- DEFUN (address_family_ipv4,
- address_family_ipv4_cmd,
- "address-family ipv4",
- "Enter Address Family command moden"
- "Address familyn")
- {
- vty->node = BGP_IPV4_NODE;
- return CMD_SUCCESS;
- }
- DEFUN (address_family_ipv4_safi,
- address_family_ipv4_safi_cmd,
- "address-family ipv4 (unicast|multicast)",
- "Enter Address Family command moden"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- vty->node = BGP_IPV4M_NODE;
- else
- vty->node = BGP_IPV4_NODE;
- return CMD_SUCCESS;
- }
- DEFUN (address_family_ipv6_unicast,
- address_family_ipv6_unicast_cmd,
- "address-family ipv6 unicast",
- "Enter Address Family command moden"
- "Address familyn"
- "unicastn")
- {
- vty->node = BGP_IPV6_NODE;
- return CMD_SUCCESS;
- }
- ALIAS (address_family_ipv6_unicast,
- address_family_ipv6_cmd,
- "address-family ipv6",
- "Enter Address Family command moden"
- "Address familyn");
- DEFUN (address_family_vpnv4,
- address_family_vpnv4_cmd,
- "address-family vpnv4",
- "Enter Address Family command moden"
- "Address familyn")
- {
- vty->node = BGP_VPNV4_NODE;
- return CMD_SUCCESS;
- }
- ALIAS (address_family_vpnv4,
- address_family_vpnv4_unicast_cmd,
- "address-family vpnv4 unicast",
- "Enter Address Family command moden"
- "Address familyn"
- "Address Family Modifiern");
- DEFUN (exit_address_family,
- exit_address_family_cmd,
- "exit-address-family",
- "Exit from Address Family configuration moden")
- {
- if (vty->node == BGP_IPV4_NODE
- || vty->node == BGP_IPV4M_NODE
- || vty->node == BGP_VPNV4_NODE
- || vty->node == BGP_IPV6_NODE)
- vty->node = BGP_NODE;
- return CMD_SUCCESS;
- }
- /* BGP clear sort. */
- enum clear_sort
- {
- clear_all,
- clear_peer,
- clear_group,
- clear_external,
- clear_as
- };
- void
- bgp_clear_vty_error (struct vty *vty, struct peer *peer, afi_t afi,
- safi_t safi, int error)
- {
- switch (error)
- {
- case BGP_ERR_AF_UNCONFIGURED:
- vty_out (vty,
- "%%BGP: Enable %s %s address family for the neighbor %s%s",
- afi == AFI_IP6 ? "IPv6" : safi == SAFI_MPLS_VPN ? "VPNv4" : "IPv4",
- safi == SAFI_MULTICAST ? "Multicast" : "Unicast",
- peer->host, VTY_NEWLINE);
- break;
- case BGP_ERR_SOFT_RECONFIG_UNCONFIGURED:
- vty_out (vty, "%%BGP: Inbound soft reconfig for %s not possible as it%s has neither refresh capability, nor inbound soft reconfig%s", peer->host, VTY_NEWLINE, VTY_NEWLINE);
- break;
- default:
- break;
- }
- }
- /* `clear ip bgp' functions. */
- int
- bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
- enum clear_sort sort,enum bgp_clear_type stype, char *arg)
- {
- int ret;
- struct peer *peer;
- struct listnode *nn;
- /* Clear all neighbors. */
- if (sort == clear_all)
- {
- LIST_LOOP (bgp->peer, peer, nn)
- {
- if (stype == BGP_CLEAR_SOFT_NONE)
- ret = peer_clear (peer);
- else
- ret = peer_clear_soft (peer, afi, safi, stype);
- if (ret < 0)
- bgp_clear_vty_error (vty, peer, afi, safi, ret);
- }
- return 0;
- }
- /* Clear specified neighbors. */
- if (sort == clear_peer)
- {
- union sockunion su;
- int ret;
- /* Make sockunion for lookup. */
- ret = str2sockunion (arg, &su);
- if (ret < 0)
- {
- vty_out (vty, "Malformed address: %s%s", arg, VTY_NEWLINE);
- return -1;
- }
- peer = peer_lookup (bgp, &su);
- if (! peer)
- {
- vty_out (vty, "%%BGP: Unknown neighbor - "%s"%s", arg, VTY_NEWLINE);
- return -1;
- }
- if (stype == BGP_CLEAR_SOFT_NONE)
- ret = peer_clear (peer);
- else
- ret = peer_clear_soft (peer, afi, safi, stype);
- if (ret < 0)
- bgp_clear_vty_error (vty, peer, afi, safi, ret);
- return 0;
- }
- /* Clear all peer-group members. */
- if (sort == clear_group)
- {
- struct peer_group *group;
- group = peer_group_lookup (bgp, arg);
- if (! group)
- {
- vty_out (vty, "%%BGP: No such peer-group %s%s", arg, VTY_NEWLINE);
- return -1;
- }
- LIST_LOOP (group->peer, peer, nn)
- {
- if (stype == BGP_CLEAR_SOFT_NONE)
- {
- ret = peer_clear (peer);
- continue;
- }
- ret = peer_clear_soft (peer, afi, safi, stype);
- if (ret < 0)
- bgp_clear_vty_error (vty, peer, afi, safi, ret);
- }
- return 0;
- }
- if (sort == clear_external)
- {
- LIST_LOOP (bgp->peer, peer, nn)
- {
- if (peer_sort (peer) == BGP_PEER_IBGP)
- continue;
- if (stype == BGP_CLEAR_SOFT_NONE)
- ret = peer_clear (peer);
- else
- ret = peer_clear_soft (peer, afi, safi, stype);
- if (ret < 0)
- bgp_clear_vty_error (vty, peer, afi, safi, ret);
- }
- return 0;
- }
- if (sort == clear_as)
- {
- as_t as;
- unsigned long as_ul;
- char *endptr = NULL;
- int find = 0;
- as_ul = strtoul(arg, &endptr, 10);
- if ((as_ul == ULONG_MAX) || (*endptr != ' ') || (as_ul > USHRT_MAX))
- {
- vty_out (vty, "Invalid AS number%s", VTY_NEWLINE);
- return -1;
- }
- as = (as_t) as_ul;
- LIST_LOOP (bgp->peer, peer, nn)
- {
- if (peer->as != as)
- continue;
- find = 1;
- if (stype == BGP_CLEAR_SOFT_NONE)
- ret = peer_clear (peer);
- else
- ret = peer_clear_soft (peer, afi, safi, stype);
- if (ret < 0)
- bgp_clear_vty_error (vty, peer, afi, safi, ret);
- }
- if (! find)
- vty_out (vty, "%%BGP: No peer is configured with AS %s%s", arg,
- VTY_NEWLINE);
- return 0;
- }
- return 0;
- }
- int
- bgp_clear_vty (struct vty *vty, char *name, afi_t afi, safi_t safi,
- enum clear_sort sort, enum bgp_clear_type stype, char *arg)
- {
- int ret;
- struct bgp *bgp;
- /* BGP structure lookup. */
- if (name)
- {
- bgp = bgp_lookup_by_name (name);
- if (bgp == NULL)
- {
- vty_out (vty, "Can't find BGP view %s%s", name, VTY_NEWLINE);
- return CMD_WARNING;
- }
- }
- else
- {
- bgp = bgp_get_default ();
- if (bgp == NULL)
- {
- vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
- }
- ret = bgp_clear (vty, bgp, afi, safi, sort, stype, arg);
- if (ret < 0)
- return CMD_WARNING;
- return CMD_SUCCESS;
- }
-
- DEFUN (clear_ip_bgp_all,
- clear_ip_bgp_all_cmd,
- "clear ip bgp *",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL);
- return bgp_clear_vty (vty, NULL, 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL);
- }
- ALIAS (clear_ip_bgp_all,
- clear_bgp_all_cmd,
- "clear bgp *",
- CLEAR_STR
- BGP_STR
- "Clear all peersn");
- ALIAS (clear_ip_bgp_all,
- clear_bgp_ipv6_all_cmd,
- "clear bgp ipv6 *",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn");
- ALIAS (clear_ip_bgp_all,
- clear_ip_bgp_instance_all_cmd,
- "clear ip bgp view WORD *",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn");
- ALIAS (clear_ip_bgp_all,
- clear_bgp_instance_all_cmd,
- "clear bgp view WORD *",
- CLEAR_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn");
- DEFUN (clear_ip_bgp_peer,
- clear_ip_bgp_peer_cmd,
- "clear ip bgp (A.B.C.D|X:X::X:X)",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor IP address to clearn"
- "BGP IPv6 neighbor to clearn")
- {
- return bgp_clear_vty (vty, NULL, 0, 0, clear_peer, BGP_CLEAR_SOFT_NONE, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer,
- clear_bgp_peer_cmd,
- "clear bgp (A.B.C.D|X:X::X:X)",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn");
- ALIAS (clear_ip_bgp_peer,
- clear_bgp_ipv6_peer_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X)",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn");
- DEFUN (clear_ip_bgp_peer_group,
- clear_ip_bgp_peer_group_cmd,
- "clear ip bgp peer-group WORD",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen")
- {
- return bgp_clear_vty (vty, NULL, 0, 0, clear_group, BGP_CLEAR_SOFT_NONE, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_group,
- clear_bgp_peer_group_cmd,
- "clear bgp peer-group WORD",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen");
- ALIAS (clear_ip_bgp_peer_group,
- clear_bgp_ipv6_peer_group_cmd,
- "clear bgp ipv6 peer-group WORD",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen");
- DEFUN (clear_ip_bgp_external,
- clear_ip_bgp_external_cmd,
- "clear ip bgp external",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn")
- {
- return bgp_clear_vty (vty, NULL, 0, 0, clear_external, BGP_CLEAR_SOFT_NONE, NULL);
- }
- ALIAS (clear_ip_bgp_external,
- clear_bgp_external_cmd,
- "clear bgp external",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn");
- ALIAS (clear_ip_bgp_external,
- clear_bgp_ipv6_external_cmd,
- "clear bgp ipv6 external",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn");
- DEFUN (clear_ip_bgp_as,
- clear_ip_bgp_as_cmd,
- "clear ip bgp <1-65535>",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern")
- {
- return bgp_clear_vty (vty, NULL, 0, 0, clear_as, BGP_CLEAR_SOFT_NONE, argv[0]);
- }
- ALIAS (clear_ip_bgp_as,
- clear_bgp_as_cmd,
- "clear bgp <1-65535>",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern");
- ALIAS (clear_ip_bgp_as,
- clear_bgp_ipv6_as_cmd,
- "clear bgp ipv6 <1-65535>",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern");
- /* Outbound soft-reconfiguration */
- DEFUN (clear_ip_bgp_all_soft_out,
- clear_ip_bgp_all_soft_out_cmd,
- "clear ip bgp * soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_ip_bgp_all_soft_out,
- clear_ip_bgp_all_out_cmd,
- "clear ip bgp * out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig outbound updaten");
- ALIAS (clear_ip_bgp_all_soft_out,
- clear_ip_bgp_instance_all_soft_out_cmd,
- "clear ip bgp view WORD * soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_all_ipv4_soft_out,
- clear_ip_bgp_all_ipv4_soft_out_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_ip_bgp_all_ipv4_soft_out,
- clear_ip_bgp_all_ipv4_out_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out,
- clear_ip_bgp_instance_all_ipv4_soft_out_cmd,
- "clear ip bgp view WORD * ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- DEFUN (clear_ip_bgp_all_vpnv4_soft_out,
- clear_ip_bgp_all_vpnv4_soft_out_cmd,
- "clear ip bgp * vpnv4 unicast soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_ip_bgp_all_vpnv4_soft_out,
- clear_ip_bgp_all_vpnv4_out_cmd,
- "clear ip bgp * vpnv4 unicast out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_bgp_all_soft_out,
- clear_bgp_all_soft_out_cmd,
- "clear bgp * soft out",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_bgp_all_soft_out,
- clear_bgp_instance_all_soft_out_cmd,
- "clear bgp view WORD * soft out",
- CLEAR_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_all_soft_out,
- clear_bgp_all_out_cmd,
- "clear bgp * out",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_all_soft_out,
- clear_bgp_ipv6_all_soft_out_cmd,
- "clear bgp ipv6 * soft out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_all_soft_out,
- clear_bgp_ipv6_all_out_cmd,
- "clear bgp ipv6 * out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_peer_soft_out,
- clear_ip_bgp_peer_soft_out_cmd,
- "clear ip bgp A.B.C.D soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_soft_out,
- clear_ip_bgp_peer_out_cmd,
- "clear ip bgp A.B.C.D out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_peer_ipv4_soft_out,
- clear_ip_bgp_peer_ipv4_soft_out_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_ipv4_soft_out,
- clear_ip_bgp_peer_ipv4_out_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_peer_vpnv4_soft_out,
- clear_ip_bgp_peer_vpnv4_soft_out_cmd,
- "clear ip bgp A.B.C.D vpnv4 unicast soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_vpnv4_soft_out,
- clear_ip_bgp_peer_vpnv4_out_cmd,
- "clear ip bgp A.B.C.D vpnv4 unicast out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_bgp_peer_soft_out,
- clear_bgp_peer_soft_out_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) soft out",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_bgp_peer_soft_out,
- clear_bgp_ipv6_peer_soft_out_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) soft out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_peer_soft_out,
- clear_bgp_peer_out_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) out",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_peer_soft_out,
- clear_bgp_ipv6_peer_out_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_peer_group_soft_out,
- clear_ip_bgp_peer_group_soft_out_cmd,
- "clear ip bgp peer-group WORD soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_group_soft_out,
- clear_ip_bgp_peer_group_out_cmd,
- "clear ip bgp peer-group WORD out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out,
- clear_ip_bgp_peer_group_ipv4_soft_out_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_group_ipv4_soft_out,
- clear_ip_bgp_peer_group_ipv4_out_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_bgp_peer_group_soft_out,
- clear_bgp_peer_group_soft_out_cmd,
- "clear bgp peer-group WORD soft out",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_bgp_peer_group_soft_out,
- clear_bgp_ipv6_peer_group_soft_out_cmd,
- "clear bgp ipv6 peer-group WORD soft out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_peer_group_soft_out,
- clear_bgp_peer_group_out_cmd,
- "clear bgp peer-group WORD out",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_peer_group_soft_out,
- clear_bgp_ipv6_peer_group_out_cmd,
- "clear bgp ipv6 peer-group WORD out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_external_soft_out,
- clear_ip_bgp_external_soft_out_cmd,
- "clear ip bgp external soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_ip_bgp_external_soft_out,
- clear_ip_bgp_external_out_cmd,
- "clear ip bgp external out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_external_ipv4_soft_out,
- clear_ip_bgp_external_ipv4_soft_out_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
- BGP_CLEAR_SOFT_OUT, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_ip_bgp_external_ipv4_soft_out,
- clear_ip_bgp_external_ipv4_out_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_bgp_external_soft_out,
- clear_bgp_external_soft_out_cmd,
- "clear bgp external soft out",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_OUT, NULL);
- }
- ALIAS (clear_bgp_external_soft_out,
- clear_bgp_ipv6_external_soft_out_cmd,
- "clear bgp ipv6 external soft out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_external_soft_out,
- clear_bgp_external_out_cmd,
- "clear bgp external out",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_external_soft_out,
- clear_bgp_ipv6_external_out_cmd,
- "clear bgp ipv6 external WORD out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_as_soft_out,
- clear_ip_bgp_as_soft_out_cmd,
- "clear ip bgp <1-65535> soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_soft_out,
- clear_ip_bgp_as_out_cmd,
- "clear ip bgp <1-65535> out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_as_ipv4_soft_out,
- clear_ip_bgp_as_ipv4_soft_out_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_ipv4_soft_out,
- clear_ip_bgp_as_ipv4_out_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_ip_bgp_as_vpnv4_soft_out,
- clear_ip_bgp_as_vpnv4_soft_out_cmd,
- "clear ip bgp <1-65535> vpnv4 unicast soft out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_vpnv4_soft_out,
- clear_ip_bgp_as_vpnv4_out_cmd,
- "clear ip bgp <1-65535> vpnv4 unicast out",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Soft reconfig outbound updaten");
- DEFUN (clear_bgp_as_soft_out,
- clear_bgp_as_soft_out_cmd,
- "clear bgp <1-65535> soft out",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig outbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_OUT, argv[0]);
- }
- ALIAS (clear_bgp_as_soft_out,
- clear_bgp_ipv6_as_soft_out_cmd,
- "clear bgp ipv6 <1-65535> soft out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_as_soft_out,
- clear_bgp_as_out_cmd,
- "clear bgp <1-65535> out",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig outbound updaten");
- ALIAS (clear_bgp_as_soft_out,
- clear_bgp_ipv6_as_out_cmd,
- "clear bgp ipv6 <1-65535> out",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfig outbound updaten");
- /* Inbound soft-reconfiguration */
- DEFUN (clear_ip_bgp_all_soft_in,
- clear_ip_bgp_all_soft_in_cmd,
- "clear ip bgp * soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_ip_bgp_all_soft_in,
- clear_ip_bgp_instance_all_soft_in_cmd,
- "clear ip bgp view WORD * soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_ip_bgp_all_soft_in,
- clear_ip_bgp_all_in_cmd,
- "clear ip bgp * in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_all_in_prefix_filter,
- clear_ip_bgp_all_in_prefix_filter_cmd,
- "clear ip bgp * in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (argc== 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- ALIAS (clear_ip_bgp_all_in_prefix_filter,
- clear_ip_bgp_instance_all_in_prefix_filter_cmd,
- "clear ip bgp view WORD * in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign");
- DEFUN (clear_ip_bgp_all_ipv4_soft_in,
- clear_ip_bgp_all_ipv4_soft_in_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_ip_bgp_all_ipv4_soft_in,
- clear_ip_bgp_all_ipv4_in_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in,
- clear_ip_bgp_instance_all_ipv4_soft_in_cmd,
- "clear ip bgp view WORD * ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- DEFUN (clear_ip_bgp_all_ipv4_in_prefix_filter,
- clear_ip_bgp_all_ipv4_in_prefix_filter_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- DEFUN (clear_ip_bgp_instance_all_ipv4_in_prefix_filter,
- clear_ip_bgp_instance_all_ipv4_in_prefix_filter_cmd,
- "clear ip bgp view WORD * ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- DEFUN (clear_ip_bgp_all_vpnv4_soft_in,
- clear_ip_bgp_all_vpnv4_soft_in_cmd,
- "clear ip bgp * vpnv4 unicast soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_ip_bgp_all_vpnv4_soft_in,
- clear_ip_bgp_all_vpnv4_in_cmd,
- "clear ip bgp * vpnv4 unicast in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_all_soft_in,
- clear_bgp_all_soft_in_cmd,
- "clear bgp * soft in",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_bgp_all_soft_in,
- clear_bgp_instance_all_soft_in_cmd,
- "clear bgp view WORD * soft in",
- CLEAR_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_all_soft_in,
- clear_bgp_ipv6_all_soft_in_cmd,
- "clear bgp ipv6 * soft in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_all_soft_in,
- clear_bgp_all_in_cmd,
- "clear bgp * in",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_all_soft_in,
- clear_bgp_ipv6_all_in_cmd,
- "clear bgp ipv6 * in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_all_in_prefix_filter,
- clear_bgp_all_in_prefix_filter_cmd,
- "clear bgp * in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- ALIAS (clear_bgp_all_in_prefix_filter,
- clear_bgp_ipv6_all_in_prefix_filter_cmd,
- "clear bgp ipv6 * in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign");
- DEFUN (clear_ip_bgp_peer_soft_in,
- clear_ip_bgp_peer_soft_in_cmd,
- "clear ip bgp A.B.C.D soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_soft_in,
- clear_ip_bgp_peer_in_cmd,
- "clear ip bgp A.B.C.D in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfig inbound updaten");
-
- DEFUN (clear_ip_bgp_peer_in_prefix_filter,
- clear_ip_bgp_peer_in_prefix_filter_cmd,
- "clear ip bgp A.B.C.D in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfig inbound updaten"
- "Push out the existing ORF prefix-listn")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_ipv4_soft_in,
- clear_ip_bgp_peer_ipv4_soft_in_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
- BGP_CLEAR_SOFT_IN, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_ipv4_soft_in,
- clear_ip_bgp_peer_ipv4_in_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_peer_ipv4_in_prefix_filter,
- clear_ip_bgp_peer_ipv4_in_prefix_filter_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out the existing ORF prefix-listn")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_vpnv4_soft_in,
- clear_ip_bgp_peer_vpnv4_soft_in_cmd,
- "clear ip bgp A.B.C.D vpnv4 unicast soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_vpnv4_soft_in,
- clear_ip_bgp_peer_vpnv4_in_cmd,
- "clear ip bgp A.B.C.D vpnv4 unicast in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_peer_soft_in,
- clear_bgp_peer_soft_in_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) soft in",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_bgp_peer_soft_in,
- clear_bgp_ipv6_peer_soft_in_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) soft in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_peer_soft_in,
- clear_bgp_peer_in_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) in",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_peer_soft_in,
- clear_bgp_ipv6_peer_in_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_peer_in_prefix_filter,
- clear_bgp_peer_in_prefix_filter_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) in prefix-filter",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig inbound updaten"
- "Push out the existing ORF prefix-listn")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- ALIAS (clear_bgp_peer_in_prefix_filter,
- clear_bgp_ipv6_peer_in_prefix_filter_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfig inbound updaten"
- "Push out the existing ORF prefix-listn");
- DEFUN (clear_ip_bgp_peer_group_soft_in,
- clear_ip_bgp_peer_group_soft_in_cmd,
- "clear ip bgp peer-group WORD soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_group_soft_in,
- clear_ip_bgp_peer_group_in_cmd,
- "clear ip bgp peer-group WORD in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_peer_group_in_prefix_filter,
- clear_ip_bgp_peer_group_in_prefix_filter_cmd,
- "clear ip bgp peer-group WORD in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in,
- clear_ip_bgp_peer_group_ipv4_soft_in_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
- BGP_CLEAR_SOFT_IN, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_peer_group_ipv4_soft_in,
- clear_ip_bgp_peer_group_ipv4_in_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter,
- clear_ip_bgp_peer_group_ipv4_in_prefix_filter_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_bgp_peer_group_soft_in,
- clear_bgp_peer_group_soft_in_cmd,
- "clear bgp peer-group WORD soft in",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_bgp_peer_group_soft_in,
- clear_bgp_ipv6_peer_group_soft_in_cmd,
- "clear bgp ipv6 peer-group WORD soft in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_peer_group_soft_in,
- clear_bgp_peer_group_in_cmd,
- "clear bgp peer-group WORD in",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_peer_group_soft_in,
- clear_bgp_ipv6_peer_group_in_cmd,
- "clear bgp ipv6 peer-group WORD in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_peer_group_in_prefix_filter,
- clear_bgp_peer_group_in_prefix_filter_cmd,
- "clear bgp peer-group WORD in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- ALIAS (clear_bgp_peer_group_in_prefix_filter,
- clear_bgp_ipv6_peer_group_in_prefix_filter_cmd,
- "clear bgp ipv6 peer-group WORD in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign");
- DEFUN (clear_ip_bgp_external_soft_in,
- clear_ip_bgp_external_soft_in_cmd,
- "clear ip bgp external soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_ip_bgp_external_soft_in,
- clear_ip_bgp_external_in_cmd,
- "clear ip bgp external in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_external_in_prefix_filter,
- clear_ip_bgp_external_in_prefix_filter_cmd,
- "clear ip bgp external in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- DEFUN (clear_ip_bgp_external_ipv4_soft_in,
- clear_ip_bgp_external_ipv4_soft_in_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
- BGP_CLEAR_SOFT_IN, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_ip_bgp_external_ipv4_soft_in,
- clear_ip_bgp_external_ipv4_in_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter,
- clear_ip_bgp_external_ipv4_in_prefix_filter_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- DEFUN (clear_bgp_external_soft_in,
- clear_bgp_external_soft_in_cmd,
- "clear bgp external soft in",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN, NULL);
- }
- ALIAS (clear_bgp_external_soft_in,
- clear_bgp_ipv6_external_soft_in_cmd,
- "clear bgp ipv6 external soft in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_external_soft_in,
- clear_bgp_external_in_cmd,
- "clear bgp external in",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_external_soft_in,
- clear_bgp_ipv6_external_in_cmd,
- "clear bgp ipv6 external WORD in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_external_in_prefix_filter,
- clear_bgp_external_in_prefix_filter_cmd,
- "clear bgp external in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL);
- }
- ALIAS (clear_bgp_external_in_prefix_filter,
- clear_bgp_ipv6_external_in_prefix_filter_cmd,
- "clear bgp ipv6 external in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign");
- DEFUN (clear_ip_bgp_as_soft_in,
- clear_ip_bgp_as_soft_in_cmd,
- "clear ip bgp <1-65535> soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_soft_in,
- clear_ip_bgp_as_in_cmd,
- "clear ip bgp <1-65535> in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_as_in_prefix_filter,
- clear_ip_bgp_as_in_prefix_filter_cmd,
- "clear ip bgp <1-65535> in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_ip_bgp_as_ipv4_soft_in,
- clear_ip_bgp_as_ipv4_soft_in_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
- BGP_CLEAR_SOFT_IN, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_ipv4_soft_in,
- clear_ip_bgp_as_ipv4_in_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter,
- clear_ip_bgp_as_ipv4_in_prefix_filter_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) in prefix-filter",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- DEFUN (clear_ip_bgp_as_vpnv4_soft_in,
- clear_ip_bgp_as_vpnv4_soft_in_cmd,
- "clear ip bgp <1-65535> vpnv4 unicast soft in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_ip_bgp_as_vpnv4_soft_in,
- clear_ip_bgp_as_vpnv4_in_cmd,
- "clear ip bgp <1-65535> vpnv4 unicast in",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family modifiern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_as_soft_in,
- clear_bgp_as_soft_in_cmd,
- "clear bgp <1-65535> soft in",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig inbound updaten")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN, argv[0]);
- }
- ALIAS (clear_bgp_as_soft_in,
- clear_bgp_ipv6_as_soft_in_cmd,
- "clear bgp ipv6 <1-65535> soft in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfign"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_as_soft_in,
- clear_bgp_as_in_cmd,
- "clear bgp <1-65535> in",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten");
- ALIAS (clear_bgp_as_soft_in,
- clear_bgp_ipv6_as_in_cmd,
- "clear bgp ipv6 <1-65535> in",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten");
- DEFUN (clear_bgp_as_in_prefix_filter,
- clear_bgp_as_in_prefix_filter_cmd,
- "clear bgp <1-65535> in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[0]);
- }
- ALIAS (clear_bgp_as_in_prefix_filter,
- clear_bgp_ipv6_as_in_prefix_filter_cmd,
- "clear bgp ipv6 <1-65535> in prefix-filter",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfig inbound updaten"
- "Push out prefix-list ORF and do inbound soft reconfign");
- /* Both soft-reconfiguration */
- DEFUN (clear_ip_bgp_all_soft,
- clear_ip_bgp_all_soft_cmd,
- "clear ip bgp * soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- ALIAS (clear_ip_bgp_all_soft,
- clear_ip_bgp_instance_all_soft_cmd,
- "clear ip bgp view WORD * soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign");
- DEFUN (clear_ip_bgp_all_ipv4_soft,
- clear_ip_bgp_all_ipv4_soft_cmd,
- "clear ip bgp * ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- DEFUN (clear_ip_bgp_instance_all_ipv4_soft,
- clear_ip_bgp_instance_all_ipv4_soft_cmd,
- "clear ip bgp view WORD * ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- DEFUN (clear_ip_bgp_all_vpnv4_soft,
- clear_ip_bgp_all_vpnv4_soft_cmd,
- "clear ip bgp * vpnv4 unicast soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all peersn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_all,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_bgp_all_soft,
- clear_bgp_all_soft_cmd,
- "clear bgp * soft",
- CLEAR_STR
- BGP_STR
- "Clear all peersn"
- "Soft reconfign")
- {
- if (argc == 1)
- return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
-
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- ALIAS (clear_bgp_all_soft,
- clear_bgp_instance_all_soft_cmd,
- "clear bgp view WORD * soft",
- CLEAR_STR
- BGP_STR
- "BGP viewn"
- "view namen"
- "Clear all peersn"
- "Soft reconfign");
- ALIAS (clear_bgp_all_soft,
- clear_bgp_ipv6_all_soft_cmd,
- "clear bgp ipv6 * soft",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all peersn"
- "Soft reconfign");
- DEFUN (clear_ip_bgp_peer_soft,
- clear_ip_bgp_peer_soft_cmd,
- "clear ip bgp A.B.C.D soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_ipv4_soft,
- clear_ip_bgp_peer_ipv4_soft_cmd,
- "clear ip bgp A.B.C.D ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_peer,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_vpnv4_soft,
- clear_ip_bgp_peer_vpnv4_soft_cmd,
- "clear ip bgp A.B.C.D vpnv4 unicast soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_bgp_peer_soft,
- clear_bgp_peer_soft_cmd,
- "clear bgp (A.B.C.D|X:X::X:X) soft",
- CLEAR_STR
- BGP_STR
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- ALIAS (clear_bgp_peer_soft,
- clear_bgp_ipv6_peer_soft_cmd,
- "clear bgp ipv6 (A.B.C.D|X:X::X:X) soft",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "BGP neighbor address to clearn"
- "BGP IPv6 neighbor to clearn"
- "Soft reconfign");
- DEFUN (clear_ip_bgp_peer_group_soft,
- clear_ip_bgp_peer_group_soft_cmd,
- "clear ip bgp peer-group WORD soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_ip_bgp_peer_group_ipv4_soft,
- clear_ip_bgp_peer_group_ipv4_soft_cmd,
- "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_bgp_peer_group_soft,
- clear_bgp_peer_group_soft_cmd,
- "clear bgp peer-group WORD soft",
- CLEAR_STR
- BGP_STR
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_group,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- ALIAS (clear_bgp_peer_group_soft,
- clear_bgp_ipv6_peer_group_soft_cmd,
- "clear bgp ipv6 peer-group WORD soft",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all members of peer-groupn"
- "BGP peer-group namen"
- "Soft reconfign");
- DEFUN (clear_ip_bgp_external_soft,
- clear_ip_bgp_external_soft_cmd,
- "clear ip bgp external soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- DEFUN (clear_ip_bgp_external_ipv4_soft,
- clear_ip_bgp_external_ipv4_soft_cmd,
- "clear ip bgp external ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear all external peersn"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[0], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_external,
- BGP_CLEAR_SOFT_BOTH, NULL);
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- DEFUN (clear_bgp_external_soft,
- clear_bgp_external_soft_cmd,
- "clear bgp external soft",
- CLEAR_STR
- BGP_STR
- "Clear all external peersn"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external,
- BGP_CLEAR_SOFT_BOTH, NULL);
- }
- ALIAS (clear_bgp_external_soft,
- clear_bgp_ipv6_external_soft_cmd,
- "clear bgp ipv6 external soft",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear all external peersn"
- "Soft reconfign");
- DEFUN (clear_ip_bgp_as_soft,
- clear_ip_bgp_as_soft_cmd,
- "clear ip bgp <1-65535> soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_ip_bgp_as_ipv4_soft,
- clear_ip_bgp_as_ipv4_soft_cmd,
- "clear ip bgp <1-65535> ipv4 (unicast|multicast) soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family Modifiern"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- if (strncmp (argv[1], "m", 1) == 0)
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_as,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- return bgp_clear_vty (vty, NULL,AFI_IP, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_ip_bgp_as_vpnv4_soft,
- clear_ip_bgp_as_vpnv4_soft_cmd,
- "clear ip bgp <1-65535> vpnv4 unicast soft",
- CLEAR_STR
- IP_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Address familyn"
- "Address Family Modifiern"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_as,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- DEFUN (clear_bgp_as_soft,
- clear_bgp_as_soft_cmd,
- "clear bgp <1-65535> soft",
- CLEAR_STR
- BGP_STR
- "Clear peers with the AS numbern"
- "Soft reconfign")
- {
- return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_as,
- BGP_CLEAR_SOFT_BOTH, argv[0]);
- }
- ALIAS (clear_bgp_as_soft,
- clear_bgp_ipv6_as_soft_cmd,
- "clear bgp ipv6 <1-65535> soft",
- CLEAR_STR
- BGP_STR
- "Address familyn"
- "Clear peers with the AS numbern"
- "Soft reconfign");
- /* Show BGP peer's summary information. */
- int
- bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi)
- {
- struct peer *peer;
- struct listnode *nn;
- int count = 0;
- char timebuf[BGP_UPTIME_LEN];
- int len;
- /* Header string for each address family. */
- static char header[] = "Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd";
- LIST_LOOP (bgp->peer, peer, nn)
- {
- if (peer->afc[afi][safi])
- {
- if (! count)
- {
- vty_out (vty,
- "BGP router identifier %s, local AS number %d%s",
- inet_ntoa (bgp->router_id), bgp->as, VTY_NEWLINE);
- vty_out (vty,
- "%ld BGP AS-PATH entries%s", aspath_count (),
- VTY_NEWLINE);
- vty_out (vty,
- "%ld BGP community entries%s", community_count (),
- VTY_NEWLINE);
- if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
- vty_out (vty, "Dampening enabled.%s", VTY_NEWLINE);
- vty_out (vty, "%s", VTY_NEWLINE);
- vty_out (vty, "%s%s", header, VTY_NEWLINE);
- }
- count++;
- len = vty_out (vty, "%s", peer->host);
- len = 16 - len;
- if (len < 1)
- vty_out (vty, "%s%*s", VTY_NEWLINE, 16, " ");
- else
- vty_out (vty, "%*s", len, " ");
- vty_out (vty, "4 ");
- vty_out (vty, "%5d %7d %7d %8d %4d %4ld ",
- peer->as,
- peer->open_in + peer->update_in + peer->keepalive_in
- + peer->notify_in + peer->refresh_in + peer->dynamic_cap_in,
- peer->open_out + peer->update_out + peer->keepalive_out
- + peer->notify_out + peer->refresh_out
- + peer->dynamic_cap_out,
- 0, 0, peer->obuf->count);
- vty_out (vty, "%8s",
- peer_uptime (peer->uptime, timebuf, BGP_UPTIME_LEN));
- if (peer->status == Established)
- {
- vty_out (vty, " %8ld", peer->pcount[afi][safi]);
- }
- else
- {
- if (CHECK_FLAG (peer->flags, PEER_FLAG_SHUTDOWN))
- vty_out (vty, " Idle (Admin)");
- else if (CHECK_FLAG (peer->sflags, PEER_STATUS_PREFIX_OVERFLOW))
- vty_out (vty, " Idle (PfxCt)");
- else
- vty_out (vty, " %-11s", LOOKUP(bgp_status_msg, peer->status));
- }
- vty_out (vty, "%s", VTY_NEWLINE);
- }
- }
- if (count)
- vty_out (vty, "%sTotal number of neighbors %d%s", VTY_NEWLINE,
- count, VTY_NEWLINE);
- else
- vty_out (vty, "No %s neighbor is configured%s",
- afi == AFI_IP ? "IPv4" : "IPv6", VTY_NEWLINE);
- return CMD_SUCCESS;
- }
- int
- bgp_show_summary_vty (struct vty *vty, char *name, afi_t afi, safi_t safi)
- {
- struct bgp *bgp;
- if (name)
- {
- bgp = bgp_lookup_by_name (name);
-
- if (! bgp)
- {
- vty_out (vty, "%% No such BGP instance exist%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
- bgp_show_summary (vty, bgp, afi, safi);
- return CMD_SUCCESS;
- }
-
- bgp = bgp_get_default ();
- if (bgp)
- bgp_show_summary (vty, bgp, afi, safi);
-
- return CMD_SUCCESS;
- }
- /* `show ip bgp summary' commands. */
- DEFUN (show_ip_bgp_summary,
- show_ip_bgp_summary_cmd,
- "show ip bgp summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "Summary of BGP neighbor statusn")
- {
- return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST);
- }
- DEFUN (show_ip_bgp_instance_summary,
- show_ip_bgp_instance_summary_cmd,
- "show ip bgp view WORD summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "View namen"
- "Summary of BGP neighbor statusn")
- {
- return bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_UNICAST);
- }
- DEFUN (show_ip_bgp_ipv4_summary,
- show_ip_bgp_ipv4_summary_cmd,
- "show ip bgp ipv4 (unicast|multicast) summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Summary of BGP neighbor statusn")
- {
- 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_ip_bgp_instance_ipv4_summary,
- show_ip_bgp_instance_ipv4_summary_cmd,
- "show ip bgp view WORD ipv4 (unicast|multicast) summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "BGP viewn"
- "View namen"
- "Address familyn"
- "Address Family modifiern"
- "Address Family modifiern"
- "Summary of BGP neighbor statusn")
- {
- 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_ip_bgp_vpnv4_all_summary,
- show_ip_bgp_vpnv4_all_summary_cmd,
- "show ip bgp vpnv4 all summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "Display VPNv4 NLRI specific informationn"
- "Display information about all VPNv4 NLRIsn"
- "Summary of BGP neighbor statusn")
- {
- return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
- }
- DEFUN (show_ip_bgp_vpnv4_rd_summary,
- show_ip_bgp_vpnv4_rd_summary_cmd,
- "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn summary",
- SHOW_STR
- IP_STR
- BGP_STR
- "Display VPNv4 NLRI specific informationn"
- "Display information for a route distinguishern"
- "VPN Route Distinguishern"
- "Summary of BGP neighbor statusn")
- {
- int ret;
- struct prefix_rd prd;
- ret = str2prefix_rd (argv[0], &prd);
- if (! ret)
- {
- vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
- return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
- }
- #ifdef HAVE_IPV6
- DEFUN (show_bgp_summary,
- show_bgp_summary_cmd,
- "show bgp summary",
- SHOW_STR
- BGP_STR
- "Summary of BGP neighbor statusn")
- {
- return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST);
- }
- DEFUN (show_bgp_instance_summary,
- show_bgp_instance_summary_cmd,
- "show bgp view WORD summary",
- SHOW_STR
- BGP_STR
- "BGP viewn"
- "View namen"
- "Summary of BGP neighbor statusn")
- {
- return bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
- }
- ALIAS (show_bgp_summary,
- show_bgp_ipv6_summary_cmd,
- "show bgp ipv6 summary",
- SHOW_STR
- BGP_STR
- "Address familyn"
- "Summary of BGP neighbor statusn");
- ALIAS (show_bgp_instance_summary,
- show_bgp_instance_ipv6_summary_cmd,
- "show bgp view WORD ipv6 summary",
- SHOW_STR
- BGP_STR
- "BGP viewn"
- "View namen"
- "Address familyn"
- "Summary of BGP neighbor statusn");
- #endif /* HAVE_IPV6 */
- char *
- afi_safi_print (afi_t afi, safi_t safi)
- {
- if (afi == AFI_IP && safi == SAFI_UNICAST)
- return "IPv4 Unicast";
- else if (afi == AFI_IP && safi == SAFI_MULTICAST)
- return "IPv4 Multicast";
- else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
- return "VPNv4 Unicast";
- else if (afi == AFI_IP6 && safi == SAFI_UNICAST)
- return "IPv6 Unicast";
- else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
- return "IPv6 Multicast";
- else
- return "Unknown";
- }
- /* Show BGP peer's information. */
- enum show_type
- {
- show_all,
- show_peer
- };
- void
- bgp_show_peer_afi_orf_cap (struct vty *vty, struct peer *p,
- afi_t afi, safi_t safi,
- u_int16_t adv_smcap, u_int16_t adv_rmcap,
- u_int16_t rcv_smcap, u_int16_t rcv_rmcap)
- {
- /* Send-Mode */
- if (CHECK_FLAG (p->af_cap[afi][safi], adv_smcap)
- || CHECK_FLAG (p->af_cap[afi][safi], rcv_smcap))
- {
- vty_out (vty, " Send-mode: ");
- if (CHECK_FLAG (p->af_cap[afi][safi], adv_smcap))
- vty_out (vty, "advertised");
- if (CHECK_FLAG (p->af_cap[afi][safi], rcv_smcap))
- vty_out (vty, "%sreceived",
- CHECK_FLAG (p->af_cap[afi][safi], adv_smcap) ?
- ", " : "");
- vty_out (vty, "%s", VTY_NEWLINE);
- }
- /* Receive-Mode */
- if (CHECK_FLAG (p->af_cap[afi][safi], adv_rmcap)
- || CHECK_FLAG (p->af_cap[afi][safi], rcv_rmcap))
- {
- vty_out (vty, " Receive-mode: ");
- if (CHECK_FLAG (p->af_cap[afi][safi], adv_rmcap))
- vty_out (vty, "advertised");
- if (CHECK_FLAG (p->af_cap[afi][safi], rcv_rmcap))
- vty_out (vty, "%sreceived",
- CHECK_FLAG (p->af_cap[afi][safi], adv_rmcap) ?
- ", " : "");
- vty_out (vty, "%s", VTY_NEWLINE);
- }
- }
- void
- bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi)
- {
- struct bgp_filter *filter;
- char orf_pfx_name[BUFSIZ];
- int orf_pfx_count;
- filter = &p->filter[afi][safi];
- vty_out (vty, " For address family: %s%s", afi_safi_print (afi, safi),
- VTY_NEWLINE);
- vty_out (vty, " Configuration flags 0x%x%s", p->af_config[afi][safi],
- VTY_NEWLINE);
- if (peer_group_member (p))
- vty_out (vty, " %s peer-group member%s", p->group->name, VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REFLECTOR_CLIENT))
- vty_out (vty, " Route-Reflector Client%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
- vty_out (vty, " Route-Server Client%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG))
- vty_out (vty, " Inbound soft reconfiguration allowed%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_REMOVE_PRIVATE_AS))
- vty_out (vty, " Private AS number removed from updates to this neighbor%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_NEXTHOP_SELF))
- vty_out (vty, " NEXT_HOP is always this router%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_AS_PATH_UNCHANGED))
- vty_out (vty, " AS_PATH is propagated unchanged to this neighbor%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED))
- vty_out (vty, " NEXT_HOP is propagated unchanged to this neighbor%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_MED_UNCHANGED))
- vty_out (vty, " MED is propagated unchanged to this neighbor%s", VTY_NEWLINE);
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_COMMUNITY)
- || CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
- {
- vty_out (vty, " Community attribute sent to this neighbor");
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_COMMUNITY)
- && CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
- vty_out (vty, "(both)%s", VTY_NEWLINE);
- else if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY))
- vty_out (vty, "(extended)%s", VTY_NEWLINE);
- else
- vty_out (vty, "(standard)%s", VTY_NEWLINE);
- }
- if (CHECK_FLAG (p->af_flags[afi][safi], PEER_FLAG_DEFAULT_ORIGINATE))
- {
- vty_out (vty, " Default information originate,");
- if (p->default_rmap[afi][safi].name)
- vty_out (vty, " default route-map %s%s,",
- p->default_rmap[afi][safi].map ? "*" : "",
- p->default_rmap[afi][safi].name);
- if (CHECK_FLAG (p->af_sflags[afi][safi], PEER_STATUS_DEFAULT_ORIGINATE))
- vty_out (vty, " default sent%s", VTY_NEWLINE);
- else
- vty_out (vty, " default not sent%s", VTY_NEWLINE);
- }
- if (CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_ADV)
- || CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_RCV)
- || CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_SM_OLD_RCV)