ospf6d: scrubbed some argc CHECK MEs

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This commit is contained in:
Daniel Walton 2016-09-30 01:27:05 +00:00
parent 58749582a9
commit 1d68dbfe66
14 changed files with 223 additions and 623 deletions

View File

@ -532,47 +532,15 @@ DEFUN (area_range,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M advertise cost <0-16777215>",
* NO_STR
* "OSPF area parameters\n"
* OSPF6_AREA_ID_STR
* "Summarize routes matching address/mask (border routers only)\n"
* "Area range prefix\n"
* "User specified metric for this range\n"
* "Advertised metric for this range\n"
*
* "no area A.B.C.D range X:X::X:X/M (advertise|not-advertise)",
* NO_STR
* "OSPF area parameters\n"
* OSPF6_AREA_ID_STR
* "Configured address range\n"
* "Specify IPv6 prefix\n"
*
* "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M cost <0-16777215>",
* NO_STR
* "OSPF area parameters\n"
* OSPF6_AREA_ID_STR
* "Summarize routes matching address/mask (border routers only)\n"
* "Area range prefix\n"
* "User specified metric for this range\n"
* "Advertised metric for this range\n"
*
*/
DEFUN (no_area_range,
no_area_range_cmd,
"no area A.B.C.D range X:X::X:X/M",
"no area A.B.C.D range X:X::X:X/M [<advertise|not-advertise>] [cost (0-16777215)]",
NO_STR
"OSPF area parameters\n"
OSPF6_AREA_ID_STR
"Configured address range\n"
"Specify IPv6 prefix\n")
{
/* CHECK ME argc referenced below */
int idx_ipv4 = 2;
int ret;
struct ospf6_area *oa;
@ -580,8 +548,6 @@ DEFUN (no_area_range,
struct ospf6_route *range, *route;
OSPF6_CMD_AREA_GET (argv[idx_ipv4]->arg, oa);
argc--;
argv++;
ret = str2prefix (argv[idx_ipv4]->arg, &prefix);
if (ret != 1 || prefix.family != AF_INET6)
@ -682,15 +648,12 @@ DEFUN (area_filter_list,
"Filter networks sent to this area\n"
"Filter networks sent from this area\n")
{
/* CHECK ME argc referenced below */
int idx_ipv4 = 1;
int idx_word = 4;
struct ospf6_area *area;
struct prefix_list *plist;
OSPF6_CMD_AREA_GET (argv[idx_ipv4]->arg, area);
argc--;
argv++;
plist = prefix_list_lookup (AFI_IP6, argv[idx_ipv4]->arg);
if (strncmp (argv[idx_word]->arg, "in", 2) == 0)
@ -727,14 +690,11 @@ DEFUN (no_area_filter_list,
"Filter networks sent to this area\n"
"Filter networks sent from this area\n")
{
/* CHECK ME argc referenced below */
int idx_ipv4 = 2;
int idx_word = 5;
struct ospf6_area *area;
OSPF6_CMD_AREA_GET (argv[idx_ipv4]->arg, area);
argc--;
argv++;
if (strncmp (argv[idx_word]->arg, "in", 2) == 0)
{

View File

@ -681,27 +681,19 @@ DEFUN (ospf6_redistribute_routemap,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no redistribute <kernel|connected|static|ripng|isis|bgp|table> route-map WORD",
* NO_STR
* "Redistribute\n"
* QUAGGA_REDIST_HELP_STR_OSPF6D
* "Route map reference\n"
* "Route map name\n"
*
*/
DEFUN (no_ospf6_redistribute,
no_ospf6_redistribute_cmd,
"no redistribute <kernel|connected|static|ripng|isis|bgp|table>",
"no redistribute <kernel|connected|static|ripng|isis|bgp|table> [route-map WORD]",
NO_STR
"Redistribute\n"
QUAGGA_REDIST_HELP_STR_OSPF6D
)
"Route map reference\n"
"Route map name\n")
{
int idx_protocol = 2;
int type;
type = proto_redistnum(AFI_IP6, argv[3]->arg);
type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
if (type < 0 || type == ZEBRA_ROUTE_OSPF6)
return CMD_WARNING;
@ -1058,24 +1050,23 @@ DEFUN (ospf6_routemap_match_interface,
}
/* "no match interface WORD" */
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no match interface WORD",
* MATCH_STR
* NO_STR
* "Match first hop interface of route\n"
* "Interface name\n"
*
*/
DEFUN (ospf6_routemap_no_match_interface,
ospf6_routemap_no_match_interface_cmd,
"no match interface",
"no match interface [WORD]",
MATCH_STR
NO_STR
"Match first hop interface of route\n")
"Match first hop interface of route\n"
"Interface name\n")
{
int ret = route_map_delete_match ((struct route_map_index *) vty->index,
"interface", argv[3]->arg);
int idx_word = 3;
int ret;
if (argc == 4)
ret = route_map_delete_match ((struct route_map_index *) vty->index,
"interface", argv[idx_word]->arg);
else
ret = route_map_delete_match ((struct route_map_index *) vty->index,
"interface", NULL);
return route_map_command_status (vty, ret);
}
@ -1126,31 +1117,22 @@ DEFUN (set_metric,
}
/* delete "set metric" */
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no set metric <0-4294967295>",
* NO_STR
* SET_STR
* "Metric value for destination routing protocol\n"
* "Metric value\n"
*
*/
DEFUN (no_set_metric,
no_set_metric_cmd,
"no set metric",
"no set metric [(0-4294967295)]",
NO_STR
SET_STR
"Metric value for destination routing protocol\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
int ret = 0;
if (argc == 0)
if (argc == 3)
ret = route_map_delete_set ((struct route_map_index *) vty->index,
"metric", NULL);
else
ret = route_map_delete_set ((struct route_map_index *) vty->index,
"metric", argv[3]->arg);
"metric", argv[idx_number]->arg);
return route_map_command_status (vty, ret);
}

View File

@ -986,32 +986,20 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp)
}
/* show interface */
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "show ipv6 ospf6 interface",
* SHOW_STR
* IP6_STR
* OSPF6_STR
* INTERFACE_STR
*
*
*/
DEFUN (show_ipv6_ospf6_interface,
show_ipv6_ospf6_interface_ifname_cmd,
"show ipv6 ospf6 interface IFNAME",
"show ipv6 ospf6 interface [IFNAME]",
SHOW_STR
IP6_STR
OSPF6_STR
INTERFACE_STR
IFNAME_STR
)
IFNAME_STR)
{
/* CHECK ME argc referenced below */
int idx_ifname = 4;
struct interface *ifp;
struct listnode *i;
if (argc)
if (argc == 5)
{
ifp = if_lookup_by_name (argv[idx_ifname]->arg);
if (ifp == NULL)
@ -1364,21 +1352,13 @@ DEFUN (auto_cost_reference_bandwidth,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no auto-cost reference-bandwidth <1-4294967>",
* NO_STR
* "Calculate OSPF interface cost according to bandwidth\n"
* "Use reference bandwidth method to assign OSPF cost\n"
* "The reference bandwidth in terms of Mbits per second\n"
*
*/
DEFUN (no_auto_cost_reference_bandwidth,
no_auto_cost_reference_bandwidth_cmd,
"no auto-cost reference-bandwidth",
"no auto-cost reference-bandwidth [1-4294967]",
NO_STR
"Calculate OSPF interface cost according to bandwidth\n"
"Use reference bandwidth method to assign OSPF cost\n")
"Use reference bandwidth method to assign OSPF cost\n"
"The reference bandwidth in terms of Mbits per second\n")
{
struct ospf6 *o = vty->index;
struct ospf6_area *oa;
@ -1993,12 +1973,11 @@ DEFUN (clear_ipv6_ospf6_interface,
IFNAME_STR
)
{
/* CHECK ME argc referenced below */
int idx_ifname = 4;
struct interface *ifp;
struct listnode *node;
if (argc == 0) /* Clear all the ospfv3 interfaces. */
if (argc == 4) /* Clear all the ospfv3 interfaces. */
{
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp))
ospf6_interface_clear (vty, ifp);

View File

@ -816,32 +816,19 @@ ospf6_lsa_handler_name (struct ospf6_lsa_handler *h)
return buf;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)",
* DEBUG_STR
* OSPF6_STR
* "Debug Link State Advertisements (LSAs)\n"
* "Specify LS type as Hexadecimal\n"
*
*
*/
DEFUN (debug_ospf6_lsa_type,
debug_ospf6_lsa_hex_cmd,
"debug ospf6 lsa <router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown>",
"debug ospf6 lsa <router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown> [originate|examine|flooding]",
DEBUG_STR
OSPF6_STR
"Debug Link State Advertisements (LSAs)\n"
"Specify LS type as Hexadecimal\n"
)
"Specify LS type as Hexadecimal\n")
{
/* CHECK ME argc referenced below */
int idx_lsa = 3;
int idx_type = 4;
unsigned int i;
struct ospf6_lsa_handler *handler = NULL;
assert (argc);
for (i = 0; i < vector_active (ospf6_lsa_handler_vector); i++)
{
handler = vector_slot (ospf6_lsa_handler_vector, i);
@ -857,13 +844,13 @@ DEFUN (debug_ospf6_lsa_type,
if (handler == NULL)
handler = &unknown_handler;
if (argc >= 2)
if (argc == 5)
{
if (! strcmp (argv[4]->arg, "originate"))
if (! strcmp (argv[idx_type]->text, "originate"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_ORIGINATE);
if (! strcmp (argv[4]->arg, "examine"))
else if (! strcmp (argv[idx_type]->text, "examine"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_EXAMIN);
if (! strcmp (argv[4]->arg, "flooding"))
else if (! strcmp (argv[idx_type]->text, "flooding"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_FLOOD);
}
else
@ -872,21 +859,9 @@ DEFUN (debug_ospf6_lsa_type,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)",
* NO_STR
* DEBUG_STR
* OSPF6_STR
* "Debug Link State Advertisements (LSAs)\n"
* "Specify LS type as Hexadecimal\n"
*
*
*/
DEFUN (no_debug_ospf6_lsa_type,
no_debug_ospf6_lsa_hex_cmd,
"no debug ospf6 lsa <router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown>",
"no debug ospf6 lsa <router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown> [originate|examine|flooding]",
NO_STR
DEBUG_STR
OSPF6_STR
@ -894,13 +869,11 @@ DEFUN (no_debug_ospf6_lsa_type,
"Specify LS type as Hexadecimal\n"
)
{
/* CHECK ME argc referenced below */
int idx_lsa = 4;
int idx_type = 5;
u_int i;
struct ospf6_lsa_handler *handler = NULL;
assert (argc);
for (i = 0; i < vector_active (ospf6_lsa_handler_vector); i++)
{
handler = vector_slot (ospf6_lsa_handler_vector, i);
@ -915,13 +888,13 @@ DEFUN (no_debug_ospf6_lsa_type,
if (handler == NULL)
return CMD_SUCCESS;
if (argc >= 2)
if (argc == 6)
{
if (! strcmp (argv[5]->arg, "originate"))
if (! strcmp (argv[idx_type]->text, "originate"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_ORIGINATE);
if (! strcmp (argv[5]->arg, "examine"))
if (! strcmp (argv[idx_type]->text, "examine"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_EXAMIN);
if (! strcmp (argv[5]->arg, "flooding"))
if (! strcmp (argv[idx_type]->text, "flooding"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_FLOOD);
}
else

View File

@ -2338,27 +2338,9 @@ ospf6_lsack_send_interface (struct thread *thread)
/* Commands */
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)",
* DEBUG_STR
* OSPF6_STR
* "Debug OSPFv3 message\n"
* "Debug Unknown message\n"
* "Debug Hello message\n"
* "Debug Database Description message\n"
* "Debug Link State Request message\n"
* "Debug Link State Update message\n"
* "Debug Link State Acknowledgement message\n"
* "Debug All message\n"
* "Debug only sending message\n"
* "Debug only receiving message\n"
*
*
*/
DEFUN (debug_ospf6_message,
debug_ospf6_message_cmd,
"debug ospf6 message <unknown|hello|dbdesc|lsreq|lsupdate|lsack|all>",
"debug ospf6 message <unknown|hello|dbdesc|lsreq|lsupdate|lsack|all> [<send|recv>]",
DEBUG_STR
OSPF6_STR
"Debug OSPFv3 message\n"
@ -2369,16 +2351,15 @@ DEFUN (debug_ospf6_message,
"Debug Link State Update message\n"
"Debug Link State Acknowledgement message\n"
"Debug All message\n"
)
"Debug only sending message\n"
"Debug only receiving message\n")
{
/* CHECK ME argc referenced below */
int idx_packet = 3;
int idx_send_recv = 4;
unsigned char level = 0;
int type = 0;
int i;
assert (argc > 0);
/* check type */
if (! strncmp (argv[idx_packet]->arg, "u", 1))
type = OSPF6_MESSAGE_TYPE_UNKNOWN;
@ -2395,11 +2376,11 @@ DEFUN (debug_ospf6_message,
else if (! strncmp (argv[idx_packet]->arg, "a", 1))
type = OSPF6_MESSAGE_TYPE_ALL;
if (argc == 1)
if (argc == 4)
level = OSPF6_DEBUG_MESSAGE_SEND | OSPF6_DEBUG_MESSAGE_RECV;
else if (! strncmp (argv[4]->arg, "s", 1))
else if (! strncmp (argv[idx_send_recv]->arg, "s", 1))
level = OSPF6_DEBUG_MESSAGE_SEND;
else if (! strncmp (argv[4]->arg, "r", 1))
else if (! strncmp (argv[idx_send_recv]->arg, "r", 1))
level = OSPF6_DEBUG_MESSAGE_RECV;
if (type == OSPF6_MESSAGE_TYPE_ALL)
@ -2413,31 +2394,9 @@ DEFUN (debug_ospf6_message,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf6 message "
* "(unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)",
* NO_STR
* DEBUG_STR
* OSPF6_STR
* "Debug OSPFv3 message\n"
* "Debug Unknown message\n"
* "Debug Hello message\n"
* "Debug Database Description message\n"
* "Debug Link State Request message\n"
* "Debug Link State Update message\n"
* "Debug Link State Acknowledgement message\n"
* "Debug All message\n"
* "Debug only sending message\n"
* "Debug only receiving message\n"
*
*
*/
DEFUN (no_debug_ospf6_message,
no_debug_ospf6_message_cmd,
"no debug ospf6 message <unknown|hello|dbdesc|lsreq|lsupdate|lsack|all>",
"no debug ospf6 message <unknown|hello|dbdesc|lsreq|lsupdate|lsack|all> [<send|recv>]",
NO_STR
DEBUG_STR
OSPF6_STR
@ -2449,16 +2408,15 @@ DEFUN (no_debug_ospf6_message,
"Debug Link State Update message\n"
"Debug Link State Acknowledgement message\n"
"Debug All message\n"
)
"Debug only sending message\n"
"Debug only receiving message\n")
{
/* CHECK ME argc referenced below */
int idx_packet = 4;
int idx_send_recv = 5;
unsigned char level = 0;
int type = 0;
int i;
assert (argc > 0);
/* check type */
if (! strncmp (argv[idx_packet]->arg, "u", 1))
type = OSPF6_MESSAGE_TYPE_UNKNOWN;
@ -2475,11 +2433,11 @@ DEFUN (no_debug_ospf6_message,
else if (! strncmp (argv[idx_packet]->arg, "a", 1))
type = OSPF6_MESSAGE_TYPE_ALL;
if (argc == 1)
if (argc == 5)
level = OSPF6_DEBUG_MESSAGE_SEND | OSPF6_DEBUG_MESSAGE_RECV;
else if (! strncmp (argv[5]->arg, "s", 1))
else if (! strncmp (argv[idx_send_recv]->arg, "s", 1))
level = OSPF6_DEBUG_MESSAGE_SEND;
else if (! strncmp (argv[5]->arg, "r", 1))
else if (! strncmp (argv[idx_send_recv]->arg, "r", 1))
level = OSPF6_DEBUG_MESSAGE_RECV;
if (type == OSPF6_MESSAGE_TYPE_ALL)

View File

@ -827,28 +827,17 @@ ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on)
ospf6_bfd_show_info(vty, on->bfd_info, 0);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "show ipv6 ospf6 neighbor (detail|drchoice)",
* SHOW_STR
* IP6_STR
* OSPF6_STR
* "Neighbor list\n"
* "Display details\n"
* "Display DR choices\n"
*
*
*/
DEFUN (show_ipv6_ospf6_neighbor,
show_ipv6_ospf6_neighbor_cmd,
"show ipv6 ospf6 neighbor",
"show ipv6 ospf6 neighbor [detail|drchoice]",
SHOW_STR
IP6_STR
OSPF6_STR
"Neighbor list\n"
)
"Display details\n"
"Display DR choices\n")
{
/* CHECK ME argc referenced below */
int idx_type = 4;
struct ospf6_neighbor *on;
struct ospf6_interface *oi;
struct ospf6_area *oa;
@ -858,11 +847,11 @@ DEFUN (show_ipv6_ospf6_neighbor,
OSPF6_CMD_CHECK_RUNNING ();
showfunc = ospf6_neighbor_show;
if (argc)
if (argc == 5)
{
if (! strncmp (argv[4]->arg, "de", 2))
if (! strncmp (argv[idx_type]->arg, "de", 2))
showfunc = ospf6_neighbor_show_detail;
else if (! strncmp (argv[4]->arg, "dr", 2))
else if (! strncmp (argv[idx_type]->arg, "dr", 2))
showfunc = ospf6_neighbor_show_drchoice;
}
@ -927,32 +916,23 @@ ospf6_neighbor_init (void)
install_element (ENABLE_NODE, &show_ipv6_ospf6_neighbor_cmd);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf6 neighbor (state|event)",
* DEBUG_STR
* OSPF6_STR
* "Debug OSPFv3 Neighbor\n"
* "Debug OSPFv3 Neighbor State Change\n"
* "Debug OSPFv3 Neighbor Event\n"
*
*
*/
DEFUN (debug_ospf6_neighbor,
debug_ospf6_neighbor_cmd,
"debug ospf6 neighbor",
"debug ospf6 neighbor [state|event]",
DEBUG_STR
OSPF6_STR
"Debug OSPFv3 Neighbor\n"
)
"Debug OSPFv3 Neighbor State Change\n"
"Debug OSPFv3 Neighbor Event\n")
{
/* CHECK ME argc referenced below */
int idx_type = 3;
unsigned char level = 0;
if (argc)
if (argc == 4)
{
if (! strncmp (argv[3]->arg, "s", 1))
if (! strncmp (argv[idx_type]->arg, "s", 1))
level = OSPF6_DEBUG_NEIGHBOR_STATE;
if (! strncmp (argv[3]->arg, "e", 1))
else if (! strncmp (argv[idx_type]->arg, "e", 1))
level = OSPF6_DEBUG_NEIGHBOR_EVENT;
}
else
@ -963,34 +943,24 @@ DEFUN (debug_ospf6_neighbor,
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf6 neighbor (state|event)",
* NO_STR
* DEBUG_STR
* OSPF6_STR
* "Debug OSPFv3 Neighbor\n"
* "Debug OSPFv3 Neighbor State Change\n"
* "Debug OSPFv3 Neighbor Event\n"
*
*
*/
DEFUN (no_debug_ospf6_neighbor,
no_debug_ospf6_neighbor_cmd,
"no debug ospf6 neighbor",
"no debug ospf6 neighbor [state|event]",
NO_STR
DEBUG_STR
OSPF6_STR
"Debug OSPFv3 Neighbor\n"
)
"Debug OSPFv3 Neighbor State Change\n"
"Debug OSPFv3 Neighbor Event\n")
{
/* CHECK ME argc referenced below */
int idx_type = 4;
unsigned char level = 0;
if (argc)
if (argc == 5)
{
if (! strncmp (argv[4]->arg, "s", 1))
if (! strncmp (argv[idx_type]->arg, "s", 1))
level = OSPF6_DEBUG_NEIGHBOR_STATE;
if (! strncmp (argv[4]->arg, "e", 1))
if (! strncmp (argv[idx_type]->arg, "e", 1))
level = OSPF6_DEBUG_NEIGHBOR_EVENT;
}
else

View File

@ -1298,7 +1298,7 @@ ospf6_route_show_table (struct vty *vty, int detail,
}
int
ospf6_route_table_show (struct vty *vty, int argc, struct cmd_token **argv,
ospf6_route_table_show (struct vty *vty, int argc_start, int argc, struct cmd_token **argv,
struct ospf6_route_table *table)
{
int summary = 0;
@ -1312,7 +1312,7 @@ ospf6_route_table_show (struct vty *vty, int argc, struct cmd_token **argv,
memset (&prefix, 0, sizeof (struct prefix));
for (i = 0; i < argc; i++)
for (i = argc_start; i < argc; i++)
{
if (! strcmp (argv[i]->arg, "summary"))
{

View File

@ -328,7 +328,7 @@ extern void ospf6_route_dump (struct ospf6_route_table *table);
extern void ospf6_route_show (struct vty *vty, struct ospf6_route *route);
extern void ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route);
extern int ospf6_route_table_show (struct vty *, int, struct cmd_token **,
extern int ospf6_route_table_show (struct vty *, int, int, struct cmd_token **,
struct ospf6_route_table *);
extern int ospf6_linkstate_table_show (struct vty *vty, int argc,
struct cmd_token **argv,

View File

@ -885,18 +885,11 @@ DEFUN (ospf6_timers_throttle_spf,
"Initial hold time (msec) between consecutive SPF calculations\n"
"Maximum hold time (msec)\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
int idx_number_2 = 4;
int idx_number_3 = 5;
unsigned int delay, hold, max;
if (argc != 3)
{
vty_out (vty, "Insufficient arguments%s", VTY_NEWLINE);
return CMD_WARNING;
}
VTY_GET_INTEGER_RANGE ("SPF delay timer", delay, argv[idx_number]->arg, 0, 600000);
VTY_GET_INTEGER_RANGE ("SPF hold timer", hold, argv[idx_number_2]->arg, 0, 600000);
VTY_GET_INTEGER_RANGE ("SPF max-hold timer", max, argv[idx_number_3]->arg, 0, 600000);
@ -904,25 +897,16 @@ DEFUN (ospf6_timers_throttle_spf,
return ospf6_timers_spf_set (vty, delay, hold, max);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no timers throttle spf <0-600000> <0-600000> <0-600000>",
* NO_STR
* "Adjust routing timers\n"
* "Throttling adaptive timer\n"
* "OSPF6 SPF timers\n"
* "Delay (msec) from first change received till SPF calculation\n"
* "Initial hold time (msec) between consecutive SPF calculations\n"
* "Maximum hold time (msec)\n"
*
*/
DEFUN (no_ospf6_timers_throttle_spf,
no_ospf6_timers_throttle_spf_cmd,
"no timers throttle spf",
"no timers throttle spf [(0-600000) (0-600000) (0-600000)]",
NO_STR
"Adjust routing timers\n"
"Throttling adaptive timer\n"
"OSPF6 SPF timers\n")
"OSPF6 SPF timers\n"
"Delay (msec) from first change received till SPF calculation\n"
"Initial hold time (msec) between consecutive SPF calculations\n"
"Maximum hold time (msec)\n")
{
return ospf6_timers_spf_set (vty,
OSPF_SPF_DELAY_DEFAULT,

View File

@ -405,7 +405,6 @@ DEFUN (ospf6_timers_lsa,
"Minimum delay in receiving new version of a LSA\n"
"Delay in milliseconds\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
unsigned int minarrival;
struct ospf6 *ospf = vty->index;
@ -413,47 +412,30 @@ DEFUN (ospf6_timers_lsa,
if (!ospf)
return CMD_SUCCESS;
if (argc != 1)
{
vty_out (vty, "Insufficient number of arguments%s", VTY_NEWLINE);
return CMD_WARNING;
}
VTY_GET_INTEGER ("LSA min-arrival", minarrival, argv[idx_number]->arg);
ospf->lsa_minarrival = minarrival;
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no timers lsa min-arrival <0-600000>",
* NO_STR
* "Adjust routing timers\n"
* "OSPF6 LSA timers\n"
* "Minimum delay in receiving new version of a LSA\n"
* "Delay in milliseconds\n"
*
*/
DEFUN (no_ospf6_timers_lsa,
no_ospf6_timers_lsa_cmd,
"no timers lsa min-arrival",
"no timers lsa min-arrival [(0-600000)]",
NO_STR
"Adjust routing timers\n"
"OSPF6 LSA timers\n"
"Minimum delay in receiving new version of a LSA\n")
{
/* CHECK ME argc referenced below */
int idx_number = 4;
unsigned int minarrival;
struct ospf6 *ospf = vty->index;
if (!ospf)
return CMD_SUCCESS;
if (argc)
if (argc == 5)
{
VTY_GET_INTEGER ("LSA min-arrival", minarrival, argv[4]->arg);
VTY_GET_INTEGER ("LSA min-arrival", minarrival, argv[idx_number]->arg);
if (ospf->lsa_minarrival != minarrival ||
minarrival == OSPF_MIN_LS_ARRIVAL)
@ -784,75 +766,42 @@ DEFUN (show_ipv6_ospf6,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)",
* SHOW_STR
* IP6_STR
* OSPF6_STR
* ROUTE_STR
* "Display Intra-Area routes\n"
* "Display Inter-Area routes\n"
* "Display Type-1 External routes\n"
* "Display Type-2 External routes\n"
*
*
* "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)",
* SHOW_STR
* IP6_STR
* OSPF6_STR
* ROUTE_STR
* "Specify IPv6 address\n"
* "Specify IPv6 prefix\n"
* "Detailed information\n"
* "Summary of route table\n"
*
*
*/
DEFUN (show_ipv6_ospf6_route,
show_ipv6_ospf6_route_cmd,
"show ipv6 ospf6 route",
"show ipv6 ospf6 route [intra-area|inter-area|external-1|external-2|X:X::X:X|X:X::X:X/M|detail|summary]",
SHOW_STR
IP6_STR
OSPF6_STR
ROUTE_STR
)
"Display Intra-Area routes\n"
"Display Inter-Area routes\n"
"Display Type-1 External routes\n"
"Display Type-2 External routes\n"
"Specify IPv6 address\n"
"Specify IPv6 prefix\n"
"Detailed information\n"
"Summary of route table\n")
{
/* CHECK ME argc referenced below */
OSPF6_CMD_CHECK_RUNNING ();
ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
ospf6_route_table_show (vty, 4, argc, argv, ospf6->route_table);
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "show ipv6 ospf6 route X:X::X:X/M longer",
* SHOW_STR
* IP6_STR
* OSPF6_STR
* ROUTE_STR
* "Specify IPv6 prefix\n"
* "Display routes longer than the specified route\n"
*
*
*/
DEFUN (show_ipv6_ospf6_route_match,
show_ipv6_ospf6_route_match_cmd,
"show ipv6 ospf6 route X:X::X:X/M match",
"show ipv6 ospf6 route X:X::X:X/M <match|longer>",
SHOW_STR
IP6_STR
OSPF6_STR
ROUTE_STR
"Specify IPv6 prefix\n"
"Display routes which match the specified route\n"
)
"Display routes longer than the specified route\n")
{
/* CHECK ME argc referenced below */
OSPF6_CMD_CHECK_RUNNING ();
ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
ospf6_route_table_show (vty, 4, argc, argv, ospf6->route_table);
return CMD_SUCCESS;
}
@ -868,10 +817,9 @@ DEFUN (show_ipv6_ospf6_route_match_detail,
"Detailed information\n"
)
{
/* CHECK ME argc referenced below */
OSPF6_CMD_CHECK_RUNNING ();
ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
ospf6_route_table_show (vty, 4, argc, argv, ospf6->route_table);
return CMD_SUCCESS;
}
@ -891,10 +839,9 @@ DEFUN (show_ipv6_ospf6_route_type_detail,
"Detailed information\n"
)
{
/* CHECK ME argc referenced below */
OSPF6_CMD_CHECK_RUNNING ();
ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
ospf6_route_table_show (vty, 4, argc, argv, ospf6->route_table);
return CMD_SUCCESS;
}

View File

@ -707,18 +707,9 @@ ospf6_zebra_init (struct thread_master *master)
/* Debug */
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf6 zebra",
* DEBUG_STR
* OSPF6_STR
* "Debug connection between zebra\n"
*
*
*/
DEFUN (debug_ospf6_zebra_sendrecv,
debug_ospf6_zebra_sendrecv_cmd,
"debug ospf6 zebra <send|recv>",
"debug ospf6 zebra [<send|recv>]",
DEBUG_STR
OSPF6_STR
"Debug connection between zebra\n"
@ -726,15 +717,14 @@ DEFUN (debug_ospf6_zebra_sendrecv,
"Debug Receiving zebra\n"
)
{
/* CHECK ME argc referenced below */
int idx_send_recv = 3;
unsigned char level = 0;
if (argc)
if (argc == 4)
{
if (! strncmp (argv[idx_send_recv]->arg, "s", 1))
if (strmatch(argv[idx_send_recv]->text, "send"))
level = OSPF6_DEBUG_ZEBRA_SEND;
else if (! strncmp (argv[idx_send_recv]->arg, "r", 1))
else if (strmatch(argv[idx_send_recv]->text, "recv"))
level = OSPF6_DEBUG_ZEBRA_RECV;
}
else
@ -744,21 +734,9 @@ DEFUN (debug_ospf6_zebra_sendrecv,
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf6 zebra",
* NO_STR
* DEBUG_STR
* OSPF6_STR
* "Debug connection between zebra\n"
*
*
*/
DEFUN (no_debug_ospf6_zebra_sendrecv,
no_debug_ospf6_zebra_sendrecv_cmd,
"no debug ospf6 zebra <send|recv>",
"no debug ospf6 zebra [<send|recv>]",
NO_STR
DEBUG_STR
OSPF6_STR
@ -767,15 +745,14 @@ DEFUN (no_debug_ospf6_zebra_sendrecv,
"Debug Receiving zebra\n"
)
{
/* CHECK ME argc referenced below */
int idx_send_recv = 4;
unsigned char level = 0;
if (argc)
if (argc == 5)
{
if (! strncmp (argv[idx_send_recv]->arg, "s", 1))
if (strmatch(argv[idx_send_recv]->text, "send"))
level = OSPF6_DEBUG_ZEBRA_SEND;
else if (! strncmp (argv[idx_send_recv]->arg, "r", 1))
else if (strmatch(argv[idx_send_recv]->text, "recv"))
level = OSPF6_DEBUG_ZEBRA_RECV;
}
else

View File

@ -1028,11 +1028,11 @@ debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token
DEBUG_ON (nsm, NSM);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "s", 1) == 0)
if (strmatch(argv[arg_base]->text, "status"))
DEBUG_ON (nsm, NSM_STATUS);
else if (strncmp (argv[arg_base + 0]->arg, "e", 1) == 0)
else if (strmatch(argv[arg_base]->text, "events"))
DEBUG_ON (nsm, NSM_EVENTS);
else if (strncmp (argv[arg_base + 0]->arg, "t", 1) == 0)
else if (strmatch(argv[arg_base]->text, "timers"))
DEBUG_ON (nsm, NSM_TIMERS);
}
@ -1044,61 +1044,41 @@ debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token
TERM_DEBUG_ON (nsm, NSM);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "s", 1) == 0)
if (strmatch(argv[arg_base]->text, "status"))
TERM_DEBUG_ON (nsm, NSM_STATUS);
else if (strncmp (argv[arg_base + 0]->arg, "e", 1) == 0)
else if (strmatch(argv[arg_base]->text, "events"))
TERM_DEBUG_ON (nsm, NSM_EVENTS);
else if (strncmp (argv[arg_base + 0]->arg, "t", 1) == 0)
else if (strmatch(argv[arg_base]->text, "timers"))
TERM_DEBUG_ON (nsm, NSM_TIMERS);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf nsm (status|events|timers)",
* DEBUG_STR
* OSPF_STR
* "OSPF Neighbor State Machine\n"
* "NSM Status Information\n"
* "NSM Event Information\n"
* "NSM Timer Information\n"
*
*/
DEFUN (debug_ospf_nsm,
debug_ospf_nsm_cmd,
"debug ospf nsm",
"debug ospf nsm [status|events|timers]",
DEBUG_STR
OSPF_STR
"OSPF Neighbor State Machine\n")
"OSPF Neighbor State Machine\n"
"NSM Status Information\n"
"NSM Event Information\n"
"NSM Timer Information\n")
{
/* CHECK ME argc referenced below */
return debug_ospf_nsm_common (vty, 0, argc, argv);
return debug_ospf_nsm_common (vty, 3, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf <1-65535> nsm (status|events|timers)",
* DEBUG_STR
* OSPF_STR
* "Instance ID\n"
* "OSPF Neighbor State Machine\n"
* "NSM Status Information\n"
* "NSM Event Information\n"
* "NSM Timer Information\n"
*
*/
DEFUN (debug_ospf_instance_nsm,
debug_ospf_instance_nsm_cmd,
"debug ospf (1-65535) nsm",
"debug ospf (1-65535) nsm [status|events|timers]",
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Neighbor State Machine\n")
"OSPF Neighbor State Machine\n"
"NSM Status Information\n"
"NSM Event Information\n"
"NSM Timer Information\n")
{
/* CHECK ME argc referenced below */
int idx_number = 2;
u_short instance = 0;
@ -1106,7 +1086,7 @@ DEFUN (debug_ospf_instance_nsm,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return debug_ospf_nsm_common (vty, 1, argc, argv);
return debug_ospf_nsm_common (vty, 4, argc, argv);
}
@ -1119,11 +1099,11 @@ no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_to
DEBUG_OFF (nsm, NSM);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "s", 1) == 0)
if (strmatch(argv[arg_base]->text, "status"))
DEBUG_OFF (nsm, NSM_STATUS);
else if (strncmp (argv[arg_base + 0]->arg, "e", 1) == 0)
else if (strmatch(argv[arg_base]->text, "events"))
DEBUG_OFF (nsm, NSM_EVENTS);
else if (strncmp (argv[arg_base + 0]->arg, "t", 1) == 0)
else if (strmatch(argv[arg_base]->text, "timers"))
DEBUG_OFF (nsm, NSM_TIMERS);
}
@ -1135,65 +1115,44 @@ no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_to
TERM_DEBUG_OFF (nsm, NSM);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "s", 1) == 0)
if (strmatch(argv[arg_base]->text, "status"))
TERM_DEBUG_OFF (nsm, NSM_STATUS);
else if (strncmp (argv[arg_base + 0]->arg, "e", 1) == 0)
else if (strmatch(argv[arg_base]->text, "events"))
TERM_DEBUG_OFF (nsm, NSM_EVENTS);
else if (strncmp (argv[arg_base + 0]->arg, "t", 1) == 0)
else if (strmatch(argv[arg_base]->text, "timers"))
TERM_DEBUG_OFF (nsm, NSM_TIMERS);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf nsm (status|events|timers)",
* NO_STR
* "Debugging functions\n"
* "OSPF information\n"
* "OSPF Interface State Machine\n"
* "NSM Status Information\n"
* "NSM Event Information\n"
* "NSM Timer Information\n"
*
*/
DEFUN (no_debug_ospf_nsm,
no_debug_ospf_nsm_cmd,
"no debug ospf nsm",
"no debug ospf nsm [status|events|timers]",
NO_STR
DEBUG_STR
OSPF_STR
"OSPF Neighbor State Machine")
"OSPF Neighbor State Machine"
"NSM Status Information\n"
"NSM Event Information\n"
"NSM Timer Information\n")
{
/* CHECK ME argc referenced below */
return no_debug_ospf_nsm_common(vty, 0, argc, argv);
return no_debug_ospf_nsm_common(vty, 4, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf <1-65535> nsm (status|events|timers)",
* NO_STR
* "Debugging functions\n"
* "OSPF information\n"
* "Instance ID\n"
* "OSPF Interface State Machine\n"
* "NSM Status Information\n"
* "NSM Event Information\n"
* "NSM Timer Information\n"
*
*/
DEFUN (no_debug_ospf_instance_nsm,
no_debug_ospf_instance_nsm_cmd,
"no debug ospf (1-65535) nsm",
"no debug ospf (1-65535) nsm [status|events|timers]",
NO_STR
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Neighbor State Machine")
"OSPF Neighbor State Machine"
"NSM Status Information\n"
"NSM Event Information\n"
"NSM Timer Information\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
u_short instance = 0;
@ -1201,11 +1160,10 @@ DEFUN (no_debug_ospf_instance_nsm,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return no_debug_ospf_nsm_common(vty, 1, argc, argv);
return no_debug_ospf_nsm_common(vty, 5, argc, argv);
}
static int
debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv)
{
@ -1215,13 +1173,13 @@ debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token
DEBUG_ON (lsa, LSA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "g", 1) == 0)
if (strmatch(argv[arg_base]->text, "generate"))
DEBUG_ON (lsa, LSA_GENERATE);
else if (strncmp (argv[arg_base + 0]->arg, "f", 1) == 0)
else if (strmatch(argv[arg_base]->text, "flooding"))
DEBUG_ON (lsa, LSA_FLOODING);
else if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
else if (strmatch(argv[arg_base]->text, "install"))
DEBUG_ON (lsa, LSA_INSTALL);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "refresh"))
DEBUG_ON (lsa, LSA_REFRESH);
}
@ -1233,65 +1191,45 @@ debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token
TERM_DEBUG_ON (lsa, LSA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "g", 1) == 0)
if (strmatch(argv[arg_base]->text, "generate"))
TERM_DEBUG_ON (lsa, LSA_GENERATE);
else if (strncmp (argv[arg_base + 0]->arg, "f", 1) == 0)
else if (strmatch(argv[arg_base]->text, "flooding"))
TERM_DEBUG_ON (lsa, LSA_FLOODING);
else if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
else if (strmatch(argv[arg_base]->text, "install"))
TERM_DEBUG_ON (lsa, LSA_INSTALL);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "refresh"))
TERM_DEBUG_ON (lsa, LSA_REFRESH);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf lsa (generate|flooding|install|refresh)",
* DEBUG_STR
* OSPF_STR
* "OSPF Link State Advertisement\n"
* "LSA Generation\n"
* "LSA Flooding\n"
* "LSA Install/Delete\n"
* "LSA Refresh\n"
*
*/
DEFUN (debug_ospf_lsa,
debug_ospf_lsa_cmd,
"debug ospf lsa",
"debug ospf lsa [generate|flooding|install|refresh]",
DEBUG_STR
OSPF_STR
"OSPF Link State Advertisement\n")
"OSPF Link State Advertisement\n"
"LSA Generation\n"
"LSA Flooding\n"
"LSA Install/Delete\n"
"LSA Refresh\n")
{
/* CHECK ME argc referenced below */
return debug_ospf_lsa_common(vty, 0, argc, argv);
return debug_ospf_lsa_common(vty, 3, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf <1-65535> lsa (generate|flooding|install|refresh)",
* DEBUG_STR
* OSPF_STR
* "Instance ID\n"
* "OSPF Link State Advertisement\n"
* "LSA Generation\n"
* "LSA Flooding\n"
* "LSA Install/Delete\n"
* "LSA Refresh\n"
*
*/
DEFUN (debug_ospf_instance_lsa,
debug_ospf_instance_lsa_cmd,
"debug ospf (1-65535) lsa",
"debug ospf (1-65535) lsa [generate|flooding|install|refresh]",
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Link State Advertisement\n")
"OSPF Link State Advertisement\n"
"LSA Generation\n"
"LSA Flooding\n"
"LSA Install/Delete\n"
"LSA Refresh\n")
{
/* CHECK ME argc referenced below */
int idx_number = 2;
u_short instance = 0;
@ -1299,7 +1237,7 @@ DEFUN (debug_ospf_instance_lsa,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return debug_ospf_lsa_common(vty, 1, argc, argv);
return debug_ospf_lsa_common(vty, 4, argc, argv);
}
@ -1312,13 +1250,13 @@ no_debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_to
DEBUG_OFF (lsa, LSA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "g", 1) == 0)
if (strmatch(argv[arg_base]->text, "generate"))
DEBUG_OFF (lsa, LSA_GENERATE);
else if (strncmp (argv[arg_base + 0]->arg, "f", 1) == 0)
else if (strmatch(argv[arg_base]->text, "flooding"))
DEBUG_OFF (lsa, LSA_FLOODING);
else if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
else if (strmatch(argv[arg_base]->text, "install"))
DEBUG_OFF (lsa, LSA_INSTALL);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "refresh"))
DEBUG_OFF (lsa, LSA_REFRESH);
}
@ -1330,69 +1268,47 @@ no_debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_to
TERM_DEBUG_OFF (lsa, LSA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "g", 1) == 0)
if (strmatch(argv[arg_base]->text, "generate"))
TERM_DEBUG_OFF (lsa, LSA_GENERATE);
else if (strncmp (argv[arg_base + 0]->arg, "f", 1) == 0)
else if (strmatch(argv[arg_base]->text, "flooding"))
TERM_DEBUG_OFF (lsa, LSA_FLOODING);
else if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
else if (strmatch(argv[arg_base]->text, "install"))
TERM_DEBUG_OFF (lsa, LSA_INSTALL);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "refresh"))
TERM_DEBUG_OFF (lsa, LSA_REFRESH);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf lsa (generate|flooding|install|refresh)",
* NO_STR
* DEBUG_STR
* OSPF_STR
* "OSPF Link State Advertisement\n"
* "LSA Generation\n"
* "LSA Flooding\n"
* "LSA Install/Delete\n"
* "LSA Refres\n"
*
*/
DEFUN (no_debug_ospf_lsa,
no_debug_ospf_lsa_cmd,
"no debug ospf lsa",
"no debug ospf lsa [generate|flooding|install|refresh]",
NO_STR
DEBUG_STR
OSPF_STR
"OSPF Link State Advertisement\n")
"OSPF Link State Advertisement\n"
"LSA Generation\n"
"LSA Flooding\n"
"LSA Install/Delete\n"
"LSA Refres\n")
{
/* CHECK ME argc referenced below */
return no_debug_ospf_lsa_common (vty, 0, argc, argv);
return no_debug_ospf_lsa_common (vty, 4, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf <1-65535> lsa (generate|flooding|install|refresh)",
* NO_STR
* DEBUG_STR
* OSPF_STR
* "Instance ID\n"
* "OSPF Link State Advertisement\n"
* "LSA Generation\n"
* "LSA Flooding\n"
* "LSA Install/Delete\n"
* "LSA Refres\n"
*
*/
DEFUN (no_debug_ospf_instance_lsa,
no_debug_ospf_instance_lsa_cmd,
"no debug ospf (1-65535) lsa",
"no debug ospf (1-65535) lsa [generate|flooding|install|refresh]",
NO_STR
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Link State Advertisement\n")
"OSPF Link State Advertisement\n"
"LSA Generation\n"
"LSA Flooding\n"
"LSA Install/Delete\n"
"LSA Refres\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
u_short instance = 0;
@ -1400,11 +1316,10 @@ DEFUN (no_debug_ospf_instance_lsa,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return no_debug_ospf_lsa_common (vty, 1, argc, argv);
return no_debug_ospf_lsa_common (vty, 5, argc, argv);
}
static int
debug_ospf_zebra_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv)
{
@ -1414,9 +1329,9 @@ debug_ospf_zebra_common (struct vty *vty, int arg_base, int argc, struct cmd_tok
DEBUG_ON (zebra, ZEBRA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
if (strmatch(argv[arg_base]->text, "interface"))
DEBUG_ON (zebra, ZEBRA_INTERFACE);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "redistribute"))
DEBUG_ON (zebra, ZEBRA_REDISTRIBUTE);
}
@ -1428,57 +1343,37 @@ debug_ospf_zebra_common (struct vty *vty, int arg_base, int argc, struct cmd_tok
TERM_DEBUG_ON (zebra, ZEBRA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
if (strmatch(argv[arg_base]->text, "interface"))
TERM_DEBUG_ON (zebra, ZEBRA_INTERFACE);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "redistribute"))
TERM_DEBUG_ON (zebra, ZEBRA_REDISTRIBUTE);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf zebra (interface|redistribute)",
* DEBUG_STR
* OSPF_STR
* "OSPF Zebra information\n"
* "Zebra interface\n"
* "Zebra redistribute\n"
*
*/
DEFUN (debug_ospf_zebra,
debug_ospf_zebra_cmd,
"debug ospf zebra",
"debug ospf zebra [interface|redistribute]",
DEBUG_STR
OSPF_STR
"OSPF Zebra information\n")
"OSPF Zebra information\n"
"Zebra interface\n"
"Zebra redistribute\n")
{
/* CHECK ME argc referenced below */
return debug_ospf_zebra_common(vty, 0, argc, argv);
return debug_ospf_zebra_common(vty, 3, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "debug ospf <1-65535> zebra (interface|redistribute)",
* DEBUG_STR
* OSPF_STR
* "Instance ID\n"
* "OSPF Zebra information\n"
* "Zebra interface\n"
* "Zebra redistribute\n"
*
*/
DEFUN (debug_ospf_instance_zebra,
debug_ospf_instance_zebra_cmd,
"debug ospf (1-65535) zebra",
"debug ospf (1-65535) zebra [interface|redistribute]",
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Zebra information\n")
"OSPF Zebra information\n"
"Zebra interface\n"
"Zebra redistribute\n")
{
/* CHECK ME argc referenced below */
int idx_number = 2;
u_short instance = 0;
@ -1486,7 +1381,7 @@ DEFUN (debug_ospf_instance_zebra,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return debug_ospf_zebra_common(vty, 1, argc, argv);
return debug_ospf_zebra_common(vty, 4, argc, argv);
}
@ -1500,9 +1395,9 @@ no_debug_ospf_zebra_common(struct vty *vty, int arg_base, int argc,
DEBUG_OFF (zebra, ZEBRA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
if (strmatch(argv[arg_base]->text, "interface"))
DEBUG_OFF (zebra, ZEBRA_INTERFACE);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "redistribute"))
DEBUG_OFF (zebra, ZEBRA_REDISTRIBUTE);
}
@ -1514,61 +1409,39 @@ no_debug_ospf_zebra_common(struct vty *vty, int arg_base, int argc,
TERM_DEBUG_OFF (zebra, ZEBRA);
else if (argc == arg_base + 1)
{
if (strncmp (argv[arg_base + 0]->arg, "i", 1) == 0)
if (strmatch(argv[arg_base]->text, "interface"))
TERM_DEBUG_OFF (zebra, ZEBRA_INTERFACE);
else if (strncmp (argv[arg_base + 0]->arg, "r", 1) == 0)
else if (strmatch(argv[arg_base]->text, "redistribute"))
TERM_DEBUG_OFF (zebra, ZEBRA_REDISTRIBUTE);
}
return CMD_SUCCESS;
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf zebra (interface|redistribute)",
* NO_STR
* DEBUG_STR
* OSPF_STR
* "OSPF Zebra information\n"
* "Zebra interface\n"
* "Zebra redistribute\n"
*
*/
DEFUN (no_debug_ospf_zebra,
no_debug_ospf_zebra_cmd,
"no debug ospf zebra",
"no debug ospf zebra [interface|redistribute]",
NO_STR
DEBUG_STR
OSPF_STR
"OSPF Zebra information\n")
"OSPF Zebra information\n"
"Zebra interface\n"
"Zebra redistribute\n")
{
/* CHECK ME argc referenced below */
return no_debug_ospf_zebra_common(vty, 0, argc, argv);
return no_debug_ospf_zebra_common(vty, 4, argc, argv);
}
/*
* CHECK ME - The following ALIASes need to be implemented in this DEFUN
* "no debug ospf <1-65535> zebra (interface|redistribute)",
* NO_STR
* DEBUG_STR
* OSPF_STR
* "Instance ID\n"
* "OSPF Zebra information\n"
* "Zebra interface\n"
* "Zebra redistribute\n"
*
*/
DEFUN (no_debug_ospf_instance_zebra,
no_debug_ospf_instance_zebra_cmd,
"no debug ospf (1-65535) zebra",
"no debug ospf (1-65535) zebra [interface|redistribute]",
NO_STR
DEBUG_STR
OSPF_STR
"Instance ID\n"
"OSPF Zebra information\n")
"OSPF Zebra information\n"
"Zebra interface\n"
"Zebra redistribute\n")
{
/* CHECK ME argc referenced below */
int idx_number = 3;
u_short instance = 0;
@ -1576,7 +1449,7 @@ DEFUN (no_debug_ospf_instance_zebra,
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
return no_debug_ospf_zebra_common(vty, 1, argc, argv);
return no_debug_ospf_zebra_common(vty, 5, argc, argv);
}

View File

@ -792,7 +792,6 @@ DEFUN (ospf_opaque,
"OSPF specific commands\n"
"Enable the Opaque-LSA capability (rfc2370)\n")
{
/* CHECK ME argc referenced below */
return capability_opaque (self, vty, argc, argv);
}
@ -827,7 +826,6 @@ DEFUN (no_ospf_opaque,
"OSPF specific commands\n"
"Enable the Opaque-LSA capability (rfc2370)\n")
{
/* CHECK ME argc referenced below */
return no_capability_opaque (self, vty, argc, argv);
}

View File

@ -2620,13 +2620,12 @@ DEFUN (show_ip_ospf_mpls_te_link,
"Interface information\n"
"Interface name\n")
{
/* CHECK ME argc referenced below */
int idx_interface = 5;
struct interface *ifp;
struct listnode *node, *nnode;
/* Show All Interfaces. */
if (argc == 0)
if (argc == 5)
{
for (ALL_LIST_ELEMENTS (vrf_iflist (VRF_DEFAULT), node, nnode, ifp))
show_mpls_te_link_sub (vty, ifp);