"no set community AA:NN...",
NO_STR
SET_STR
- "BGP community attribute\n")
+ "BGP community attribute\n"
+ COMMUNITY_VAL_STR)
{
return generic_set_delete (vty, vty->index, "community", NULL);
}
"no set comm-list [<(1-99)|(100-500)|WORD> delete]",
NO_STR
SET_STR
- "set BGP community list (for deletion)\n")
+ "set BGP community list (for deletion)\n"
+ "Community-list number (standard)\n"
+ "Community-list number (expanded)\n"
+ "Community-list name\n"
+ "Delete matching communities\n")
{
return generic_set_delete (vty, vty->index, "comm-list", NULL);
}
"no set origin [<egp|igp|incomplete>]",
NO_STR
SET_STR
- "BGP origin code\n")
+ "BGP origin code\n"
+ "remote EGP\n"
+ "local IGP\n"
+ "unknown heritage\n")
{
return generic_set_delete (vty, vty->index, "origin", NULL);
}
DEFUN (no_bgp_wpkt_quanta,
no_bgp_wpkt_quanta_cmd,
"no write-quanta (1-10000)",
+ NO_STR
"How many packets to write to peer socket per run\n"
"Number of packets\n")
{
bgp_listen_range_cmd,
"bgp listen range <A.B.C.D/M|X:X::X:X/M> peer-group WORD",
"BGP specific commands\n"
- "Configure BGP Dynamic Neighbors\n"
- "add a listening range for Dynamic Neighbors\n"
+ "Configure BGP dynamic neighbors listen range\n"
+ "Configure BGP dynamic neighbors listen range\n"
NEIGHBOR_ADDR_STR
"Member of the peer-group\n"
"Peer-group name\n")
{
- int idx_ipv4_ipv6_prefixlen = 3;
- int idx_word = 5;
struct bgp *bgp;
struct prefix range;
struct peer_group *group, *existing_group;
afi_t afi;
int ret;
+ int idx = 0;
- bgp = vty->index;
+ argv_find (argv, argc, "A.B.C.D/M", &idx);
+ argv_find (argv, argc, "X:X::X:X/M", &idx);
+ char *prefix = argv[idx]->arg;
+ argv_find (argv, argc, "WORD", &idx);
+ char *peergroup = argv[idx]->arg;
- //VTY_GET_IPV4_PREFIX ("listen range", range, argv[idx_ipv4_ipv6_prefixlen]->arg);
+ bgp = vty->index;
/* Convert IP prefix string to struct prefix. */
- ret = str2prefix (argv[idx_ipv4_ipv6_prefixlen]->arg, &range);
+ ret = str2prefix (prefix, &range);
if (! ret)
{
vty_out (vty, "%% Malformed listen range%s", VTY_NEWLINE);
afi = family2afi(range.family);
-#ifdef HAVE_IPV6
if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6))
{
vty_out (vty, "%% Malformed listen range (link-local address)%s",
VTY_NEWLINE);
return CMD_WARNING;
}
-#endif /* HAVE_IPV6 */
apply_mask (&range);
existing_group = listen_range_exists (bgp, &range, 1);
if (existing_group)
{
- if (strcmp (existing_group->name, argv[idx_word]->arg) == 0)
+ if (strcmp (existing_group->name, peergroup) == 0)
return CMD_SUCCESS;
else
{
return CMD_WARNING;
}
- group = peer_group_lookup (bgp, argv[idx_word]->arg);
+ group = peer_group_lookup (bgp, peergroup);
if (! group)
{
vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
DEFUN (no_bgp_listen_range,
no_bgp_listen_range_cmd,
- "no bgp listen range A.B.C.D/M peer-group WORD",
+ "no bgp listen range <A.B.C.D/M|X:X::X:X/M> peer-group WORD",
+ NO_STR
"BGP specific commands\n"
- "Configure BGP defaults\n"
- "delete a listening range for Dynamic Neighbors\n"
- "Remove Dynamic Neighbors listening range\n")
+ "Unconfigure BGP dynamic neighbors listen range\n"
+ "Unconfigure BGP dynamic neighbors listen range\n"
+ NEIGHBOR_ADDR_STR
+ "Member of the peer-group\n"
+ "Peer-group name\n")
{
- int idx_ipv4_prefixlen = 4;
- int idx_word = 6;
struct bgp *bgp;
struct prefix range;
struct peer_group *group;
afi_t afi;
int ret;
+ int idx = 0;
+
+ argv_find (argv, argc, "A.B.C.D/M", &idx);
+ argv_find (argv, argc, "X:X::X:X/M", &idx);
+ char *prefix = argv[idx]->arg;
+ argv_find (argv, argc, "WORD", &idx);
+ char *peergroup = argv[idx]->arg;
bgp = vty->index;
// VTY_GET_IPV4_PREFIX ("listen range", range, argv[idx_ipv4_prefixlen]->arg);
/* Convert IP prefix string to struct prefix. */
- ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &range);
+ ret = str2prefix (prefix, &range);
if (! ret)
{
vty_out (vty, "%% Malformed listen range%s", VTY_NEWLINE);
afi = family2afi(range.family);
-#ifdef HAVE_IPV6
if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6))
{
vty_out (vty, "%% Malformed listen range (link-local address)%s",
VTY_NEWLINE);
return CMD_WARNING;
}
-#endif /* HAVE_IPV6 */
apply_mask (&range);
-
- group = peer_group_lookup (bgp, argv[idx_word]->arg);
+ group = peer_group_lookup (bgp, peergroup);
if (! group)
{
vty_out (vty, "%% Peer-group does not exist%s", VTY_NEWLINE);
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Specify a BGP neighbor\n"
- AS_STR)
+ AS_STR
+ "External BGP peer\n"
+ "Internal BGP peer\n")
{
int idx_peer = 1;
int idx_remote_as = 3;
NEIGHBOR_STR
"Interface name or neighbor tag\n"
"Enable BGP on interface\n"
- AS_STR)
+ AS_STR
+ "External BGP peer\n"
+ "Internal BGP peer\n")
{
int idx_word = 1;
int idx_remote_as = 4;
NEIGHBOR_STR
"Interface name or neighbor tag\n"
"Enable BGP on interface\n"
- AS_STR)
+ AS_STR
+ "External BGP peer\n"
+ "Internal BGP peer\n")
{
int idx_word = 1;
int idx_remote_as = 5;
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"BGP ttl-security parameters\n"
- "Specify the maximum number of hops to the BGP peer\n")
+ "Specify the maximum number of hops to the BGP peer\n"
+ "Number of hops to BGP peer\n")
{
int idx_peer = 1;
int idx_number = 4;