unsigned long zebra_debug_rib;
unsigned long zebra_debug_fpm;
unsigned long zebra_debug_nht;
+unsigned long zebra_debug_mpls;
DEFUN (show_debugging_zebra,
show_debugging_zebra_cmd,
vty_out (vty, " Zebra FPM debugging is on%s", VTY_NEWLINE);
if (IS_ZEBRA_DEBUG_NHT)
vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_MPLS)
+ vty_out (vty, " Zebra MPLS debugging is on%s", VTY_NEWLINE);
return CMD_SUCCESS;
}
return CMD_WARNING;
}
-DEFUN (debug_zebra_packet,
- debug_zebra_packet_cmd,
- "debug zebra packet",
+DEFUN (debug_zebra_mpls,
+ debug_zebra_mpls_cmd,
+ "debug zebra mpls",
DEBUG_STR
"Zebra configuration\n"
- "Debug option set for zebra packet\n")
+ "Debug option set for zebra MPLS LSPs\n")
{
- zebra_debug_packet = ZEBRA_DEBUG_PACKET;
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
- return CMD_SUCCESS;
+ zebra_debug_mpls = ZEBRA_DEBUG_MPLS;
+ return CMD_WARNING;
}
-DEFUN (debug_zebra_packet_direct,
- debug_zebra_packet_direct_cmd,
- "debug zebra packet (recv|send|detail)",
+DEFUN (debug_zebra_packet,
+ debug_zebra_packet_cmd,
+ "debug zebra packet [<recv|send>] [detail]",
DEBUG_STR
"Zebra configuration\n"
"Debug option set for zebra packet\n"
"Debug option set for receive packet\n"
- "Debug option set for send packet\n")
+ "Debug option set for send packet\n"
+ "Debug option set for detailed info\n")
{
+ int idx = 0;
zebra_debug_packet = ZEBRA_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+
+ if (argv_find (argv, argc, "send", &idx))
SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ idx = 0;
+ if (argv_find (argv, argc, "recv", &idx))
SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
- if (strncmp ("detail", argv[0], strlen (argv[0])) == 0)
+ idx = 0;
+ if (argv_find (argv, argc, "detail", &idx))
SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL);
- return CMD_SUCCESS;
-}
-DEFUN (debug_zebra_packet_detail,
- debug_zebra_packet_detail_cmd,
- "debug zebra packet (recv|send) detail",
- DEBUG_STR
- "Zebra configuration\n"
- "Debug option set for zebra packet\n"
- "Debug option set for receive packet\n"
- "Debug option set for send packet\n"
- "Debug option set detailed information\n")
-{
- zebra_debug_packet = ZEBRA_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (!(zebra_debug_packet & ZEBRA_DEBUG_SEND & ZEBRA_DEBUG_RECV))
+ {
SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- 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;
}
DEFUN (debug_zebra_kernel_msgdump,
debug_zebra_kernel_msgdump_cmd,
- "debug zebra kernel msgdump {recv|send}",
+ "debug zebra kernel msgdump [<recv|send>]",
DEBUG_STR
"Zebra configuration\n"
"Debug option set for zebra between kernel interface\n"
"Dump raw netlink messages received\n"
"Dump raw netlink messages sent\n")
{
- if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0))
+ int idx = 0;
+ if (argc == 4 || argv_find (argv, argc, "recv", &idx))
SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
- if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0))
+ if (argc == 4 || argv_find (argv, argc, "send", &idx))
SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+
return CMD_SUCCESS;
}
return CMD_SUCCESS;
}
-DEFUN (no_debug_zebra_packet,
- no_debug_zebra_packet_cmd,
- "no debug zebra packet",
+DEFUN (no_debug_zebra_mpls,
+ no_debug_zebra_mpls_cmd,
+ "no debug zebra mpls",
NO_STR
DEBUG_STR
"Zebra configuration\n"
- "Debug option set for zebra packet\n")
+ "Debug option set for zebra MPLS LSPs\n")
{
- zebra_debug_packet = 0;
+ zebra_debug_mpls = 0;
return CMD_SUCCESS;
}
-DEFUN (no_debug_zebra_packet_direct,
- no_debug_zebra_packet_direct_cmd,
- "no debug zebra packet (recv|send)",
+DEFUN (no_debug_zebra_packet,
+ no_debug_zebra_packet_cmd,
+ "no debug zebra packet [<recv|send>]",
NO_STR
DEBUG_STR
"Zebra configuration\n"
"Debug option set for receive packet\n"
"Debug option set for send packet\n")
{
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ int idx = 0;
+ if (argc == 4 || argv_find (argv, argc, "send", &idx))
UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (argc == 4 || argv_find (argv, argc, "recv", &idx))
UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_kernel_msgdump,
no_debug_zebra_kernel_msgdump_cmd,
- "no debug zebra kernel msgdump {recv|send}",
+ "no debug zebra kernel msgdump [<recv|send>]",
+ NO_STR
DEBUG_STR
"Zebra configuration\n"
"Debug option set for zebra between kernel interface\n"
"Dump raw netlink messages received\n"
"Dump raw netlink messages sent\n")
{
- if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0))
+ int idx = 0;
+ if (argc == 5 || argv_find (argv, argc, "recv", &idx))
UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
- if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0))
+ if (argc == 5 || argv_find (argv, argc, "send", &idx))
UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+
return CMD_SUCCESS;
}
vty_out (vty, "debug zebra fpm%s", VTY_NEWLINE);
write++;
}
+ if (IS_ZEBRA_DEBUG_NHT)
+ {
+ vty_out (vty, "debug zebra nht%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_MPLS)
+ {
+ vty_out (vty, "debug zebra mpls%s", VTY_NEWLINE);
+ write++;
+ }
return write;
}
zebra_debug_kernel = 0;
zebra_debug_rib = 0;
zebra_debug_fpm = 0;
+ zebra_debug_mpls = 0;
install_node (&debug_node, config_write_debug);
install_element (VIEW_NODE, &show_debugging_zebra_cmd);
- install_element (ENABLE_NODE, &show_debugging_zebra_cmd);
install_element (ENABLE_NODE, &debug_zebra_events_cmd);
install_element (ENABLE_NODE, &debug_zebra_nht_cmd);
+ install_element (ENABLE_NODE, &debug_zebra_mpls_cmd);
install_element (ENABLE_NODE, &debug_zebra_packet_cmd);
- install_element (ENABLE_NODE, &debug_zebra_packet_direct_cmd);
- install_element (ENABLE_NODE, &debug_zebra_packet_detail_cmd);
install_element (ENABLE_NODE, &debug_zebra_kernel_cmd);
install_element (ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
install_element (ENABLE_NODE, &debug_zebra_rib_cmd);
install_element (ENABLE_NODE, &debug_zebra_fpm_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_events_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_nht_cmd);
+ install_element (ENABLE_NODE, &no_debug_zebra_mpls_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_packet_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_kernel_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_kernel_msgdump_cmd);
install_element (CONFIG_NODE, &debug_zebra_events_cmd);
install_element (CONFIG_NODE, &debug_zebra_nht_cmd);
+ install_element (CONFIG_NODE, &debug_zebra_mpls_cmd);
install_element (CONFIG_NODE, &debug_zebra_packet_cmd);
- install_element (CONFIG_NODE, &debug_zebra_packet_direct_cmd);
- install_element (CONFIG_NODE, &debug_zebra_packet_detail_cmd);
install_element (CONFIG_NODE, &debug_zebra_kernel_cmd);
install_element (CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
install_element (CONFIG_NODE, &debug_zebra_rib_cmd);
install_element (CONFIG_NODE, &debug_zebra_fpm_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_events_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_nht_cmd);
+ install_element (CONFIG_NODE, &no_debug_zebra_mpls_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_packet_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_kernel_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_kernel_msgdump_cmd);