diff options
-rwxr-xr-x | tools/argv_translator.py | 24 | ||||
-rw-r--r-- | zebra/debug.c | 22 | ||||
-rw-r--r-- | zebra/interface.c | 69 | ||||
-rw-r--r-- | zebra/irdp_interface.c | 18 | ||||
-rw-r--r-- | zebra/router-id.c | 2 | ||||
-rw-r--r-- | zebra/rtadv.c | 33 | ||||
-rw-r--r-- | zebra/test_main.c | 2 | ||||
-rw-r--r-- | zebra/zebra_routemap.c | 90 | ||||
-rw-r--r-- | zebra/zebra_vty.c | 476 |
9 files changed, 378 insertions, 358 deletions
diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 8547715d3..f21e99d08 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -30,6 +30,11 @@ def token_is_variable(line_number, token): if token in ('WORD', '.LINE', # where is this defined? 'LINE', + 'BANDWIDTH', + 'INTERFACE', + 'PERCENTAGE', + 'IFNAME', + 'NAME', 'BITPATTERN', 'PATH', 'A.B.C.D', @@ -133,12 +138,15 @@ def get_argv_translator(line_number, line): old_style_index = 0 for (token_index, token) in enumerate(line_to_tokens(line)): + if not token: + continue + if token_is_variable(line_number, token): - # print "%s is a token" % token + print "%s is a token" % token table[old_style_index] = token_index old_style_index += 1 else: - # print "%s is NOT a token" % token + print "%s is NOT a token" % token pass return table @@ -159,7 +167,7 @@ def update_argvs(filename): if state is None: if line.startswith('DEFUN ('): - assert line.count(',') == 1, "Too many commas in\n%s" % line + assert line.count(',') == 1, "%d: Too many commas in\n%s" % (line_number, line) state = 'DEFUN_HEADER' defun_line_number = line_number @@ -185,6 +193,10 @@ def update_argvs(filename): line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD "', '(kernel|connected|static|ripng|ospf6|isis|table)') line = line.replace('" OSPF_LSA_TYPES_CMD_STR "', 'asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as') line = line.replace('" QUAGGA_REDIST_STR_OSPFD "', '(kernel|connected|static|rip|isis|bgp|pim|table)') + line = line.replace('" VRF_CMD_STR "', 'vrf NAME') + line = line.replace('" VRF_ALL_CMD_STR "', 'vrf all') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|ripng|ospf6|isis|bgp|table|any)') # endswith line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",') @@ -201,6 +213,12 @@ def update_argvs(filename): line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD,', ' (kernel|connected|static|rip|ospf|isis|pim|table)",') line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD,', ' (kernel|connected|static|ripng|ospf6|isis|table)",') line = line.replace('" QUAGGA_REDIST_STR_OSPFD,', ' (kernel|connected|static|rip|isis|bgp|pim|table)",') + line = line.replace('" VRF_CMD_STR,', ' vrf NAME",') + line = line.replace('" VRF_ALL_CMD_STR,', ' vrf all",') + line = line.replace('" QUAGGA_IP_REDIST_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table)",') + line = line.replace('" QUAGGA_IP6_REDIST_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table)",') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)",') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table|any)",') # startswith line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ') diff --git a/zebra/debug.c b/zebra/debug.c index cdf233879..fb3887c67 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -131,11 +131,11 @@ DEFUN (debug_zebra_packet_direct, "Debug option set for send packet\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[0], strlen (argv[0])) == 0) + if (strncmp ("detail", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; } @@ -151,9 +151,9 @@ DEFUN (debug_zebra_packet_detail, "Debug option set detailed information\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; @@ -180,9 +180,9 @@ DEFUN (debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (argv[4]->arg && strncmp(argv[4]->arg, "recv", strlen(argv[4]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[4]->arg || strncmp(argv[4]->arg, "send", strlen(argv[4]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } @@ -267,9 +267,9 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[4]->arg, strlen (argv[4]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[4]->arg, strlen (argv[4]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -296,9 +296,9 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (!argv[1] || (argv[5]->arg && strncmp(argv[5]->arg, "recv", strlen(argv[5]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[5]->arg || (argv[5]->arg && strncmp(argv[5]->arg, "send", strlen(argv[5]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } diff --git a/zebra/interface.c b/zebra/interface.c index 9be97e221..737bf9665 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1305,7 +1305,8 @@ struct cmd_node vrf_node = }; /* Show all interfaces to vty. */ -DEFUN (show_interface, show_interface_cmd, +DEFUN (show_interface, + show_interface_cmd, "show interface", SHOW_STR "Interface status and configuration\n") @@ -1317,7 +1318,7 @@ DEFUN (show_interface, show_interface_cmd, interface_update_stats (); if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[2]->arg); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1334,7 +1335,8 @@ ALIAS (show_interface, VRF_CMD_HELP_STR) /* Show all interfaces to vty. */ -DEFUN (show_interface_vrf_all, show_interface_vrf_all_cmd, +DEFUN (show_interface_vrf_all, + show_interface_vrf_all_cmd, "show interface " VRF_ALL_CMD_STR, SHOW_STR "Interface status and configuration\n" @@ -1370,13 +1372,13 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + VRF_GET_ID (vrf_id, argv[3]->arg); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_id); + ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], + vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1386,7 +1388,8 @@ DEFUN (show_interface_name_vrf, } /* Show specified interface to vty. */ -DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, +DEFUN (show_interface_name_vrf_all, + show_interface_name_vrf_all_cmd, "show interface IFNAME " VRF_ALL_CMD_STR, SHOW_STR "Interface status and configuration\n" @@ -1403,7 +1406,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1413,7 +1416,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, if (!found) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1476,7 +1479,7 @@ DEFUN (show_interface_desc, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); if_show_description (vty, vrf_id); @@ -1679,7 +1682,7 @@ DEFUN (bandwidth_if, unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[0], NULL, 10); + bandwidth = strtol(argv[1]->arg, NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1843,7 +1846,7 @@ DEFUN (link_params_metric, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t metric; - VTY_GET_ULONG("metric", metric, argv[0]); + VTY_GET_ULONG("metric", metric, argv[1]->arg); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,7 +1879,7 @@ DEFUN (link_params_maxbw, float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1919,7 +1922,7 @@ DEFUN (link_params_max_rsv_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1954,14 +1957,14 @@ DEFUN (link_params_unrsv_bw, float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[0], "%d", &priority) != 1) + if (sscanf (argv[1]->arg, "%d", &priority) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); return CMD_WARNING; } - if (sscanf (argv[1], "%g", &bw) != 1) + if (sscanf (argv[2]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1993,7 +1996,7 @@ DEFUN (link_params_admin_grp, struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[0], "0x%lx", &value) != 1) + if (sscanf (argv[1]->arg, "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2035,13 +2038,13 @@ DEFUN (link_params_inter_as, struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[0], &addr)) + if (!inet_aton (argv[1]->arg, &addr)) { vty_out (vty, "Please specify Router-Addr by A.B.C.D%s", VTY_NEWLINE); return CMD_WARNING; } - VTY_GET_ULONG("AS number", as, argv[1]); + VTY_GET_ULONG("AS number", as, argv[3]->arg); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2096,7 +2099,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[0]); + VTY_GET_ULONG("delay", delay, argv[1]->arg); switch (argc) { case 1: @@ -2130,8 +2133,8 @@ DEFUN (link_params_delay, return CMD_WARNING; break; case 3: - VTY_GET_ULONG("minimum delay", low, argv[1]); - VTY_GET_ULONG("maximum delay", high, argv[2]); + VTY_GET_ULONG("minimum delay", low, argv[3]->arg); + VTY_GET_ULONG("maximum delay", high, argv[5]->arg); /* Check new delays value coherency */ if (delay <= low || delay >= high) { @@ -2209,7 +2212,7 @@ DEFUN (link_params_delay_var, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t value; - VTY_GET_ULONG("delay variation", value, argv[0]); + VTY_GET_ULONG("delay variation", value, argv[1]->arg); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2241,7 +2244,7 @@ DEFUN (link_params_pkt_loss, struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[0], "%g", &fval) != 1) + if (sscanf (argv[1]->arg, "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2281,7 +2284,7 @@ DEFUN (link_params_res_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2327,7 +2330,7 @@ DEFUN (link_params_ava_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2373,7 +2376,7 @@ DEFUN (link_params_use_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2557,7 +2560,7 @@ DEFUN (ip_address, "Set the IP address of an interface\n" "IP address (e.g. 10.0.0.1/8)\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, NULL); + return ip_address_install (vty, vty->index, argv[2]->arg, NULL, NULL); } DEFUN (no_ip_address, @@ -2568,7 +2571,7 @@ DEFUN (no_ip_address, "Set the IP address of an interface\n" "IP Address (e.g. 10.0.0.1/8)") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, NULL); + return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL); } @@ -2582,7 +2585,7 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_install (vty, vty->index, argv[2]->arg, NULL, argv[4]->arg); } DEFUN (no_ip_address_label, @@ -2595,7 +2598,7 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, argv[5]->arg); } #endif /* HAVE_NETLINK */ @@ -2758,7 +2761,7 @@ DEFUN (ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_install (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_install (vty, vty->index, argv[2]->arg, NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2769,7 +2772,7 @@ DEFUN (no_ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 8fb4fcad1..d41373369 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -480,7 +480,7 @@ DEFUN (ip_irdp_holdtime, zi=ifp->info; irdp=&zi->irdp; - irdp->Lifetime = atoi(argv[0]); + irdp->Lifetime = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -503,8 +503,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[0]) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[0]); + if( (unsigned) atoi(argv[3]->arg) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -537,8 +537,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]) ) { - irdp->MaxAdvertInterval = atoi(argv[0]); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[3]->arg) ) { + irdp->MaxAdvertInterval = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -575,7 +575,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[0]); + irdp->Preference = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -605,10 +605,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[3]->arg, &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[1]); + pref = atoi(argv[5]->arg); for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) if(adv->ip.s_addr == ip.s_addr) @@ -649,7 +649,7 @@ DEFUN (no_ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[4]->arg, &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index d5d9652c5..fbd9e2b0c 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -223,7 +223,7 @@ DEFUN (router_id, struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; - rid.u.prefix4.s_addr = inet_addr (argv[0]); + rid.u.prefix4.s_addr = inet_addr (argv[1]->arg); if (!rid.u.prefix4.s_addr) return CMD_WARNING; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index ac297890a..331838e92 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -930,7 +930,7 @@ DEFUN (ipv6_nd_ra_interval_msec, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[4]->arg, 70, 1800000); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -965,7 +965,7 @@ DEFUN (ipv6_nd_ra_interval, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[3]->arg, 1, 1800); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -1045,7 +1045,7 @@ DEFUN (ipv6_nd_ra_lifetime, ifp = (struct interface *) vty->index; zif = ifp->info; - VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0], 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[3]->arg, 0, 9000); /* The value to be placed in the Router Lifetime field * of Router Advertisements sent from the interface, @@ -1100,7 +1100,7 @@ DEFUN (ipv6_nd_reachable_time, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0], 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[3]->arg, 1, RTADV_MAX_REACHABLE_TIME); return CMD_SUCCESS; } @@ -1142,7 +1142,7 @@ DEFUN (ipv6_nd_homeagent_preference, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0], 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[3]->arg, 0, 65535); return CMD_SUCCESS; } @@ -1184,7 +1184,7 @@ DEFUN (ipv6_nd_homeagent_lifetime, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0], 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[3]->arg, 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1366,8 +1366,7 @@ DEFUN (no_ipv6_nd_other_config_flag, DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", + "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" @@ -1390,7 +1389,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0], &rp.prefix); + ret = str2prefix_ipv6 (argv[3]->arg, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1405,19 +1404,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[1][0])) - || strncmp (argv[1], "i", 1) == 0) + if ((isdigit((unsigned char)argv[4]->arg[0])) + || strncmp (argv[4]->arg, "i", 1) == 0) { - if ( strncmp (argv[1], "i", 1) == 0) + if ( strncmp (argv[4]->arg, "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1], + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[4]->arg, (char **)NULL, 10); - if ( strncmp (argv[2], "i", 1) == 0) + if ( strncmp (argv[5]->arg, "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2], + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[5]->arg, (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1810,7 +1809,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[0], rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[3]->arg, rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1861,7 +1860,7 @@ DEFUN (ipv6_nd_mtu, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0], 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[3]->arg, 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index bbaf45028..722151288 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -136,7 +136,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[0][0]) + switch (argv[1]->arg[0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index e6c5a3e91..c70b207d6 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -301,7 +301,7 @@ DEFUN (match_interface, "match first hop interface of route\n" "Interface name\n") { - return zebra_route_match_add (vty, vty->index, "interface", argv[0], + return zebra_route_match_add (vty, vty->index, "interface", argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -333,7 +333,7 @@ DEFUN (match_tag, "Match tag of route\n" "Tag value\n") { - return zebra_route_match_add (vty, vty->index, "tag", argv[0], + return zebra_route_match_add (vty, vty->index, "tag", argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -369,7 +369,7 @@ DEFUN (match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_ADDED); + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); } DEFUN (no_match_ip_next_hop, @@ -409,7 +409,7 @@ DEFUN (match_ip_next_hop_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_next_hop_prefix_list, @@ -452,7 +452,7 @@ DEFUN (match_ip_address, "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip address", argv[0], + return zebra_route_match_add (vty, vty->index, "ip address", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); } @@ -493,7 +493,7 @@ DEFUN (match_ip_address_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_address_prefix_list, @@ -613,15 +613,15 @@ DEFUN (match_source_protocol, { int i; - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, @@ -635,16 +635,16 @@ DEFUN (no_match_source_protocol, if (argc >= 1) { - i = proto_name2num(argv[0]); + i = proto_name2num(argv[3]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[3]->arg ? argv[3]->arg : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[0] ? argv[0] : NULL, + "source-protocol", argv[3]->arg ? argv[3]->arg : NULL, RMAP_EVENT_MATCH_DELETED); } @@ -663,9 +663,9 @@ DEFUN (set_src, struct prefix p; vrf_iter_t iter; - if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[2]->arg, &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[0], &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[2]->arg, &src.ipv6) != 1) { vty_out (vty, "%% not a valid IPv4/v6 address%s", VTY_NEWLINE); return CMD_WARNING; @@ -706,7 +706,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[0]); + return zebra_route_set_add (vty, vty->index, "src", argv[2]->arg); } DEFUN (no_set_src, @@ -719,7 +719,7 @@ DEFUN (no_set_src, if (argc == 0) return zebra_route_set_delete (vty, vty->index, "src", NULL); - return zebra_route_set_delete (vty, vty->index, "src", argv[0]); + return zebra_route_set_delete (vty, vty->index, "src", argv[3]->arg); } DEFUN (zebra_route_map_timer, @@ -730,7 +730,7 @@ DEFUN (zebra_route_map_timer, { u_int32_t rmap_delay_timer; - VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0], 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[3]->arg, 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -766,13 +766,13 @@ DEFUN (ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -787,7 +787,7 @@ DEFUN (ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[2]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -804,13 +804,13 @@ DEFUN (no_ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -825,7 +825,7 @@ DEFUN (no_ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[4]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -879,13 +879,13 @@ DEFUN (ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -900,7 +900,7 @@ DEFUN (ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[2]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -917,13 +917,13 @@ DEFUN (no_ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -938,7 +938,7 @@ DEFUN (no_ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[4]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -993,13 +993,13 @@ DEFUN (ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1027,13 +1027,13 @@ DEFUN (no_ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1097,13 +1097,13 @@ DEFUN (ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1125,13 +1125,13 @@ DEFUN (no_ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a7ee63d87..dfcf1829d 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,7 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argc > 2 ? argv[4]->arg : NULL, NULL); } ALIAS (ip_mroute_dist, @@ -213,7 +213,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argc > 2 ? argv[5]->arg : NULL, NULL); } ALIAS (no_ip_mroute_dist, @@ -239,15 +239,15 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with longer prefix\n") { - if (!strncmp (argv[0], "u", 1)) + if (!strncmp (argv[3]->arg, "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[0], "mrib-o", 6)) + else if (!strncmp (argv[3]->arg, "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[0], "mrib-t", 6)) + else if (!strncmp (argv[3]->arg, "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[0], "low", 3)) + else if (!strncmp (argv[3]->arg, "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[0], "lon", 3)) + else if (!strncmp (argv[3]->arg, "lon", 3)) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -306,7 +306,7 @@ DEFUN (show_ip_rpf_addr, struct rib *rib; int ret; - ret = inet_aton (argv[0], &addr); + ret = inet_aton (argv[3]->arg, &addr); if (ret == 0) { vty_out (vty, "%% Malformed address%s", VTY_NEWLINE); @@ -334,7 +334,7 @@ DEFUN (ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, NULL); } @@ -350,7 +350,7 @@ DEFUN (ip_route_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, NULL); } @@ -365,7 +365,7 @@ DEFUN (ip_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL); } @@ -383,7 +383,7 @@ DEFUN (ip_route_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, NULL); } @@ -396,7 +396,7 @@ DEFUN (ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, NULL); } @@ -412,7 +412,7 @@ DEFUN (ip_route_flags2_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, NULL); } @@ -428,7 +428,7 @@ DEFUN (ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL); } @@ -446,7 +446,7 @@ DEFUN (ip_route_mask_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } @@ -462,7 +462,7 @@ DEFUN (ip_route_mask_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL); } @@ -481,7 +481,7 @@ DEFUN (ip_route_mask_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL); } @@ -495,7 +495,7 @@ DEFUN (ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL); } @@ -511,7 +511,7 @@ DEFUN (ip_route_mask_flags2_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL); } @@ -527,8 +527,8 @@ DEFUN (ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, + argv[4]->arg, NULL); } DEFUN (ip_route_tag_distance, @@ -545,8 +545,8 @@ DEFUN (ip_route_tag_distance, "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, + argv[6]->arg, NULL); } DEFUN (ip_route_flags_distance, @@ -561,8 +561,8 @@ DEFUN (ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_flags_tag_distance, @@ -579,8 +579,8 @@ DEFUN (ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (ip_route_flags_distance2, @@ -593,8 +593,8 @@ DEFUN (ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, + argv[4]->arg, NULL); } DEFUN (ip_route_flags_tag_distance2, @@ -609,8 +609,8 @@ DEFUN (ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, + argv[6]->arg, NULL); } DEFUN (ip_route_mask_distance, @@ -625,8 +625,8 @@ DEFUN (ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_mask_tag_distance, @@ -643,8 +643,8 @@ DEFUN (ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance, @@ -662,8 +662,8 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, + argv[9]->arg, NULL); } @@ -680,8 +680,8 @@ DEFUN (ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (ip_route_mask_flags_distance2, @@ -695,8 +695,8 @@ DEFUN (ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance2, @@ -712,8 +712,8 @@ DEFUN (ip_route_mask_flags_tag_distance2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route, @@ -727,7 +727,7 @@ DEFUN (no_ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, NULL); } @@ -744,7 +744,7 @@ DEFUN (no_ip_route_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } @@ -784,7 +784,7 @@ DEFUN (no_ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, NULL, NULL, NULL); } @@ -800,7 +800,7 @@ DEFUN (no_ip_route_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL, NULL); } @@ -816,7 +816,7 @@ DEFUN (no_ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL); } @@ -834,7 +834,7 @@ DEFUN (no_ip_route_mask_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL); } @@ -877,7 +877,7 @@ DEFUN (no_ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL); } @@ -894,7 +894,7 @@ DEFUN (no_ip_route_mask_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL, NULL); } @@ -910,8 +910,8 @@ DEFUN (no_ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, + argv[5]->arg, NULL); } DEFUN (no_ip_route_tag_distance, @@ -928,8 +928,8 @@ DEFUN (no_ip_route_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route_flags_distance, @@ -945,8 +945,8 @@ DEFUN (no_ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance, @@ -964,8 +964,8 @@ DEFUN (no_ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, + argv[8]->arg, NULL); } DEFUN (no_ip_route_flags_distance2, @@ -979,8 +979,8 @@ DEFUN (no_ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance2, @@ -996,8 +996,8 @@ DEFUN (no_ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route_mask_distance, @@ -1013,8 +1013,8 @@ DEFUN (no_ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_mask_tag_distance, @@ -1032,8 +1032,8 @@ DEFUN (no_ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, + argv[8]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance, @@ -1050,8 +1050,8 @@ DEFUN (no_ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, + argv[7]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance, @@ -1070,8 +1070,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, + argv[9]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance2, @@ -1086,8 +1086,8 @@ DEFUN (no_ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance2, @@ -1104,8 +1104,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, + argv[8]->arg, NULL); } /* Static route configuration. */ @@ -1120,7 +1120,7 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_tag_vrf, @@ -1136,7 +1136,7 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[8]->arg); } DEFUN (ip_route_flags_vrf, @@ -1151,7 +1151,7 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_flags_tag_vrf, @@ -1169,7 +1169,7 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ip_route_flags2_vrf, @@ -1182,7 +1182,7 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_flags2_tag_vrf, @@ -1198,7 +1198,7 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[8]->arg); } /* Mask as A.B.C.D format. */ @@ -1214,7 +1214,7 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_mask_tag_vrf, @@ -1232,7 +1232,7 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ip_route_mask_flags_vrf, @@ -1248,7 +1248,7 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1267,7 +1267,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (ip_route_mask_flags2_vrf, @@ -1281,7 +1281,7 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1297,7 +1297,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } /* Distance option value. */ @@ -1313,7 +1313,7 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ip_route_tag_distance_vrf, @@ -1331,7 +1331,7 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_flags_distance_vrf, @@ -1347,7 +1347,7 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1365,7 +1365,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg,argv[10]->arg); } DEFUN (ip_route_flags_distance2_vrf, @@ -1379,7 +1379,7 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1395,7 +1395,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_mask_distance_vrf, @@ -1411,7 +1411,7 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1429,7 +1429,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } @@ -1466,7 +1466,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1481,7 +1481,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1498,7 +1498,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_vrf, @@ -1513,7 +1513,7 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_flags_vrf, @@ -1529,7 +1529,7 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_tag_vrf, @@ -1546,7 +1546,7 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1564,7 +1564,7 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ip_route_flags2_vrf, @@ -1578,7 +1578,7 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1594,7 +1594,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_mask_vrf, @@ -1610,7 +1610,7 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1627,7 +1627,7 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1645,7 +1645,7 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1664,7 +1664,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1679,7 +1679,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1696,7 +1696,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } @@ -1713,7 +1713,7 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1731,7 +1731,7 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1748,7 +1748,7 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1767,7 +1767,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[11]->arg); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1782,7 +1782,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1799,7 +1799,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2] , argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1816,7 +1816,7 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1835,7 +1835,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1853,7 +1853,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1873,7 +1873,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1889,7 +1889,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1907,7 +1907,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } /* New RIB. Detailed information for IPv4 route. */ @@ -2433,7 +2433,7 @@ DEFUN (show_ip_route_vrf, if (argc == 1 && uj) return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); else - return do_show_ip_route (vty, argv[0], SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[5]->arg, SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -2607,10 +2607,10 @@ DEFUN (show_ip_route_tag, if (argc > 1) { tag = atoi(argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); } else - tag = atoi(argv[0]); + tag = atoi(argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2663,10 +2663,10 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { ret = str2prefix (argv[1], &p); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[3]->arg, &p); if (! ret) { @@ -2773,10 +2773,10 @@ DEFUN (show_ip_route_protocol, if (argc > 1) { type = proto_redistnum (AFI_IP, argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); } else - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[4]->arg); if (type < 0) { @@ -2827,7 +2827,7 @@ DEFUN (show_ip_route_ospf_instance, int first = 1; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[0]); + VTY_GET_INTEGER ("Instance", instance, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); if (! table) @@ -2864,11 +2864,11 @@ DEFUN (show_ip_route_addr, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[3]->arg, &p); if (ret <= 0) { @@ -2919,11 +2919,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[3]->arg, &p); if (ret <= 0) { @@ -3239,8 +3239,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[6]->arg) + tag = atoi(argv[6]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -3293,7 +3293,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[5]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -3332,7 +3332,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, DEFUN (show_ip_route_vrf_all_supernets, show_ip_route_vrf_all_supernets_cmd, - "show ip route " VRF_ALL_CMD_STR " supernets-only", + "show ip route " VRF_ALL_CMD_STR " supernets-only", SHOW_STR IP_STR "IP routing table\n" @@ -3402,7 +3402,7 @@ DEFUN (show_ip_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[7]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -3455,7 +3455,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[6]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3496,7 +3496,7 @@ DEFUN (show_ip_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3755,7 +3755,7 @@ DEFUN (ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_tag, @@ -3769,7 +3769,7 @@ DEFUN (ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, NULL); } DEFUN (ipv6_route_flags, @@ -3783,7 +3783,7 @@ DEFUN (ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_flags_tag, @@ -3799,7 +3799,7 @@ DEFUN (ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname, @@ -3811,7 +3811,7 @@ DEFUN (ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, @@ -3824,7 +3824,7 @@ DEFUN (ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname_flags, @@ -3838,7 +3838,7 @@ DEFUN (ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_flags_tag, @@ -3854,7 +3854,7 @@ DEFUN (ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL); } DEFUN (ipv6_route_pref, @@ -3867,7 +3867,7 @@ DEFUN (ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL); } DEFUN (ipv6_route_pref_tag, @@ -3882,7 +3882,7 @@ DEFUN (ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, NULL); } DEFUN (ipv6_route_flags_pref, @@ -3897,7 +3897,7 @@ DEFUN (ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, NULL); } DEFUN (ipv6_route_flags_pref_tag, @@ -3914,7 +3914,7 @@ DEFUN (ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (ipv6_route_ifname_pref, @@ -3927,7 +3927,7 @@ DEFUN (ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL); } DEFUN (ipv6_route_ifname_pref_tag, @@ -3942,7 +3942,7 @@ DEFUN (ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref, @@ -3957,7 +3957,7 @@ DEFUN (ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref_tag, @@ -3974,7 +3974,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route, @@ -3987,7 +3987,7 @@ DEFUN (no_ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_tag, @@ -4002,7 +4002,7 @@ DEFUN (no_ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, NULL); } DEFUN (no_ipv6_route_flags, @@ -4017,7 +4017,7 @@ DEFUN (no_ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_flags_tag, @@ -4034,7 +4034,7 @@ DEFUN (no_ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname, @@ -4047,7 +4047,7 @@ DEFUN (no_ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_tag, @@ -4062,7 +4062,7 @@ DEFUN (no_ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags, @@ -4077,7 +4077,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags_tag, @@ -4094,7 +4094,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, NULL); } DEFUN (no_ipv6_route_pref, @@ -4108,7 +4108,7 @@ DEFUN (no_ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, NULL); } DEFUN (no_ipv6_route_pref_tag, @@ -4124,7 +4124,7 @@ DEFUN (no_ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref, @@ -4140,8 +4140,8 @@ DEFUN (no_ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref_tag, @@ -4159,8 +4159,8 @@ DEFUN (no_ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref, @@ -4174,7 +4174,7 @@ DEFUN (no_ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref_tag, @@ -4190,7 +4190,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref, @@ -4206,7 +4206,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref_tag, @@ -4224,7 +4224,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, NULL); } DEFUN (ipv6_route_vrf, @@ -4237,7 +4237,7 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ipv6_route_tag_vrf, @@ -4252,7 +4252,7 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[8]->arg); } DEFUN (ipv6_route_flags_vrf, @@ -4267,7 +4267,7 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4284,7 +4284,7 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ipv6_route_ifname_vrf, @@ -4297,7 +4297,7 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4311,7 +4311,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4326,7 +4326,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4343,7 +4343,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (ipv6_route_pref_vrf, @@ -4357,7 +4357,7 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4373,7 +4373,7 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4389,7 +4389,7 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4407,7 +4407,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4421,7 +4421,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4437,7 +4437,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4453,7 +4453,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4471,7 +4471,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_vrf, @@ -4485,7 +4485,7 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ipv6_route_tag_vrf, @@ -4501,7 +4501,7 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_flags_vrf, @@ -4517,7 +4517,7 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4535,7 +4535,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4549,7 +4549,7 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4565,7 +4565,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4581,7 +4581,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4599,7 +4599,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); } DEFUN (no_ipv6_route_pref_vrf, @@ -4614,7 +4614,7 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4631,7 +4631,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4648,8 +4648,8 @@ DEFUN (no_ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4668,8 +4668,8 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4684,7 +4684,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4701,7 +4701,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4737,7 +4737,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } DEFUN (show_ipv6_route, @@ -4758,14 +4758,14 @@ DEFUN (show_ipv6_route, json_object *json_prefix = NULL; u_char uj = use_json(argc, argv); - if (argc > 0 && argv[0] && strcmp(argv[0], "json") != 0) + if (argc > 0 && argv[3]->arg && strcmp(argv[3]->arg, "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[3]->arg))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[3]->arg, VTY_NEWLINE); return CMD_SUCCESS; } @@ -4774,7 +4774,7 @@ DEFUN (show_ipv6_route, if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s inactive%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[3]->arg, VTY_NEWLINE); return CMD_SUCCESS; } else @@ -4860,11 +4860,11 @@ DEFUN (show_ipv6_route_tag, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); tag = atoi(argv[1]); } else - tag = atoi(argv[0]); + tag = atoi(argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -4916,11 +4916,11 @@ DEFUN (show_ipv6_route_prefix_longer, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix (argv[1], &p); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[3]->arg, &p); if (! ret) { @@ -4974,11 +4974,11 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); type = proto_redistnum (AFI_IP6, argv[1]); } else - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[4]->arg); if (type < 0) { @@ -5030,11 +5030,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[3]->arg, &p); if (ret <= 0) { @@ -5085,11 +5085,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[3]->arg, &p); if (ret <= 0) { @@ -5303,8 +5303,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[6]->arg) + tag = atoi(argv[6]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -5358,7 +5358,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[5]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -5413,7 +5413,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[6]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -5466,7 +5466,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); @@ -5507,7 +5507,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -5751,7 +5751,7 @@ DEFUN (ip_zebra_import_table_distance, int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[2]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5768,7 +5768,7 @@ DEFUN (ip_zebra_import_table_distance, } if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); } @@ -5796,7 +5796,7 @@ DEFUN (ip_zebra_import_table_distance_routemap, const char *rmap_name; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[2]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5814,11 +5814,11 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (argc > 2) { - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]); + VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[6]->arg); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[4]->arg); return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } @@ -5843,7 +5843,7 @@ DEFUN (no_ip_zebra_import_table, u_int32_t table_id = 0; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[3]->arg); if (!is_zebra_valid_kernel_table(table_id)) { |