diff options
Diffstat (limited to 'ripd/rip_offset.c')
| -rw-r--r-- | ripd/rip_offset.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c index 0155f90ef0..5e0e71579a 100644 --- a/ripd/rip_offset.c +++ b/ripd/rip_offset.c @@ -282,19 +282,22 @@ rip_offset_list_apply_out (struct prefix_ipv4 *p, struct interface *ifp, DEFUN (rip_offset_list, rip_offset_list_cmd, - "offset-list WORD (in|out) <0-16>", + "offset-list WORD <in|out> (0-16)", "Modify RIP metric\n" "Access-list name\n" "For incoming updates\n" "For outgoing updates\n" "Metric value\n") { - return rip_offset_list_set (vty, argv[0], argv[1], argv[2], NULL); + int idx_word = 1; + int idx_in_out = 2; + int idx_number = 3; + return rip_offset_list_set (vty, argv[idx_word]->arg, argv[idx_in_out]->arg, argv[idx_number]->arg, NULL); } DEFUN (rip_offset_list_ifname, rip_offset_list_ifname_cmd, - "offset-list WORD (in|out) <0-16> IFNAME", + "offset-list WORD <in|out> (0-16) IFNAME", "Modify RIP metric\n" "Access-list name\n" "For incoming updates\n" @@ -302,12 +305,16 @@ DEFUN (rip_offset_list_ifname, "Metric value\n" "Interface to match\n") { - return rip_offset_list_set (vty, argv[0], argv[1], argv[2], argv[3]); + int idx_word = 1; + int idx_in_out = 2; + int idx_number = 3; + int idx_ifname = 4; + return rip_offset_list_set (vty, argv[idx_word]->arg, argv[idx_in_out]->arg, argv[idx_number]->arg, argv[idx_ifname]->arg); } DEFUN (no_rip_offset_list, no_rip_offset_list_cmd, - "no offset-list WORD (in|out) <0-16>", + "no offset-list WORD <in|out> (0-16)", NO_STR "Modify RIP metric\n" "Access-list name\n" @@ -315,12 +322,15 @@ DEFUN (no_rip_offset_list, "For outgoing updates\n" "Metric value\n") { - return rip_offset_list_unset (vty, argv[0], argv[1], argv[2], NULL); + int idx_word = 2; + int idx_in_out = 3; + int idx_number = 4; + return rip_offset_list_unset (vty, argv[idx_word]->arg, argv[idx_in_out]->arg, argv[idx_number]->arg, NULL); } DEFUN (no_rip_offset_list_ifname, no_rip_offset_list_ifname_cmd, - "no offset-list WORD (in|out) <0-16> IFNAME", + "no offset-list WORD <in|out> (0-16) IFNAME", NO_STR "Modify RIP metric\n" "Access-list name\n" @@ -329,7 +339,11 @@ DEFUN (no_rip_offset_list_ifname, "Metric value\n" "Interface to match\n") { - return rip_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]); + int idx_word = 2; + int idx_in_out = 3; + int idx_number = 4; + int idx_ifname = 5; + return rip_offset_list_unset (vty, argv[idx_word]->arg, argv[idx_in_out]->arg, argv[idx_number]->arg, argv[idx_ifname]->arg); } static int |
