diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/debug.c | 22 | ||||
-rw-r--r-- | zebra/interface.c | 60 | ||||
-rw-r--r-- | zebra/irdp_interface.c | 18 | ||||
-rw-r--r-- | zebra/router-id.c | 6 | ||||
-rw-r--r-- | zebra/rtadv.c | 38 | ||||
-rw-r--r-- | zebra/test_main.c | 2 | ||||
-rw-r--r-- | zebra/zebra_routemap.c | 134 | ||||
-rw-r--r-- | zebra/zebra_vty.c | 510 | ||||
-rw-r--r-- | zebra/zserv.c | 2 |
9 files changed, 396 insertions, 396 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index 1849ebde6..cdf233879 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]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("detail", argv[0], strlen (argv[0])) == 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]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 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]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) + if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) + if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 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]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 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]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) + if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) + if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 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 5469f8c29..0546cb8f9 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1317,7 +1317,7 @@ DEFUN (show_interface, show_interface_cmd, interface_update_stats (); if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1370,13 +1370,13 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_id); + ifp = if_lookup_by_name_vrf (argv[0], vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[0]->arg, + vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -1403,7 +1403,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]->arg, vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[0], vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1413,7 +1413,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]->arg, VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -1476,7 +1476,7 @@ DEFUN (show_interface_desc, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); if_show_description (vty, vrf_id); @@ -1679,7 +1679,7 @@ DEFUN (bandwidth_if, unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[0]->arg, NULL, 10); + bandwidth = strtol(argv[0], NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1843,7 +1843,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]->arg); + VTY_GET_ULONG("metric", metric, argv[0]); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,7 +1876,7 @@ DEFUN (link_params_maxbw, float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1919,7 +1919,7 @@ DEFUN (link_params_max_rsv_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1954,14 +1954,14 @@ DEFUN (link_params_unrsv_bw, float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[0]->arg, "%d", &priority) != 1) + if (sscanf (argv[0], "%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]->arg, "%g", &bw) != 1) + if (sscanf (argv[1], "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1993,7 +1993,7 @@ DEFUN (link_params_admin_grp, struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[0]->arg, "0x%lx", &value) != 1) + if (sscanf (argv[0], "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2035,13 +2035,13 @@ DEFUN (link_params_inter_as, struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[0]->arg, &addr)) + if (!inet_aton (argv[0], &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]->arg); + VTY_GET_ULONG("AS number", as, argv[1]); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2096,7 +2096,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[0]->arg); + VTY_GET_ULONG("delay", delay, argv[0]); switch (argc) { case 1: @@ -2130,8 +2130,8 @@ DEFUN (link_params_delay, return CMD_WARNING; break; case 3: - VTY_GET_ULONG("minimum delay", low, argv[1]->arg); - VTY_GET_ULONG("maximum delay", high, argv[2]->arg); + VTY_GET_ULONG("minimum delay", low, argv[1]); + VTY_GET_ULONG("maximum delay", high, argv[2]); /* Check new delays value coherency */ if (delay <= low || delay >= high) { @@ -2209,7 +2209,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]->arg); + VTY_GET_ULONG("delay variation", value, argv[0]); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2241,7 +2241,7 @@ DEFUN (link_params_pkt_loss, struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[0]->arg, "%g", &fval) != 1) + if (sscanf (argv[0], "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2281,7 +2281,7 @@ DEFUN (link_params_res_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2327,7 +2327,7 @@ DEFUN (link_params_ava_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2373,7 +2373,7 @@ DEFUN (link_params_use_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2557,7 +2557,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]->arg, NULL, NULL); + return ip_address_install (vty, vty->index, argv[0], NULL, NULL); } DEFUN (no_ip_address, @@ -2568,7 +2568,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]->arg, NULL, NULL); + return ip_address_uninstall (vty, vty->index, argv[0], NULL, NULL); } @@ -2582,7 +2582,7 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); + return ip_address_install (vty, vty->index, argv[0], NULL, argv[1]); } DEFUN (no_ip_address_label, @@ -2595,7 +2595,7 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); + return ip_address_uninstall (vty, vty->index, argv[0], NULL, argv[1]); } #endif /* HAVE_NETLINK */ @@ -2758,7 +2758,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]->arg, NULL, NULL, 0); + return ipv6_address_install (vty, vty->index, argv[0], NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2769,7 +2769,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]->arg, NULL, NULL, 0); + return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index cbc89dee7..8fb4fcad1 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]->arg); + irdp->Lifetime = atoi(argv[0]); return CMD_SUCCESS; } @@ -503,8 +503,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[0]->arg) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[0]->arg); + if( (unsigned) atoi(argv[0]) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[0]); return CMD_SUCCESS; } @@ -537,8 +537,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]->arg) ) { - irdp->MaxAdvertInterval = atoi(argv[0]->arg); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]) ) { + irdp->MaxAdvertInterval = atoi(argv[0]); return CMD_SUCCESS; } @@ -575,7 +575,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[0]->arg); + irdp->Preference = atoi(argv[0]); return CMD_SUCCESS; } @@ -605,10 +605,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0]->arg, &ip); + ret = inet_aton(argv[0], &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[1]->arg); + pref = atoi(argv[1]); 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]->arg, &ip); + ret = inet_aton(argv[0], &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index 9891b6ce0..d5d9652c5 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]->arg); + rid.u.prefix4.s_addr = inet_addr (argv[0]); if (!rid.u.prefix4.s_addr) return CMD_WARNING; @@ -231,7 +231,7 @@ DEFUN (router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); router_id_set (&rid, vrf_id); @@ -259,7 +259,7 @@ DEFUN (no_router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); router_id_set (&rid, vrf_id); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index b84585405..ac297890a 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]->arg, 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 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]->arg, 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 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]->arg, 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0], 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]->arg, 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0], 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]->arg, 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0], 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]->arg, 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0], 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1390,7 +1390,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); + ret = str2prefix_ipv6 (argv[0], &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1405,19 +1405,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[1]->arg[0])) - || strncmp (argv[1]->arg, "i", 1) == 0) + if ((isdigit((unsigned char)argv[1][0])) + || strncmp (argv[1], "i", 1) == 0) { - if ( strncmp (argv[1]->arg, "i", 1) == 0) + if ( strncmp (argv[1], "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1]->arg, + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1], (char **)NULL, 10); - if ( strncmp (argv[2]->arg, "i", 1) == 0) + if ( strncmp (argv[2], "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2]->arg, + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2], (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1431,11 +1431,11 @@ DEFUN (ipv6_nd_prefix, { for (i = cursor; i < argc; i++) { - if (strncmp (argv[i]->arg, "of", 2) == 0) + if (strncmp (argv[i], "of", 2) == 0) rp.AdvOnLinkFlag = 0; - if (strncmp (argv[i]->arg, "no", 2) == 0) + if (strncmp (argv[i], "no", 2) == 0) rp.AdvAutonomousFlag = 0; - if (strncmp (argv[i]->arg, "ro", 2) == 0) + if (strncmp (argv[i], "ro", 2) == 0) rp.AdvRouterAddressFlag = 1; } } @@ -1619,7 +1619,7 @@ DEFUN (no_ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); + ret = str2prefix_ipv6 (argv[0], &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1810,7 +1810,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[0]->arg, rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[0], rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1861,7 +1861,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]->arg, 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0], 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index 5bb4ee540..bbaf45028 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]->arg[0]) + switch (argv[0][0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 87bbbba3b..e6c5a3e91 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]->arg, + return zebra_route_match_add (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_ADDED); } @@ -315,7 +315,7 @@ DEFUN (no_match_interface, if (argc == 0) return zebra_route_match_delete (vty, vty->index, "interface", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "interface", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); + return zebra_route_match_delete (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_DELETED); } ALIAS (no_match_interface, @@ -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]->arg, + return zebra_route_match_add (vty, vty->index, "tag", argv[0], RMAP_EVENT_MATCH_ADDED); } @@ -348,7 +348,7 @@ DEFUN (no_match_tag, return zebra_route_match_delete (vty, vty->index, "tag", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "tag", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "tag", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -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]->arg, RMAP_EVENT_FILTER_ADDED); + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_ADDED); } DEFUN (no_match_ip_next_hop, @@ -384,7 +384,7 @@ DEFUN (no_match_ip_next_hop, return zebra_route_match_delete (vty, vty->index, "ip next-hop", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_DELETED); } @@ -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]->arg, RMAP_EVENT_PLIST_ADDED); + argv[0], RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_next_hop_prefix_list, @@ -427,7 +427,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", argv[0]->arg, + "ip next-hop prefix-list", argv[0], RMAP_EVENT_PLIST_DELETED); } @@ -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]->arg, + return zebra_route_match_add (vty, vty->index, "ip address", argv[0], RMAP_EVENT_FILTER_ADDED); } @@ -468,7 +468,7 @@ DEFUN (no_match_ip_address, return zebra_route_match_delete (vty, vty->index, "ip address", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip address", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "ip address", argv[0], RMAP_EVENT_FILTER_DELETED); } @@ -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]->arg, RMAP_EVENT_PLIST_ADDED); + argv[0], RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_address_prefix_list, @@ -511,7 +511,7 @@ DEFUN (no_match_ip_address_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", argv[0]->arg, + "ip address prefix-list", argv[0], RMAP_EVENT_PLIST_DELETED); } @@ -535,7 +535,7 @@ DEFUN (match_ip_address_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-len", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_address_prefix_len, @@ -553,7 +553,7 @@ DEFUN (no_match_ip_address_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-len", argv[0]->arg, + "ip address prefix-len", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -576,7 +576,7 @@ DEFUN (match_ip_nexthop_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-len", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_nexthop_prefix_len, @@ -594,7 +594,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-len", argv[0]->arg, + "ip next-hop prefix-len", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -613,15 +613,15 @@ DEFUN (match_source_protocol, { int i; - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], 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]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[0]->arg ? argv[0]->arg : NULL, + "source-protocol", argv[0] ? argv[0] : 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]->arg, &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[0]->arg, &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[0], &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]->arg); + return zebra_route_set_add (vty, vty->index, "src", argv[0]); } 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]->arg); + return zebra_route_set_delete (vty, vty->index, "src", argv[0]); } 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]->arg, 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0], 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -766,28 +766,28 @@ DEFUN (ip_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP][i]) { - if (strcmp(proto_rm[AFI_IP][i], argv[1]->arg) == 0) + if (strcmp(proto_rm[AFI_IP][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); } - proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -804,20 +804,20 @@ DEFUN (no_ip_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); @@ -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]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -879,28 +879,28 @@ DEFUN (ipv6_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP6][i]) { - if (strcmp(proto_rm[AFI_IP6][i], argv[1]->arg) == 0) + if (strcmp(proto_rm[AFI_IP6][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); } - proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -917,20 +917,20 @@ DEFUN (no_ipv6_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP6][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP6][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP6][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); @@ -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]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -993,25 +993,25 @@ DEFUN (ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP][i]) { - if (strcmp(nht_rm[AFI_IP][i], argv[1]->arg) == 0) + if (strcmp(nht_rm[AFI_IP][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); } - nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); zebra_evaluate_rnh(0, AF_INET, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1027,20 +1027,20 @@ DEFUN (no_ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!nht_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], nht_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); @@ -1097,19 +1097,19 @@ DEFUN (ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP6][i]) XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP6][i]); - nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); zebra_evaluate_rnh(0, AF_INET6, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1125,20 +1125,20 @@ DEFUN (no_ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } - if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP6][i])) + if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1], nht_rm[AFI_IP6][i])) { - vty_out (vty, "invalid route-map \"%s\"%s", argv[1]->arg, VTY_NEWLINE); + vty_out (vty, "invalid route-map \"%s\"%s", argv[1], VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 8878d8ffe..a7ee63d87 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]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : 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]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : 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]->arg, "u", 1)) + if (!strncmp (argv[0], "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[0]->arg, "mrib-o", 6)) + else if (!strncmp (argv[0], "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[0]->arg, "mrib-t", 6)) + else if (!strncmp (argv[0], "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[0]->arg, "low", 3)) + else if (!strncmp (argv[0], "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[0]->arg, "lon", 3)) + else if (!strncmp (argv[0], "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]->arg, &addr); + ret = inet_aton (argv[0], &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]->arg, NULL, argv[1]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], 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]->arg, NULL, NULL, argv[1]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], 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]->arg, NULL, argv[1]->arg, NULL, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, + argv[2], 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], + argv[3], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, + argv[3], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], + argv[4], 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]->arg, NULL, NULL, argv[1]->arg, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, + argv[2], 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], + argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, + argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], + argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, - argv[5]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], + argv[5], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, + argv[4], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, + argv[3], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], + argv[4], 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]->arg, NULL, argv[1]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], 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]->arg, NULL, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], 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]->arg, NULL, NULL, NULL, argv[1]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], 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]->arg, argv[1]->arg, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2], 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]->arg, NULL, argv[1]->arg, NULL, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, + argv[2], 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], + argv[3], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, + argv[3], 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], + argv[4], 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]->arg, NULL, NULL, argv[1]->arg, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, + argv[2], 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], + argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, + argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], + argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, + argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, - argv[5]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], + argv[5], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, + argv[3], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], + argv[4], 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]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); } 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); } 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]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); } 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); } /* 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } /* 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]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); } 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); } 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]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); } 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } @@ -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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } 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]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); } 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); } 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]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); } 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } @@ -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]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); } 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]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); } 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]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); } 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]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); } 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]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg , argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2] , argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } /* 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]->arg, SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[0], SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -2446,7 +2446,7 @@ DEFUN (show_ip_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); zebra_print_rnh_table(vrf_id, AF_INET, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2491,7 +2491,7 @@ DEFUN (show_ipv6_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); zebra_print_rnh_table(vrf_id, AF_INET6, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2606,11 +2606,11 @@ DEFUN (show_ip_route_tag, if (argc > 1) { - tag = atoi(argv[1]->arg); - VRF_GET_ID (vrf_id, argv[0]->arg); + tag = atoi(argv[1]); + VRF_GET_ID (vrf_id, argv[0]); } else - tag = atoi(argv[0]->arg); + tag = atoi(argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2662,11 +2662,11 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { - ret = str2prefix (argv[1]->arg, &p); - VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]); } else - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { @@ -2719,7 +2719,7 @@ DEFUN (show_ip_route_supernets, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2772,11 +2772,11 @@ DEFUN (show_ip_route_protocol, if (argc > 1) { - type = proto_redistnum (AFI_IP, argv[1]->arg); - VRF_GET_ID (vrf_id, argv[0]->arg); + type = proto_redistnum (AFI_IP, argv[1]); + VRF_GET_ID (vrf_id, argv[0]); } else - type = proto_redistnum (AFI_IP, argv[0]->arg); + type = proto_redistnum (AFI_IP, argv[0]); 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]->arg); + VTY_GET_INTEGER ("Instance", instance, argv[0]); 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]->arg); - ret = str2prefix_ipv4 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { @@ -2919,11 +2919,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv4 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { @@ -3120,7 +3120,7 @@ DEFUN (show_ip_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3154,7 +3154,7 @@ DEFUN (show_ip_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3239,8 +3239,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]->arg) - tag = atoi(argv[0]->arg); + if (argv[0]) + tag = atoi(argv[0]); 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]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -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]->arg); + type = proto_redistnum (AFI_IP, argv[0]); 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]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &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]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &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]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], 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]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], 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]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], 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]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], 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]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); + /* We do not care about argv[2] */ + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], 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]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); + /* 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); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], 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]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); } 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } 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]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); } 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } 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]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); } 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } 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]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); } 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]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); } 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]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + /* 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]); } 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]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + /* 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]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } 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]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } 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]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } 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]->arg && strcmp(argv[0]->arg, "json") != 0) + if (argc > 0 && argv[0] && strcmp(argv[0], "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]->arg))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[0], 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]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[0], 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]->arg); - tag = atoi(argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]); + tag = atoi(argv[1]); } else - tag = atoi(argv[0]->arg); + tag = atoi(argv[0]); 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]->arg); - ret = str2prefix (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix (argv[1], &p); } else - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { @@ -4974,11 +4974,11 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { - VRF_GET_ID (vrf_id, argv[0]->arg); - type = proto_redistnum (AFI_IP6, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]); + type = proto_redistnum (AFI_IP6, argv[1]); } else - type = proto_redistnum (AFI_IP6, argv[0]->arg); + type = proto_redistnum (AFI_IP6, argv[0]); if (type < 0) { @@ -5030,11 +5030,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv6 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { @@ -5085,11 +5085,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv6 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { @@ -5137,7 +5137,7 @@ DEFUN (show_ipv6_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5171,7 +5171,7 @@ DEFUN (show_ipv6_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5211,7 +5211,7 @@ DEFUN (show_ipv6_mroute, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id); if (! table) @@ -5303,8 +5303,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]->arg) - tag = atoi(argv[0]->arg); + if (argv[0]) + tag = atoi(argv[0]); 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]->arg, &p); + ret = str2prefix (argv[0], &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]->arg); + type = proto_redistnum (AFI_IP6, argv[0]); 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]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &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]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &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]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); 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]->arg, 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 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]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); 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]->arg, 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]->arg); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); 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]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); if (!is_zebra_valid_kernel_table(table_id)) { diff --git a/zebra/zserv.c b/zebra/zserv.c index c05858835..3402bf1df 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2263,7 +2263,7 @@ DEFUN (config_table, "Configure target kernel routing table\n" "TABLE integer\n") { - zebrad.rtm_table_default = strtol (argv[0]->arg, (char**)0, 10); + zebrad.rtm_table_default = strtol (argv[0], (char**)0, 10); return CMD_SUCCESS; } |