diff options
Diffstat (limited to 'zebra/interface.c')
-rw-r--r-- | zebra/interface.c | 60 |
1 files changed, 30 insertions, 30 deletions
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 */ |