"Route map reference\n"
"Pointer to route-map entries\n")
{
+ int idx_afi = 1;
+ int idx_protocol = 2;
+ int idx_level = 3;
+ int idx_metric_rmap = 4;
struct isis_area *area = vty->index;
int family;
int afi;
if (argc < 5)
return CMD_WARNING;
- family = str2family(argv[1]->arg);
+ family = str2family(argv[idx_afi]->arg);
if (family < 0)
return CMD_WARNING;
if (!afi)
return CMD_WARNING;
- type = proto_redistnum(afi, argv[2]->arg);
+ type = proto_redistnum(afi, argv[idx_protocol]->arg);
if (type < 0 || type == ZEBRA_ROUTE_ISIS)
return CMD_WARNING;
- if (!strcmp("level-1", argv[3]->arg))
+ if (!strcmp("level-1", argv[idx_level]->arg))
level = 1;
- else if (!strcmp("level-2", argv[3]->arg))
+ else if (!strcmp("level-2", argv[idx_level]->arg))
level = 2;
else
return CMD_WARNING;
return CMD_WARNING;
}
- if (argv[4]->arg)
+ if (argv[idx_metric_rmap]->arg)
{
char *endp;
- metric = strtoul(argv[4]->arg, &endp, 10);
- if (argv[4]->arg[0] == '\0' || *endp != '\0')
+ metric = strtoul(argv[idx_metric_rmap]->arg, &endp, 10);
+ if (argv[idx_metric_rmap]->arg[0] == '\0' || *endp != '\0')
return CMD_WARNING;
}
else
"Redistribute into level-1\n"
"Redistribute into level-2\n")
{
+ int idx_afi = 2;
+ int idx_protocol = 3;
+ int idx_level = 4;
struct isis_area *area = vty->index;
int type;
int level;
if (argc < 3)
return CMD_WARNING;
- family = str2family(argv[2]->arg);
+ family = str2family(argv[idx_afi]->arg);
if (family < 0)
return CMD_WARNING;
if (!afi)
return CMD_WARNING;
- type = proto_redistnum(afi, argv[3]->arg);
+ type = proto_redistnum(afi, argv[idx_protocol]->arg);
if (type < 0 || type == ZEBRA_ROUTE_ISIS)
return CMD_WARNING;
- if (!strcmp("level-1", argv[4]->arg))
+ if (!strcmp("level-1", argv[idx_level]->arg))
level = 1;
- else if (!strcmp("level-2", argv[4]->arg))
+ else if (!strcmp("level-2", argv[idx_level]->arg))
level = 2;
else
return CMD_WARNING;
"Route map reference\n"
"Pointer to route-map entries\n")
{
+ int idx_afi = 2;
+ int idx_level = 3;
+ int idx_metric_rmap = 4;
struct isis_area *area = vty->index;
int family;
int originate_type;
if (argc < 5)
return CMD_WARNING;
- family = str2family(argv[2]->arg);
+ family = str2family(argv[idx_afi]->arg);
if (family < 0)
return CMD_WARNING;
- if (!strcmp("level-1", argv[3]->arg))
+ if (!strcmp("level-1", argv[idx_level]->arg))
level = 1;
- else if (!strcmp("level-2", argv[3]->arg))
+ else if (!strcmp("level-2", argv[idx_level]->arg))
level = 2;
else
return CMD_WARNING;
return CMD_WARNING;
}
- if (argv[4]->arg && *argv[4]->arg != '\0')
+ if (argv[idx_metric_rmap]->arg && *argv[idx_metric_rmap]->arg != '\0')
originate_type = DEFAULT_ORIGINATE_ALWAYS;
else
originate_type = DEFAULT_ORIGINATE;
"Distribute default route into level-1\n"
"Distribute default route into level-2\n")
{
+ int idx_afi = 3;
+ int idx_level = 4;
struct isis_area *area = vty->index;
int family;
if (argc < 2)
return CMD_WARNING;
- family = str2family(argv[3]->arg);
+ family = str2family(argv[idx_afi]->arg);
if (family < 0)
return CMD_WARNING;
- if (!strcmp("level-1", argv[4]->arg))
+ if (!strcmp("level-1", argv[idx_level]->arg))
level = 1;
- else if (!strcmp("level-2", argv[4]->arg))
+ else if (!strcmp("level-2", argv[idx_level]->arg))
level = 2;
else
return CMD_WARNING;
"IS-IS Routing for IP\n"
"Routing process tag\n")
{
+ int idx_afi = 0;
+ int idx_word = 3;
struct interface *ifp;
struct isis_circuit *circuit;
struct isis_area *area;
- const char *af = argv[0]->arg;
- const char *area_tag = argv[3]->arg;
+ const char *af = argv[idx_afi]->arg;
+ const char *area_tag = argv[idx_word]->arg;
ifp = (struct interface *) vty->index;
assert (ifp);
"IS-IS Routing for IP\n"
"Routing process tag\n")
{
+ int idx_afi = 1;
+ int idx_word = 4;
struct interface *ifp;
struct isis_area *area;
struct isis_circuit *circuit;
- const char *af = argv[1]->arg;
- const char *area_tag = argv[4]->arg;
+ const char *af = argv[idx_afi]->arg;
+ const char *area_tag = argv[idx_word]->arg;
ifp = (struct interface *) vty->index;
if (!ifp)
if (!area)
{
vty_out (vty, "Can't find ISIS instance %s%s",
- argv[1]->arg, VTY_NEWLINE);
+ argv[idx_afi]->arg, VTY_NEWLINE);
return CMD_ERR_NO_MATCH;
}
"Level-1-2 adjacencies are formed\n"
"Level-2 only adjacencies are formed\n")
{
+ int idx_level = 2;
int is_type;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- is_type = string2circuit_t (argv[2]->arg);
+ is_type = string2circuit_t (argv[idx_level]->arg);
if (!is_type)
{
vty_out (vty, "Unknown circuit-type %s", VTY_NEWLINE);
"Cleartext password\n"
"Circuit password\n")
{
+ int idx_encryption = 2;
+ int idx_word = 3;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
int rv;
if (!circuit)
return CMD_ERR_NO_MATCH;
- if (argv[2]->arg[0] == 'm')
- rv = isis_circuit_passwd_hmac_md5_set(circuit, argv[3]->arg);
+ if (argv[idx_encryption]->arg[0] == 'm')
+ rv = isis_circuit_passwd_hmac_md5_set(circuit, argv[idx_word]->arg);
else
- rv = isis_circuit_passwd_cleartext_set(circuit, argv[3]->arg);
+ rv = isis_circuit_passwd_cleartext_set(circuit, argv[idx_word]->arg);
if (rv)
{
vty_out (vty, "Too long circuit password (>254)%s", VTY_NEWLINE);
"Set priority for Designated Router election\n"
"Priority value\n")
{
+ int idx_number = 2;
int prio;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- prio = atoi (argv[2]->arg);
+ prio = atoi (argv[idx_number]->arg);
if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
{
vty_out (vty, "Invalid priority %d - should be <0-127>%s",
"Priority value\n"
"Specify priority for level-1 routing\n")
{
+ int idx_number = 2;
int prio;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- prio = atoi (argv[2]->arg);
+ prio = atoi (argv[idx_number]->arg);
if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
{
vty_out (vty, "Invalid priority %d - should be <0-127>%s",
"Priority value\n"
"Specify priority for level-2 routing\n")
{
+ int idx_number = 2;
int prio;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- prio = atoi (argv[2]->arg);
+ prio = atoi (argv[idx_number]->arg);
if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
{
vty_out (vty, "Invalid priority %d - should be <0-127>%s",
"Set default metric for circuit\n"
"Default metric value\n")
{
+ int idx_number = 2;
int met;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- met = atoi (argv[2]->arg);
+ met = atoi (argv[idx_number]->arg);
/* RFC3787 section 5.1 */
if (circuit->area && circuit->area->oldmetric == 1 &&
"Default metric value\n"
"Specify metric for level-1 routing\n")
{
+ int idx_number = 2;
int met;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- met = atoi (argv[2]->arg);
+ met = atoi (argv[idx_number]->arg);
/* RFC3787 section 5.1 */
if (circuit->area && circuit->area->oldmetric == 1 &&
"Default metric value\n"
"Specify metric for level-2 routing\n")
{
+ int idx_number = 2;
int met;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- met = atoi (argv[2]->arg);
+ met = atoi (argv[idx_number]->arg);
/* RFC3787 section 5.1 */
if (circuit->area && circuit->area->oldmetric == 1 &&
"Hello interval value\n"
"Holdtime 1 seconds, interval depends on multiplier\n")
{
+ int idx_number = 2;
int interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
{
vty_out (vty, "Invalid hello-interval %d - should be <1-600>%s",
"Holdtime 1 second, interval depends on multiplier\n"
"Specify hello-interval for level-1 IIHs\n")
{
+ int idx_number = 2;
long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
{
vty_out (vty, "Invalid hello-interval %ld - should be <1-600>%s",
"Holdtime 1 second, interval depends on multiplier\n"
"Specify hello-interval for level-2 IIHs\n")
{
+ int idx_number = 2;
long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
{
vty_out (vty, "Invalid hello-interval %ld - should be <1-600>%s",
"Set multiplier for Hello holding time\n"
"Hello multiplier value\n")
{
+ int idx_number = 2;
int mult;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- mult = atoi (argv[2]->arg);
+ mult = atoi (argv[idx_number]->arg);
if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
{
vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
"Hello multiplier value\n"
"Specify hello multiplier for level-1 IIHs\n")
{
+ int idx_number = 2;
int mult;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- mult = atoi (argv[2]->arg);
+ mult = atoi (argv[idx_number]->arg);
if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
{
vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
"Hello multiplier value\n"
"Specify hello multiplier for level-2 IIHs\n")
{
+ int idx_number = 2;
int mult;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- mult = atoi (argv[2]->arg);
+ mult = atoi (argv[idx_number]->arg);
if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
{
vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
"Set CSNP interval in seconds\n"
"CSNP interval value\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
{
vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
"CSNP interval value\n"
"Specify interval for level-1 CSNPs\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
{
vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
"CSNP interval value\n"
"Specify interval for level-2 CSNPs\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
{
vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
"Set PSNP interval in seconds\n"
"PSNP interval value\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
{
vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
"PSNP interval value\n"
"Specify interval for level-1 PSNPs\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
{
vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
"PSNP interval value\n"
"Specify interval for level-2 PSNPs\n")
{
+ int idx_number = 2;
unsigned long interval;
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
return CMD_ERR_NO_MATCH;
- interval = atol (argv[2]->arg);
+ interval = atol (argv[idx_number]->arg);
if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
{
vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
"Send and accept both styles of TLVs during transition\n"
"Use new style of TLVs to carry wider metric\n")
{
+ int idx_metric_style = 1;
struct isis_area *area = vty->index;
int ret;
assert(area);
- if (strncmp (argv[1]->arg, "w", 1) == 0)
+ if (strncmp (argv[idx_metric_style]->arg, "w", 1) == 0)
{
isis_area_metricstyle_set(area, false, true);
return CMD_SUCCESS;
if (ret != CMD_SUCCESS)
return ret;
- if (strncmp (argv[1]->arg, "t", 1) == 0)
+ if (strncmp (argv[idx_metric_style]->arg, "t", 1) == 0)
isis_area_metricstyle_set(area, true, true);
- else if (strncmp (argv[1]->arg, "n", 1) == 0)
+ else if (strncmp (argv[idx_metric_style]->arg, "n", 1) == 0)
isis_area_metricstyle_set(area, true, false);
return CMD_SUCCESS;
"Configure the maximum size of generated LSPs\n"
"Maximum size of generated LSPs\n")
{
+ int idx_number = 1;
unsigned int lsp_mtu;
- VTY_GET_INTEGER_RANGE("lsp-mtu", lsp_mtu, argv[1]->arg, 128, 4352);
+ VTY_GET_INTEGER_RANGE("lsp-mtu", lsp_mtu, argv[idx_number]->arg, 128, 4352);
return area_lsp_mtu_set(vty, lsp_mtu);
}
"Act as both a station router and an area router\n"
"Act as an area router only\n")
{
+ int idx_level = 1;
struct isis_area *area;
int type;
return CMD_ERR_NO_MATCH;
}
- type = string2circuit_t (argv[1]->arg);
+ type = string2circuit_t (argv[idx_level]->arg);
if (!type)
{
vty_out (vty, "Unknown IS level %s", VTY_NEWLINE);
"Minimum interval between regenerating same LSP\n"
"Minimum interval in seconds\n")
{
+ int idx_number = 1;
struct isis_area *area;
uint16_t interval;
int level;
area = vty->index;
- interval = atoi (argv[1]->arg);
+ interval = atoi (argv[idx_number]->arg);
level = IS_LEVEL_1 | IS_LEVEL_2;
return set_lsp_gen_interval (vty, area, interval, level);
}
"Set interval for level 1 only\n"
"Minimum interval in seconds\n")
{
+ int idx_number = 2;
struct isis_area *area;
uint16_t interval;
int level;
area = vty->index;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
level = IS_LEVEL_1;
return set_lsp_gen_interval (vty, area, interval, level);
}
"Set interval for level 2 only\n"
"Minimum interval in seconds\n")
{
+ int idx_number = 2;
struct isis_area *area;
uint16_t interval;
int level;
area = vty->index;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
level = IS_LEVEL_2;
return set_lsp_gen_interval (vty, area, interval, level);
}
"Minimum interval between SPF calculations\n"
"Minimum interval between consecutive SPFs in seconds\n")
{
+ int idx_number = 1;
struct isis_area *area;
u_int16_t interval;
area = vty->index;
- interval = atoi (argv[1]->arg);
+ interval = atoi (argv[idx_number]->arg);
area->min_spf_interval[0] = interval;
area->min_spf_interval[1] = interval;
"Set interval for level 1 only\n"
"Minimum interval between consecutive SPFs in seconds\n")
{
+ int idx_number = 2;
struct isis_area *area;
u_int16_t interval;
area = vty->index;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
area->min_spf_interval[0] = interval;
return CMD_SUCCESS;
"Set interval for level 2 only\n"
"Minimum interval between consecutive SPFs in seconds\n")
{
+ int idx_number = 2;
struct isis_area *area;
u_int16_t interval;
area = vty->index;
- interval = atoi (argv[2]->arg);
+ interval = atoi (argv[idx_number]->arg);
area->min_spf_interval[1] = interval;
return CMD_SUCCESS;
"Maximum LSP lifetime\n"
"LSP lifetime in seconds\n")
{
- return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, atoi(argv[1]->arg));
+ int idx_number = 1;
+ return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, atoi(argv[idx_number]->arg));
}
/*
"Maximum LSP lifetime for Level 1 only\n"
"LSP lifetime for Level 1 only in seconds\n")
{
- return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, atoi(argv[2]->arg));
+ int idx_number = 2;
+ return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, atoi(argv[idx_number]->arg));
}
/*
"Maximum LSP lifetime for Level 2 only\n"
"LSP lifetime for Level 2 only in seconds\n")
{
- return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, atoi(argv[2]->arg));
+ int idx_number = 2;
+ return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, atoi(argv[idx_number]->arg));
}
/*
"LSP refresh interval\n"
"LSP refresh interval in seconds\n")
{
- return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, atoi(argv[1]->arg));
+ int idx_number = 1;
+ return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, atoi(argv[idx_number]->arg));
}
/*
"LSP refresh interval for Level 1 only\n"
"LSP refresh interval for Level 1 only in seconds\n")
{
- return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, atoi(argv[2]->arg));
+ int idx_number = 2;
+ return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, atoi(argv[idx_number]->arg));
}
/*
"LSP refresh interval for Level 2 only\n"
"LSP refresh interval for Level 2 only in seconds\n")
{
- return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, atoi(argv[2]->arg));
+ int idx_number = 2;
+ return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, atoi(argv[idx_number]->arg));
}
/*
"Authentication type\n"
"Level-wide password\n")
{
+ int idx_password = 0;
+ int idx_word = 2;
u_char snp_auth = 0;
- int level = (argv[0]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
+ int level = (argv[idx_password]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
if (argc > 2)
{
}
return area_passwd_set(vty, level, isis_area_passwd_hmac_md5_set,
- argv[2]->arg, snp_auth);
+ argv[idx_word]->arg, snp_auth);
}
"Authentication type\n"
"Area password\n")
{
+ int idx_password = 0;
+ int idx_word = 2;
u_char snp_auth = 0;
- int level = (argv[0]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
+ int level = (argv[idx_password]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
if (argc > 2)
{
}
return area_passwd_set(vty, level, isis_area_passwd_cleartext_set,
- argv[2]->arg, snp_auth);
+ argv[idx_word]->arg, snp_auth);
}
"Configure the authentication password for an area\n"
"Set the authentication password for a routing domain\n")
{
- int level = (argv[1]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
+ int idx_password = 1;
+ int level = (argv[idx_password]->arg[0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
struct isis_area *area = vty->index;
if (!area)
"ISIS interface\n"
"ISIS interface name\n")
{
- return show_isis_interface_common (vty, argv[3]->arg, ISIS_UI_LEVEL_DETAIL);
+ int idx_word = 3;
+ return show_isis_interface_common (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL);
}
/*
"ISIS neighbor adjacencies\n"
"System id\n")
{
- return show_isis_neighbor_common (vty, argv[3]->arg, ISIS_UI_LEVEL_DETAIL);
+ int idx_word = 3;
+ return show_isis_neighbor_common (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL);
}
DEFUN (clear_isis_neighbor,
"ISIS neighbor adjacencies\n"
"System id\n")
{
- return clear_isis_neighbor_common (vty, argv[3]->arg);
+ int idx_word = 3;
+ return clear_isis_neighbor_common (vty, argv[idx_word]->arg);
}
/*
"IS-IS link state database\n"
"LSP ID\n")
{
- return show_isis_database (vty, argv[3]->arg, ISIS_UI_LEVEL_BRIEF);
+ int idx_word = 3;
+ return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_BRIEF);
}
DEFUN (show_database_lsp_detail,
"LSP ID\n"
"Detailed information\n")
{
- return show_isis_database (vty, argv[3]->arg, ISIS_UI_LEVEL_DETAIL);
+ int idx_word = 3;
+ return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL);
}
DEFUN (show_database_detail,
"Detailed information\n"
"LSP ID\n")
{
- return show_isis_database (vty, argv[4]->arg, ISIS_UI_LEVEL_DETAIL);
+ int idx_word = 4;
+ return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL);
}
/*
"ISO IS-IS\n"
"ISO Routing area tag")
{
- return isis_area_get (vty, argv[2]->arg);
+ int idx_word = 2;
+ return isis_area_get (vty, argv[idx_word]->arg);
}
/*
"no router isis WORD",
"no\n" ROUTER_STR "ISO IS-IS\n" "ISO Routing area tag")
{
- return isis_area_destroy (vty, argv[3]->arg);
+ int idx_word = 3;
+ return isis_area_destroy (vty, argv[idx_word]->arg);
}
/*
"A Network Entity Title for this process (OSI only)\n"
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
{
- return area_net_title (vty, argv[1]->arg);
+ int idx_word = 1;
+ return area_net_title (vty, argv[idx_word]->arg);
}
/*
"A Network Entity Title for this process (OSI only)\n"
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
{
- return area_clear_net_title (vty, argv[2]->arg);
+ int idx_word = 2;
+ return area_clear_net_title (vty, argv[idx_word]->arg);
}
void isis_area_lsp_mtu_set(struct isis_area *area, unsigned int lsp_mtu)
"A Network IS Base for this topology\n"
"XXXX.XXXX.XXXX Network entity title (NET)\n")
{
+ int idx_word = 2;
struct isis_area *area;
u_char buff[ISIS_SYS_ID_LEN];
area = vty->index;
assert (area);
- if (sysid2buff (buff, argv[2]->arg))
- sysid2buff (area->topology_baseis, argv[2]->arg);
+ if (sysid2buff (buff, argv[idx_word]->arg))
+ sysid2buff (area->topology_baseis, argv[idx_word]->arg);
return CMD_SUCCESS;
}
"Dynamic hostname base for this topology\n"
"Dynamic hostname base\n")
{
+ int idx_word = 2;
struct isis_area *area;
area = vty->index;
assert (area);
/* I hope that it's enough. */
- area->topology_basedynh = strndup (argv[2]->arg, 16);
+ area->topology_basedynh = strndup (argv[idx_word]->arg, 16);
return CMD_SUCCESS;
}