get_afi_safi_str(afi, safi, false));
vty_out(vty, " F bit : ");
- } else
- get_afi_safi_str(afi, safi, true);
+ }
if (peer->nsf[afi][safi]
&& CHECK_FLAG(peer->af_cap[afi][safi],
/*community-list standard */
DEFUN (community_list_standard,
bgp_community_list_standard_cmd,
- "bgp community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+ "bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
BGP_STR
COMMUNITY_LIST_STR
"Community list number (standard)\n"
"Add an standard community-list entry\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
COMMUNITY_VAL_STR)
{
char *cl_name_or_number = NULL;
+ char *seq = NULL;
int direct = 0;
int style = COMMUNITY_LIST_STANDARD;
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
argv_find(argv, argc, "(1-99)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_name_or_number = argv[idx]->arg;
argv_find(argv, argc, "AA:NN", &idx);
char *str = argv_concat(argv, argc, idx);
- int ret = community_list_set(bgp_clist, cl_name_or_number, str, direct,
- style);
+ int ret = community_list_set(bgp_clist, cl_name_or_number, str, seq,
+ direct, style);
XFREE(MTYPE_TMP, str);
DEFUN (no_community_list_standard_all,
no_bgp_community_list_standard_all_cmd,
- "no bgp community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+ "no bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
NO_STR
BGP_STR
COMMUNITY_LIST_STR
"Community list number (standard)\n"
"Add an standard community-list entry\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
COMMUNITY_VAL_STR)
char *str = NULL;
int direct = 0;
int style = COMMUNITY_LIST_STANDARD;
-
+ char *seq = NULL;
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
argv_find(argv, argc, "permit", &idx);
argv_find(argv, argc, "deny", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_name_or_number = argv[idx]->arg;
- int ret = community_list_unset(bgp_clist, cl_name_or_number, str,
+ int ret = community_list_unset(bgp_clist, cl_name_or_number, str, seq,
direct, style);
XFREE(MTYPE_TMP, str);
/*community-list expanded */
DEFUN (community_list_expanded_all,
bgp_community_list_expanded_all_cmd,
- "bgp community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+ "bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
BGP_STR
COMMUNITY_LIST_STR
"Community list number (expanded)\n"
"Add an expanded community-list entry\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
COMMUNITY_VAL_STR)
{
char *cl_name_or_number = NULL;
+ char *seq = NULL;
int direct = 0;
int style = COMMUNITY_LIST_EXPANDED;
-
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
+
argv_find(argv, argc, "(100-500)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_name_or_number = argv[idx]->arg;
argv_find(argv, argc, "AA:NN", &idx);
char *str = argv_concat(argv, argc, idx);
- int ret = community_list_set(bgp_clist, cl_name_or_number, str, direct,
- style);
+ int ret = community_list_set(bgp_clist, cl_name_or_number, str, seq,
+ direct, style);
XFREE(MTYPE_TMP, str);
DEFUN (no_community_list_expanded_all,
no_bgp_community_list_expanded_all_cmd,
- "no bgp community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+ "no bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
NO_STR
BGP_STR
COMMUNITY_LIST_STR
"Community list number (expanded)\n"
"Add an expanded community-list entry\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
COMMUNITY_VAL_STR)
{
char *cl_name_or_number = NULL;
+ char *seq = NULL;
char *str = NULL;
int direct = 0;
int style = COMMUNITY_LIST_EXPANDED;
-
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
argv_find(argv, argc, "permit", &idx);
argv_find(argv, argc, "deny", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_name_or_number = argv[idx]->arg;
- int ret = community_list_unset(bgp_clist, cl_name_or_number, str,
+ int ret = community_list_unset(bgp_clist, cl_name_or_number, str, seq,
direct, style);
XFREE(MTYPE_TMP, str);
char *str;
int idx = 0;
char *cl_name;
+ char *seq = NULL;
+
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+ idx = 0;
direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
: COMMUNITY_DENY;
else
str = NULL;
- ret = lcommunity_list_set(bgp_clist, cl_name, str, direct, style);
+ ret = lcommunity_list_set(bgp_clist, cl_name, str, seq, direct, style);
/* Free temporary community list string allocated by
argv_concat(). */
int direct = 0;
char *str = NULL;
int idx = 0;
+ char *seq = NULL;
+
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+ idx = 0;
argv_find(argv, argc, "permit", &idx);
argv_find(argv, argc, "deny", &idx);
argv_find(argv, argc, "WORD", &idx);
/* Unset community list. */
- ret = lcommunity_list_unset(bgp_clist, argv[idx]->arg, str, direct,
+ ret = lcommunity_list_unset(bgp_clist, argv[idx]->arg, str, seq, direct,
style);
/* Free temporary community list string allocated by
DEFUN (lcommunity_list_standard,
bgp_lcommunity_list_standard_cmd,
- "bgp large-community-list (1-99) <deny|permit> AA:BB:CC...",
+ "bgp large-community-list (1-99) [seq (1-4294967295)] <deny|permit> AA:BB:CC...",
BGP_STR
LCOMMUNITY_LIST_STR
"Large Community list number (standard)\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
LCOMMUNITY_VAL_STR)
DEFUN (lcommunity_list_expanded,
bgp_lcommunity_list_expanded_cmd,
- "bgp large-community-list (100-500) <deny|permit> LINE...",
+ "bgp large-community-list (100-500) [seq (1-4294967295)] <deny|permit> LINE...",
BGP_STR
LCOMMUNITY_LIST_STR
"Large Community list number (expanded)\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
"An ordered list as a regular-expression\n")
DEFUN (lcommunity_list_name_standard,
bgp_lcommunity_list_name_standard_cmd,
- "bgp large-community-list standard WORD <deny|permit> AA:BB:CC...",
+ "bgp large-community-list standard WORD [seq (1-4294967295)] <deny|permit> AA:BB:CC...",
BGP_STR
LCOMMUNITY_LIST_STR
"Specify standard large-community-list\n"
"Large Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
LCOMMUNITY_VAL_STR)
DEFUN (lcommunity_list_name_expanded,
bgp_lcommunity_list_name_expanded_cmd,
- "bgp large-community-list expanded WORD <deny|permit> LINE...",
+ "bgp large-community-list expanded WORD [seq (1-4294967295)] <deny|permit> LINE...",
BGP_STR
LCOMMUNITY_LIST_STR
"Specify expanded large-community-list\n"
"Large Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
"An ordered list as a regular-expression\n")
LARGE_COMMUNITY_LIST_EXPANDED, 1);
}
-DEFUN (no_lcommunity_list_standard_all,
- no_bgp_lcommunity_list_standard_all_cmd,
+DEFUN (no_lcommunity_list_all,
+ no_bgp_lcommunity_list_all_cmd,
"no bgp large-community-list <(1-99)|(100-500)|WORD>",
NO_STR
BGP_STR
LARGE_COMMUNITY_LIST_STANDARD);
}
+DEFUN (no_lcommunity_list_name_standard_all,
+ no_bgp_lcommunity_list_name_standard_all_cmd,
+ "no bgp large-community-list standard WORD",
+ NO_STR
+ BGP_STR
+ LCOMMUNITY_LIST_STR
+ "Specify standard large-community-list\n"
+ "Large Community list name\n")
+{
+ return lcommunity_list_unset_vty(vty, argc, argv,
+ LARGE_COMMUNITY_LIST_STANDARD);
+}
+
DEFUN (no_lcommunity_list_name_expanded_all,
no_bgp_lcommunity_list_name_expanded_all_cmd,
"no bgp large-community-list expanded WORD",
DEFUN (no_lcommunity_list_standard,
no_bgp_lcommunity_list_standard_cmd,
- "no bgp large-community-list (1-99) <deny|permit> AA:AA:NN...",
+ "no bgp large-community-list (1-99) [seq (1-4294967295)] <deny|permit> AA:AA:NN...",
NO_STR
BGP_STR
LCOMMUNITY_LIST_STR
"Large Community list number (standard)\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
LCOMMUNITY_VAL_STR)
DEFUN (no_lcommunity_list_expanded,
no_bgp_lcommunity_list_expanded_cmd,
- "no bgp large-community-list (100-500) <deny|permit> LINE...",
+ "no bgp large-community-list (100-500) [seq (1-4294967295)] <deny|permit> LINE...",
NO_STR
BGP_STR
LCOMMUNITY_LIST_STR
"Large Community list number (expanded)\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
"An ordered list as a regular-expression\n")
DEFUN (no_lcommunity_list_name_standard,
no_bgp_lcommunity_list_name_standard_cmd,
- "no bgp large-community-list standard WORD <deny|permit> AA:AA:NN...",
+ "no bgp large-community-list standard WORD [seq (1-4294967295)] <deny|permit> AA:AA:NN...",
NO_STR
BGP_STR
LCOMMUNITY_LIST_STR
"Specify standard large-community-list\n"
"Large Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
LCOMMUNITY_VAL_STR)
DEFUN (no_lcommunity_list_name_expanded,
no_bgp_lcommunity_list_name_expanded_cmd,
- "no bgp large-community-list expanded WORD <deny|permit> LINE...",
+ "no bgp large-community-list expanded WORD [seq (1-4294967295)] <deny|permit> LINE...",
NO_STR
BGP_STR
LCOMMUNITY_LIST_STR
"Specify expanded large-community-list\n"
"Large community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
"An ordered list as a regular-expression\n")
DEFUN (extcommunity_list_standard,
bgp_extcommunity_list_standard_cmd,
- "bgp extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+ "bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
BGP_STR
EXTCOMMUNITY_LIST_STR
"Extended Community list number (standard)\n"
"Specify standard extcommunity-list\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
EXTCOMMUNITY_VAL_STR)
int style = EXTCOMMUNITY_LIST_STANDARD;
int direct = 0;
char *cl_number_or_name = NULL;
+ char *seq = NULL;
int idx = 0;
argv_find(argv, argc, "(1-99)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg;
+
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
: COMMUNITY_DENY;
argv_find(argv, argc, "AA:NN", &idx);
char *str = argv_concat(argv, argc, idx);
- int ret = extcommunity_list_set(bgp_clist, cl_number_or_name, str,
+ int ret = extcommunity_list_set(bgp_clist, cl_number_or_name, str, seq,
direct, style);
XFREE(MTYPE_TMP, str);
DEFUN (extcommunity_list_name_expanded,
bgp_extcommunity_list_name_expanded_cmd,
- "bgp extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+ "bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> LINE...",
BGP_STR
EXTCOMMUNITY_LIST_STR
"Extended Community list number (expanded)\n"
"Specify expanded extcommunity-list\n"
"Extended Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
"An ordered list as a regular-expression\n")
int style = EXTCOMMUNITY_LIST_EXPANDED;
int direct = 0;
char *cl_number_or_name = NULL;
+ char *seq = NULL;
int idx = 0;
argv_find(argv, argc, "(100-500)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg;
+
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
: COMMUNITY_DENY;
argv_find(argv, argc, "LINE", &idx);
char *str = argv_concat(argv, argc, idx);
- int ret = extcommunity_list_set(bgp_clist, cl_number_or_name, str,
+ int ret = extcommunity_list_set(bgp_clist, cl_number_or_name, str, seq,
direct, style);
XFREE(MTYPE_TMP, str);
DEFUN (no_extcommunity_list_standard_all,
no_bgp_extcommunity_list_standard_all_cmd,
- "no bgp extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+ "no bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...",
NO_STR
BGP_STR
EXTCOMMUNITY_LIST_STR
"Extended Community list number (standard)\n"
"Specify standard extcommunity-list\n"
"Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
EXTCOMMUNITY_VAL_STR)
int direct = 0;
char *cl_number_or_name = NULL;
char *str = NULL;
+ char *seq = NULL;
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
argv_find(argv, argc, "permit", &idx);
argv_find(argv, argc, "deny", &idx);
-
if (idx) {
direct = argv_find(argv, argc, "permit", &idx)
? COMMUNITY_PERMIT
cl_number_or_name = argv[idx]->arg;
int ret = extcommunity_list_unset(bgp_clist, cl_number_or_name, str,
- direct, style);
+ seq, direct, style);
XFREE(MTYPE_TMP, str);
DEFUN (no_extcommunity_list_expanded_all,
no_bgp_extcommunity_list_expanded_all_cmd,
- "no bgp extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+ "no bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> LINE...",
NO_STR
BGP_STR
EXTCOMMUNITY_LIST_STR
"Extended Community list number (expanded)\n"
"Specify expanded extcommunity-list\n"
"Extended Community list name\n"
+ "Sequence number of an entry\n"
+ "Sequence number\n"
"Specify community to reject\n"
"Specify community to accept\n"
"An ordered list as a regular-expression\n")
int direct = 0;
char *cl_number_or_name = NULL;
char *str = NULL;
+ char *seq = NULL;
int idx = 0;
+ argv_find(argv, argc, "(1-4294967295)", &idx);
+ if (idx)
+ seq = argv[idx]->arg;
+
+ idx = 0;
argv_find(argv, argc, "permit", &idx);
argv_find(argv, argc, "deny", &idx);
cl_number_or_name = argv[idx]->arg;
int ret = extcommunity_list_unset(bgp_clist, cl_number_or_name, str,
- direct, style);
+ seq, direct, style);
XFREE(MTYPE_TMP, str);
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp community-list %s %s %s\n", list->name,
+ vty_out(vty,
+ "bgp community-list %s seq %" PRId64 " %s %s\n",
+ list->name, entry->seq,
community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp community-list %s %s %s %s\n",
+ vty_out(vty,
+ "bgp community-list %s %s seq %" PRId64 " %s %s\n",
entry->style == COMMUNITY_LIST_STANDARD
? "standard"
: "expanded",
- list->name, community_direct_str(entry->direct),
+ list->name, entry->seq,
+ community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp extcommunity-list %s %s %s\n",
- list->name, community_direct_str(entry->direct),
+ vty_out(vty,
+ "bgp extcommunity-list %s seq %" PRId64 " %s %s\n",
+ list->name, entry->seq,
+ community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp extcommunity-list %s %s %s %s\n",
+ vty_out(vty,
+ "bgp extcommunity-list %s %s seq %" PRId64
+ " %s %s\n",
entry->style == EXTCOMMUNITY_LIST_STANDARD
? "standard"
: "expanded",
- list->name, community_direct_str(entry->direct),
+ list->name, entry->seq,
+ community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
for (list = cm->num.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp large-community-list %s %s %s\n",
- list->name, community_direct_str(entry->direct),
+ vty_out(vty,
+ "bgp large-community-list %s seq %" PRId64
+ " %s %s\n",
+ list->name, entry->seq,
+ community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
for (list = cm->str.head; list; list = list->next)
for (entry = list->head; entry; entry = entry->next) {
- vty_out(vty, "bgp large-community-list %s %s %s %s\n",
+ vty_out(vty,
+ "bgp large-community-list %s %s seq %" PRId64
+ " %s %s\n",
+
entry->style == LARGE_COMMUNITY_LIST_STANDARD
? "standard"
: "expanded",
- list->name, community_direct_str(entry->direct),
+ list->name, entry->seq, community_direct_str(entry->direct),
community_list_config_str(entry));
write++;
}
install_element(CONFIG_NODE, &bgp_lcommunity_list_expanded_cmd);
install_element(CONFIG_NODE, &bgp_lcommunity_list_name_standard_cmd);
install_element(CONFIG_NODE, &bgp_lcommunity_list_name_expanded_cmd);
- install_element(CONFIG_NODE, &no_bgp_lcommunity_list_standard_all_cmd);
+ install_element(CONFIG_NODE, &no_bgp_lcommunity_list_all_cmd);
+ install_element(CONFIG_NODE,
+ &no_bgp_lcommunity_list_name_standard_all_cmd);
install_element(CONFIG_NODE,
&no_bgp_lcommunity_list_name_expanded_all_cmd);
install_element(CONFIG_NODE, &no_bgp_lcommunity_list_standard_cmd);