diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-21 04:26:30 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-21 04:26:30 +0200 |
commit | f68cec764abf50b35945b907a2e005bc50c50831 (patch) | |
tree | 4178020d116edef1a91f9a52214f9193f8a1a071 | |
parent | Merge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/qua... (diff) | |
download | frr-f68cec764abf50b35945b907a2e005bc50c50831.tar.xz frr-f68cec764abf50b35945b907a2e005bc50c50831.zip |
lib: Fixup more files
-rw-r--r-- | lib/command.c | 4 | ||||
-rw-r--r-- | lib/distribute.c | 48 | ||||
-rw-r--r-- | lib/filter.c | 132 | ||||
-rw-r--r-- | lib/if_rmap.c | 12 | ||||
-rw-r--r-- | lib/keychain.c | 76 | ||||
-rw-r--r-- | lib/routemap.c | 32 |
6 files changed, 152 insertions, 152 deletions
diff --git a/lib/command.c b/lib/command.c index 9cdf0a5ff..9ca8ea540 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1325,7 +1325,7 @@ DEFUN (config_hostname, { struct cmd_token *word = argv[1]; - if (!isalpha((int) word->arg[0])) + if (!isalpha((int) word->arg)) { vty_out (vty, "Please specify string starting with alphabet%s", VTY_NEWLINE); return CMD_WARNING; @@ -2011,7 +2011,7 @@ DEFUN (banner_motd_file, vty_out (vty, "%s does not exist", argv[3]->arg); else if (cmd == CMD_WARNING) vty_out (vty, "%s must be in %s", - argv[0], SYSCONFDIR); + argv[0]->arg, SYSCONFDIR); return cmd; } diff --git a/lib/distribute.c b/lib/distribute.c index d0d637fbb..9ba88bf7e 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -314,9 +314,9 @@ DEFUN (distribute_list_all, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -326,7 +326,7 @@ DEFUN (distribute_list_all, } /* Get interface name corresponding distribute list. */ - distribute_list_set (NULL, type, argv[0]); + distribute_list_set (NULL, type, argv[0]->arg); return CMD_SUCCESS; } @@ -352,9 +352,9 @@ DEFUN (no_distribute_list_all, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -363,7 +363,7 @@ DEFUN (no_distribute_list_all, return CMD_WARNING; } - ret = distribute_list_unset (NULL, type, argv[0]); + ret = distribute_list_unset (NULL, type, argv[0]->arg); if (! ret) { vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE); @@ -393,9 +393,9 @@ DEFUN (distribute_list, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -404,7 +404,7 @@ DEFUN (distribute_list, } /* Get interface name corresponding distribute list. */ - distribute_list_set (argv[2], type, argv[0]); + distribute_list_set (argv[2]->arg, type, argv[0]->arg); return CMD_SUCCESS; } @@ -431,9 +431,9 @@ DEFUN (no_distribute_list, no_distribute_list_cmd, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -441,7 +441,7 @@ DEFUN (no_distribute_list, no_distribute_list_cmd, return CMD_WARNING; } - ret = distribute_list_unset (argv[2], type, argv[0]); + ret = distribute_list_unset (argv[2]->arg, type, argv[0]->arg); if (! ret) { vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE); @@ -471,9 +471,9 @@ DEFUN (distribute_list_prefix_all, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -483,7 +483,7 @@ DEFUN (distribute_list_prefix_all, } /* Get interface name corresponding distribute list. */ - distribute_list_prefix_set (NULL, type, argv[0]); + distribute_list_prefix_set (NULL, type, argv[0]->arg); return CMD_SUCCESS; } @@ -511,9 +511,9 @@ DEFUN (no_distribute_list_prefix_all, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -522,7 +522,7 @@ DEFUN (no_distribute_list_prefix_all, return CMD_WARNING; } - ret = distribute_list_prefix_unset (NULL, type, argv[0]); + ret = distribute_list_prefix_unset (NULL, type, argv[0]->arg); if (! ret) { vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE); @@ -553,9 +553,9 @@ DEFUN (distribute_list_prefix, distribute_list_prefix_cmd, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -565,7 +565,7 @@ DEFUN (distribute_list_prefix, distribute_list_prefix_cmd, } /* Get interface name corresponding distribute list. */ - distribute_list_prefix_set (argv[2], type, argv[0]); + distribute_list_prefix_set (argv[2]->arg, type, argv[0]->arg); return CMD_SUCCESS; } @@ -593,9 +593,9 @@ DEFUN (no_distribute_list_prefix, no_distribute_list_prefix_cmd, enum distribute_type type; /* Check of distribute list type. */ - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = DISTRIBUTE_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = DISTRIBUTE_OUT; else { @@ -604,7 +604,7 @@ DEFUN (no_distribute_list_prefix, no_distribute_list_prefix_cmd, return CMD_WARNING; } - ret = distribute_list_prefix_unset (argv[2], type, argv[0]); + ret = distribute_list_prefix_unset (argv[2]->arg, type, argv[0]->arg); if (! ret) { vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE); diff --git a/lib/filter.c b/lib/filter.c index e9ba715c9..9daecc08f 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -713,7 +713,7 @@ DEFUN (access_list_standard, "Address to match\n" "Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, 0, 1); } @@ -727,7 +727,7 @@ DEFUN (access_list_standard_nomask, "Specify packets to forward\n" "Address to match\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", NULL, NULL, 0, 1); } @@ -742,7 +742,7 @@ DEFUN (access_list_standard_host, "A single host address\n" "Address to match\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", NULL, NULL, 0, 1); } @@ -756,7 +756,7 @@ DEFUN (access_list_standard_any, "Specify packets to forward\n" "Any source host\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", "255.255.255.255", NULL, NULL, 0, 1); } @@ -772,7 +772,7 @@ DEFUN (no_access_list_standard, "Address to match\n" "Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, 0, 0); } @@ -787,7 +787,7 @@ DEFUN (no_access_list_standard_nomask, "Specify packets to forward\n" "Address to match\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", NULL, NULL, 0, 0); } @@ -803,7 +803,7 @@ DEFUN (no_access_list_standard_host, "A single host address\n" "Address to match\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", NULL, NULL, 0, 0); } @@ -818,7 +818,7 @@ DEFUN (no_access_list_standard_any, "Specify packets to forward\n" "Any source host\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", "255.255.255.255", NULL, NULL, 0, 0); } @@ -837,8 +837,8 @@ DEFUN (access_list_extended, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], argv[5], 1 ,1); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, argv[5]->arg, 1 ,1); } DEFUN (access_list_extended_mask_any, @@ -854,8 +854,8 @@ DEFUN (access_list_extended_mask_any, "Source wildcard bits\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, "0.0.0.0", "255.255.255.255", 1, 1); } @@ -872,9 +872,9 @@ DEFUN (access_list_extended_any_mask, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - argv[3], 1, 1); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", + "255.255.255.255", argv[2]->arg, + argv[3]->arg, 1, 1); } DEFUN (access_list_extended_any_any, @@ -889,7 +889,7 @@ DEFUN (access_list_extended_any_any, "Any source host\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", "255.255.255.255", "0.0.0.0", "255.255.255.255", 1, 1); } @@ -908,8 +908,8 @@ DEFUN (access_list_extended_mask_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, "0.0.0.0", 1, 1); } @@ -927,9 +927,9 @@ DEFUN (access_list_extended_host_mask, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - argv[4], 1, 1); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + "0.0.0.0", argv[3]->arg, + argv[4]->arg, 1, 1); } DEFUN (access_list_extended_host_host, @@ -946,8 +946,8 @@ DEFUN (access_list_extended_host_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + "0.0.0.0", argv[3]->arg, "0.0.0.0", 1, 1); } @@ -964,8 +964,8 @@ DEFUN (access_list_extended_any_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", + "255.255.255.255", argv[2]->arg, "0.0.0.0", 1, 1); } @@ -982,7 +982,7 @@ DEFUN (access_list_extended_host_any, "Source address\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", "0.0.0.0", "255.255.255.255", 1, 1); } @@ -1002,8 +1002,8 @@ DEFUN (no_access_list_extended, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], argv[5], 1, 0); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, argv[5]->arg, 1, 0); } DEFUN (no_access_list_extended_mask_any, @@ -1020,8 +1020,8 @@ DEFUN (no_access_list_extended_mask_any, "Source wildcard bits\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, "0.0.0.0", "255.255.255.255", 1, 0); } @@ -1039,9 +1039,9 @@ DEFUN (no_access_list_extended_any_mask, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - argv[3], 1, 0); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", + "255.255.255.255", argv[2]->arg, + argv[3]->arg, 1, 0); } DEFUN (no_access_list_extended_any_any, @@ -1057,7 +1057,7 @@ DEFUN (no_access_list_extended_any_any, "Any source host\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", "255.255.255.255", "0.0.0.0", "255.255.255.255", 1, 0); } @@ -1077,8 +1077,8 @@ DEFUN (no_access_list_extended_mask_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, "0.0.0.0", 1, 0); } @@ -1097,9 +1097,9 @@ DEFUN (no_access_list_extended_host_mask, "Destination address\n" "Destination Wildcard bits\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - argv[4], 1, 0); + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + "0.0.0.0", argv[3]->arg, + argv[4]->arg, 1, 0); } DEFUN (no_access_list_extended_host_host, @@ -1117,8 +1117,8 @@ DEFUN (no_access_list_extended_host_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, + "0.0.0.0", argv[3]->arg, "0.0.0.0", 1, 0); } @@ -1136,8 +1136,8 @@ DEFUN (no_access_list_extended_any_host, "A single destination host\n" "Destination address\n") { - return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, "0.0.0.0", + "255.255.255.255", argv[2]->arg, "0.0.0.0", 1, 0); } @@ -1155,7 +1155,7 @@ DEFUN (no_access_list_extended_host_any, "Source address\n" "Any destination host\n") { - return filter_set_cisco (vty, argv[0], argv[1], argv[2], + return filter_set_cisco (vty, argv[0]->arg, argv[1]->arg, argv[2]->arg, "0.0.0.0", "0.0.0.0", "255.255.255.255", 1, 0); } @@ -1251,7 +1251,7 @@ DEFUN (access_list, "Specify packets to forward\n" "Prefix to match. e.g. 10.0.0.0/8\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, argv[2], 0, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, argv[2]->arg, 0, 1); } DEFUN (access_list_exact, @@ -1264,7 +1264,7 @@ DEFUN (access_list_exact, "Prefix to match. e.g. 10.0.0.0/8\n" "Exact match of the prefixes\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, argv[2], 1, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, argv[2]->arg, 1, 1); } DEFUN (access_list_any, @@ -1276,7 +1276,7 @@ DEFUN (access_list_any, "Specify packets to forward\n" "Prefix to match. e.g. 10.0.0.0/8\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, "0.0.0.0/0", 0, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, "0.0.0.0/0", 0, 1); } DEFUN (no_access_list, @@ -1289,7 +1289,7 @@ DEFUN (no_access_list, "Specify packets to forward\n" "Prefix to match. e.g. 10.0.0.0/8\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, argv[2], 0, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, argv[2]->arg, 0, 0); } DEFUN (no_access_list_exact, @@ -1303,7 +1303,7 @@ DEFUN (no_access_list_exact, "Prefix to match. e.g. 10.0.0.0/8\n" "Exact match of the prefixes\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, argv[2], 1, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, argv[2]->arg, 1, 0); } DEFUN (no_access_list_any, @@ -1316,7 +1316,7 @@ DEFUN (no_access_list_any, "Specify packets to forward\n" "Prefix to match. e.g. 10.0.0.0/8\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP, "0.0.0.0/0", 0, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP, "0.0.0.0/0", 0, 0); } DEFUN (no_access_list_all, @@ -1334,10 +1334,10 @@ DEFUN (no_access_list_all, struct access_master *master; /* Looking up access_list. */ - access = access_list_lookup (AFI_IP, argv[0]); + access = access_list_lookup (AFI_IP, argv[0]->arg); if (access == NULL) { - vty_out (vty, "%% access-list %s doesn't exist%s", argv[0], + vty_out (vty, "%% access-list %s doesn't exist%s", argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1369,7 +1369,7 @@ DEFUN (access_list_remark, { struct access_list *access; - access = access_list_get (AFI_IP, argv[0]); + access = access_list_get (AFI_IP, argv[0]->arg); if (access->remark) { @@ -1393,7 +1393,7 @@ DEFUN (no_access_list_remark, "IP zebra access-list\n" "Access list entry comment\n") { - return vty_access_list_remark_unset (vty, AFI_IP, argv[0]); + return vty_access_list_remark_unset (vty, AFI_IP, argv[0]->arg); } ALIAS (no_access_list_remark, @@ -1420,7 +1420,7 @@ DEFUN (ipv6_access_list, "Specify packets to forward\n" "Prefix to match. e.g. 3ffe:506::/32\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, argv[2], 0, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, argv[2]->arg, 0, 1); } DEFUN (ipv6_access_list_exact, @@ -1434,7 +1434,7 @@ DEFUN (ipv6_access_list_exact, "Prefix to match. e.g. 3ffe:506::/32\n" "Exact match of the prefixes\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, argv[2], 1, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, argv[2]->arg, 1, 1); } DEFUN (ipv6_access_list_any, @@ -1447,7 +1447,7 @@ DEFUN (ipv6_access_list_any, "Specify packets to forward\n" "Any prefixi to match\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, "::/0", 0, 1); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, "::/0", 0, 1); } DEFUN (no_ipv6_access_list, @@ -1461,7 +1461,7 @@ DEFUN (no_ipv6_access_list, "Specify packets to forward\n" "Prefix to match. e.g. 3ffe:506::/32\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, argv[2], 0, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, argv[2]->arg, 0, 0); } DEFUN (no_ipv6_access_list_exact, @@ -1476,7 +1476,7 @@ DEFUN (no_ipv6_access_list_exact, "Prefix to match. e.g. 3ffe:506::/32\n" "Exact match of the prefixes\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, argv[2], 1, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, argv[2]->arg, 1, 0); } DEFUN (no_ipv6_access_list_any, @@ -1490,7 +1490,7 @@ DEFUN (no_ipv6_access_list_any, "Specify packets to forward\n" "Any prefixi to match\n") { - return filter_set_zebra (vty, argv[0], argv[1], AFI_IP6, "::/0", 0, 0); + return filter_set_zebra (vty, argv[0]->arg, argv[1]->arg, AFI_IP6, "::/0", 0, 0); } @@ -1506,10 +1506,10 @@ DEFUN (no_ipv6_access_list_all, struct access_master *master; /* Looking up access_list. */ - access = access_list_lookup (AFI_IP6, argv[0]); + access = access_list_lookup (AFI_IP6, argv[0]->arg); if (access == NULL) { - vty_out (vty, "%% access-list %s doesn't exist%s", argv[0], + vty_out (vty, "%% access-list %s doesn't exist%s", argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1538,7 +1538,7 @@ DEFUN (ipv6_access_list_remark, { struct access_list *access; - access = access_list_get (AFI_IP6, argv[0]); + access = access_list_get (AFI_IP6, argv[0]->arg); if (access->remark) { @@ -1559,7 +1559,7 @@ DEFUN (no_ipv6_access_list_remark, "IPv6 zebra access-list\n" "Access list entry comment\n") { - return vty_access_list_remark_unset (vty, AFI_IP6, argv[0]); + return vty_access_list_remark_unset (vty, AFI_IP6, argv[0]->arg); } ALIAS (no_ipv6_access_list_remark, @@ -1705,7 +1705,7 @@ DEFUN (show_ip_access_list_name, "IP extended access list (expanded range)\n" "IP zebra access-list\n") { - return filter_show (vty, argv[0], AFI_IP); + return filter_show (vty, argv[0]->arg, AFI_IP); } #ifdef HAVE_IPV6 @@ -1727,7 +1727,7 @@ DEFUN (show_ipv6_access_list_name, "List IPv6 access lists\n" "IPv6 zebra access-list\n") { - return filter_show (vty, argv[0], AFI_IP6); + return filter_show (vty, argv[0]->arg, AFI_IP6); } #endif /* HAVE_IPV6 */ diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 736f2e237..655da8c3d 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -220,9 +220,9 @@ DEFUN (if_rmap, { enum if_rmap_type type; - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = IF_RMAP_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = IF_RMAP_OUT; else { @@ -230,7 +230,7 @@ DEFUN (if_rmap, return CMD_WARNING; } - if_rmap_set (argv[2], type, argv[0]); + if_rmap_set (argv[2]->arg, type, argv[0]->arg); return CMD_SUCCESS; } @@ -257,9 +257,9 @@ DEFUN (no_if_rmap, int ret; enum if_rmap_type type; - if (strncmp (argv[1], "i", 1) == 0) + if (strncmp (argv[1]->arg, "i", 1) == 0) type = IF_RMAP_IN; - else if (strncmp (argv[1], "o", 1) == 0) + else if (strncmp (argv[1]->arg, "o", 1) == 0) type = IF_RMAP_OUT; else { @@ -267,7 +267,7 @@ DEFUN (no_if_rmap, return CMD_WARNING; } - ret = if_rmap_unset (argv[2], type, argv[0]); + ret = if_rmap_unset (argv[2]->arg, type, argv[0]->arg); if (! ret) { vty_out (vty, "route-map doesn't exist%s", VTY_NEWLINE); diff --git a/lib/keychain.c b/lib/keychain.c index ac2083cf4..f18e42360 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -239,7 +239,7 @@ DEFUN (key_chain, { struct keychain *keychain; - keychain = keychain_get (argv[0]); + keychain = keychain_get (argv[0]->arg); vty->index = keychain; vty->node = KEYCHAIN_NODE; @@ -256,11 +256,11 @@ DEFUN (no_key_chain, { struct keychain *keychain; - keychain = keychain_lookup (argv[0]); + keychain = keychain_lookup (argv[0]->arg); if (! keychain) { - vty_out (vty, "Can't find keychain %s%s", argv[0], VTY_NEWLINE); + vty_out (vty, "Can't find keychain %s%s", argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -281,7 +281,7 @@ DEFUN (key, keychain = vty->index; - VTY_GET_INTEGER ("key identifier", index, argv[0]); + VTY_GET_INTEGER ("key identifier", index, argv[0]->arg); key = key_get (keychain, index); vty->index_sub = key; vty->node = KEYCHAIN_KEY_NODE; @@ -302,7 +302,7 @@ DEFUN (no_key, keychain = vty->index; - VTY_GET_INTEGER ("key identifier", index, argv[0]); + VTY_GET_INTEGER ("key identifier", index, argv[0]->arg); key = key_lookup (keychain, index); if (! key) { @@ -329,7 +329,7 @@ DEFUN (key_string, if (key->string) XFREE(MTYPE_KEY, key->string); - key->string = XSTRDUP(MTYPE_KEY, argv[0]); + key->string = XSTRDUP(MTYPE_KEY, argv[0]->arg); return CMD_SUCCESS; } @@ -556,8 +556,8 @@ DEFUN (accept_lifetime_day_month_day_month, key = vty->index_sub; - return key_lifetime_set (vty, &key->accept, argv[0], argv[1], argv[2], - argv[3], argv[4], argv[5], argv[6], argv[7]); + return key_lifetime_set (vty, &key->accept, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[7]->arg); } DEFUN (accept_lifetime_day_month_month_day, @@ -577,8 +577,8 @@ DEFUN (accept_lifetime_day_month_month_day, key = vty->index_sub; - return key_lifetime_set (vty, &key->accept, argv[0], argv[1], argv[2], - argv[3], argv[4], argv[6], argv[5], argv[7]); + return key_lifetime_set (vty, &key->accept, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[5]->arg, argv[7]->arg); } DEFUN (accept_lifetime_month_day_day_month, @@ -598,8 +598,8 @@ DEFUN (accept_lifetime_month_day_day_month, key = vty->index_sub; - return key_lifetime_set (vty, &key->accept, argv[0], argv[2], argv[1], - argv[3], argv[4], argv[5], argv[6], argv[7]); + return key_lifetime_set (vty, &key->accept, argv[0]->arg, argv[2]->arg, argv[1]->arg, + argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[7]->arg); } DEFUN (accept_lifetime_month_day_month_day, @@ -619,8 +619,8 @@ DEFUN (accept_lifetime_month_day_month_day, key = vty->index_sub; - return key_lifetime_set (vty, &key->accept, argv[0], argv[2], argv[1], - argv[3], argv[4], argv[6], argv[5], argv[7]); + return key_lifetime_set (vty, &key->accept, argv[0]->arg, argv[2]->arg, argv[1]->arg, + argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[5]->arg, argv[7]->arg); } DEFUN (accept_lifetime_infinite_day_month, @@ -637,8 +637,8 @@ DEFUN (accept_lifetime_infinite_day_month, key = vty->index_sub; - return key_lifetime_infinite_set (vty, &key->accept, argv[0], argv[1], - argv[2], argv[3]); + return key_lifetime_infinite_set (vty, &key->accept, argv[0]->arg, argv[1]->arg, + argv[2]->arg, argv[3]->arg); } DEFUN (accept_lifetime_infinite_month_day, @@ -655,8 +655,8 @@ DEFUN (accept_lifetime_infinite_month_day, key = vty->index_sub; - return key_lifetime_infinite_set (vty, &key->accept, argv[0], argv[2], - argv[1], argv[3]); + return key_lifetime_infinite_set (vty, &key->accept, argv[0]->arg, argv[2]->arg, + argv[1]->arg, argv[3]->arg); } DEFUN (accept_lifetime_duration_day_month, @@ -674,8 +674,8 @@ DEFUN (accept_lifetime_duration_day_month, key = vty->index_sub; - return key_lifetime_duration_set (vty, &key->accept, argv[0], argv[1], - argv[2], argv[3], argv[4]); + return key_lifetime_duration_set (vty, &key->accept, argv[0]->arg, argv[1]->arg, + argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (accept_lifetime_duration_month_day, @@ -693,8 +693,8 @@ DEFUN (accept_lifetime_duration_month_day, key = vty->index_sub; - return key_lifetime_duration_set (vty, &key->accept, argv[0], argv[2], - argv[1], argv[3], argv[4]); + return key_lifetime_duration_set (vty, &key->accept, argv[0]->arg, argv[2]->arg, + argv[1]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (send_lifetime_day_month_day_month, @@ -714,8 +714,8 @@ DEFUN (send_lifetime_day_month_day_month, key = vty->index_sub; - return key_lifetime_set (vty, &key->send, argv[0], argv[1], argv[2], argv[3], - argv[4], argv[5], argv[6], argv[7]); + return key_lifetime_set (vty, &key->send, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, + argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[7]->arg); } DEFUN (send_lifetime_day_month_month_day, @@ -735,8 +735,8 @@ DEFUN (send_lifetime_day_month_month_day, key = vty->index_sub; - return key_lifetime_set (vty, &key->send, argv[0], argv[1], argv[2], argv[3], - argv[4], argv[6], argv[5], argv[7]); + return key_lifetime_set (vty, &key->send, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, + argv[4]->arg, argv[6]->arg, argv[5]->arg, argv[7]->arg); } DEFUN (send_lifetime_month_day_day_month, @@ -756,8 +756,8 @@ DEFUN (send_lifetime_month_day_day_month, key = vty->index_sub; - return key_lifetime_set (vty, &key->send, argv[0], argv[2], argv[1], argv[3], - argv[4], argv[5], argv[6], argv[7]); + return key_lifetime_set (vty, &key->send, argv[0]->arg, argv[2]->arg, argv[1]->arg, argv[3]->arg, + argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[7]->arg); } DEFUN (send_lifetime_month_day_month_day, @@ -777,8 +777,8 @@ DEFUN (send_lifetime_month_day_month_day, key = vty->index_sub; - return key_lifetime_set (vty, &key->send, argv[0], argv[2], argv[1], argv[3], - argv[4], argv[6], argv[5], argv[7]); + return key_lifetime_set (vty, &key->send, argv[0]->arg, argv[2]->arg, argv[1]->arg, argv[3]->arg, + argv[4]->arg, argv[6]->arg, argv[5]->arg, argv[7]->arg); } DEFUN (send_lifetime_infinite_day_month, @@ -795,8 +795,8 @@ DEFUN (send_lifetime_infinite_day_month, key = vty->index_sub; - return key_lifetime_infinite_set (vty, &key->send, argv[0], argv[1], argv[2], - argv[3]); + return key_lifetime_infinite_set (vty, &key->send, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg); } DEFUN (send_lifetime_infinite_month_day, @@ -813,8 +813,8 @@ DEFUN (send_lifetime_infinite_month_day, key = vty->index_sub; - return key_lifetime_infinite_set (vty, &key->send, argv[0], argv[2], argv[1], - argv[3]); + return key_lifetime_infinite_set (vty, &key->send, argv[0]->arg, argv[2]->arg, argv[1]->arg, + argv[3]->arg); } DEFUN (send_lifetime_duration_day_month, @@ -832,8 +832,8 @@ DEFUN (send_lifetime_duration_day_month, key = vty->index_sub; - return key_lifetime_duration_set (vty, &key->send, argv[0], argv[1], argv[2], - argv[3], argv[4]); + return key_lifetime_duration_set (vty, &key->send, argv[0]->arg, argv[1]->arg, argv[2]->arg, + argv[3]->arg, argv[4]->arg); } DEFUN (send_lifetime_duration_month_day, @@ -851,8 +851,8 @@ DEFUN (send_lifetime_duration_month_day, key = vty->index_sub; - return key_lifetime_duration_set (vty, &key->send, argv[0], argv[2], argv[1], - argv[3], argv[4]); + return key_lifetime_duration_set (vty, &key->send, argv[0]->arg, argv[2]->arg, argv[1]->arg, + argv[3]->arg, argv[4]->arg); } static struct cmd_node keychain_node = diff --git a/lib/routemap.c b/lib/routemap.c index 10e5ed304..3f3e3c25a 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1413,9 +1413,9 @@ DEFUN (route_map, char *endptr = NULL; /* Permit check. */ - if (strncmp (argv[1], "permit", strlen (argv[1])) == 0) + if (strncmp (argv[1]->arg, "permit", strlen (argv[1]->arg)) == 0) permit = RMAP_PERMIT; - else if (strncmp (argv[1], "deny", strlen (argv[1])) == 0) + else if (strncmp (argv[1]->arg, "deny", strlen (argv[1]->arg)) == 0) permit = RMAP_DENY; else { @@ -1424,7 +1424,7 @@ DEFUN (route_map, } /* Preference check. */ - pref = strtoul (argv[2], &endptr, 10); + pref = strtoul (argv[2]->arg, &endptr, 10); if (pref == ULONG_MAX || *endptr != '\0') { vty_out (vty, "the fourth field must be positive integer%s", @@ -1438,7 +1438,7 @@ DEFUN (route_map, } /* Get route map. */ - map = route_map_get (argv[0]); + map = route_map_get (argv[0]->arg); index = route_map_index_get (map, permit, pref); vty->index = index; @@ -1455,11 +1455,11 @@ DEFUN (no_route_map_all, { struct route_map *map; - map = route_map_lookup_by_name (argv[0]); + map = route_map_lookup_by_name (argv[0]->arg); if (map == NULL) { vty_out (vty, "%% Could not find route-map %s%s", - argv[0], VTY_NEWLINE); + argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1485,9 +1485,9 @@ DEFUN (no_route_map, char *endptr = NULL; /* Permit check. */ - if (strncmp (argv[1], "permit", strlen (argv[1])) == 0) + if (strncmp (argv[1]->arg, "permit", strlen (argv[1]->arg)) == 0) permit = RMAP_PERMIT; - else if (strncmp (argv[1], "deny", strlen (argv[1])) == 0) + else if (strncmp (argv[1]->arg, "deny", strlen (argv[1]->arg)) == 0) permit = RMAP_DENY; else { @@ -1496,7 +1496,7 @@ DEFUN (no_route_map, } /* Preference. */ - pref = strtoul (argv[2], &endptr, 10); + pref = strtoul (argv[2]->arg, &endptr, 10); if (pref == ULONG_MAX || *endptr != '\0') { vty_out (vty, "the fourth field must be positive integer%s", @@ -1510,11 +1510,11 @@ DEFUN (no_route_map, } /* Existence check. */ - map = route_map_lookup_by_name (argv[0]); + map = route_map_lookup_by_name (argv[0]->arg); if (map == NULL) { vty_out (vty, "%% Could not find route-map %s%s", - argv[0], VTY_NEWLINE); + argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1523,7 +1523,7 @@ DEFUN (no_route_map, if (index == NULL) { vty_out (vty, "%% Could not find route-map entry %s %s%s", - argv[0], argv[2], VTY_NEWLINE); + argv[0]->arg, argv[2]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1598,8 +1598,8 @@ DEFUN (rmap_onmatch_goto, return CMD_WARNING; } - if (argc == 1 && argv[0]) - VTY_GET_INTEGER_RANGE("route-map index", d, argv[0], 1, 65535); + if (argc == 1 && argv[0]->arg) + VTY_GET_INTEGER_RANGE("route-map index", d, argv[0]->arg, 1, 65535); else d = index->pref + 1; @@ -1671,7 +1671,7 @@ DEFUN (rmap_show_name, { const char *name = NULL; if (argc) - name = argv[0]; + name = argv[0]->arg; return vty_show_route_map (vty, name); } @@ -1699,7 +1699,7 @@ DEFUN (rmap_call, index->map->name); XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm); } - index->nextrm = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[0]); + index->nextrm = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[0]->arg); } /* Execute event hook. */ |