summaryrefslogtreecommitdiff
path: root/bgpd/rfapi/vnc_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/rfapi/vnc_debug.c')
-rw-r--r--bgpd/rfapi/vnc_debug.c57
1 files changed, 20 insertions, 37 deletions
diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c
index 4d91f38dcb..b5ff5bbc88 100644
--- a/bgpd/rfapi/vnc_debug.c
+++ b/bgpd/rfapi/vnc_debug.c
@@ -35,19 +35,19 @@ unsigned long conf_vnc_debug;
unsigned long term_vnc_debug;
struct vnc_debug {
- unsigned long bit;
- const char *name;
+ unsigned long bit;
+ const char *name;
};
struct vnc_debug vncdebug[] =
{
- {VNC_DEBUG_RFAPI_QUERY, "rfapi-query"},
- {VNC_DEBUG_IMPORT_BI_ATTACH, "import-bi-attach"},
- {VNC_DEBUG_IMPORT_DEL_REMOTE, "import-del-remote"},
- {VNC_DEBUG_EXPORT_BGP_GETCE, "export-bgp-getce"},
- {VNC_DEBUG_EXPORT_BGP_DIRECT_ADD, "export-bgp-direct-add"},
- {VNC_DEBUG_IMPORT_BGP_ADD_ROUTE, "import-bgp-add-route"},
- {VNC_DEBUG_VERBOSE, "verbose"},
+ {VNC_DEBUG_RFAPI_QUERY, "rfapi-query"},
+ {VNC_DEBUG_IMPORT_BI_ATTACH, "import-bi-attach"},
+ {VNC_DEBUG_IMPORT_DEL_REMOTE, "import-del-remote"},
+ {VNC_DEBUG_EXPORT_BGP_GETCE, "export-bgp-getce"},
+ {VNC_DEBUG_EXPORT_BGP_DIRECT_ADD, "export-bgp-direct-add"},
+ {VNC_DEBUG_IMPORT_BGP_ADD_ROUTE, "import-bgp-add-route"},
+ {VNC_DEBUG_VERBOSE, "verbose"},
};
#define VNC_STR "VNC information\n"
@@ -57,7 +57,7 @@ struct vnc_debug vncdebug[] =
***********************************************************************/
DEFUN (debug_bgp_vnc,
debug_bgp_vnc_cmd,
- "debug bgp vnc (rfapi-query|import-bi-attach|import-del-remote|verbose)",
+ "debug bgp vnc <rfapi-query|import-bi-attach|import-del-remote|verbose>",
DEBUG_STR
BGP_STR
VNC_STR
@@ -70,7 +70,7 @@ DEFUN (debug_bgp_vnc,
for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i)
{
- if (!strcmp(argv[0], vncdebug[i].name))
+ if (!strcmp(argv[3]->arg, vncdebug[i].name))
{
if (vty->node == CONFIG_NODE)
{
@@ -86,15 +86,16 @@ DEFUN (debug_bgp_vnc,
return CMD_SUCCESS;
}
}
- vty_out (vty, "Unknown debug flag: %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "Unknown debug flag: %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
DEFUN (no_debug_bgp_vnc,
no_debug_bgp_vnc_cmd,
- "no debug bgp vnc (rfapi-query|import-bi-attach|import-del-remote|verbose)",
+ "<no debug|undebug> bgp vnc <rfapi-query|import-bi-attach|import-del-remote|verbose>",
NO_STR
DEBUG_STR
+ "Undebug\n"
BGP_STR
VNC_STR
"rfapi query handling\n"
@@ -104,9 +105,11 @@ DEFUN (no_debug_bgp_vnc,
{
size_t i;
+ if (!strcmp(argv[0]->arg, "no"))
+ argc--, argv++;
for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i)
{
- if (!strcmp(argv[0], vncdebug[i].name))
+ if (!strcmp(argv[3]->arg, vncdebug[i].name))
{
if (vty->node == CONFIG_NODE)
{
@@ -122,21 +125,10 @@ DEFUN (no_debug_bgp_vnc,
return CMD_SUCCESS;
}
}
- vty_out (vty, "Unknown debug flag: %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "Unknown debug flag: %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
-ALIAS (no_debug_bgp_vnc,
- undebug_bgp_vnc_cmd,
- "undebug bgp vnc (rfapi-query|import-bi-attach|import-del-remote|verbose)",
- UNDEBUG_STR
- BGP_STR
- VNC_STR
- "rfapi query handling\n"
- "import BI atachment\n"
- "import delete remote routes\n"
- "verbose logging\n")
-
/***********************************************************************
* no debug bgp vnc all
@@ -144,9 +136,10 @@ ALIAS (no_debug_bgp_vnc,
DEFUN (no_debug_bgp_vnc_all,
no_debug_bgp_vnc_all_cmd,
- "no debug all bgp vnc",
+ "<no debug|undebug> all bgp vnc",
NO_STR
DEBUG_STR
+ "Undebug command\n"
"Disable all VNC debugging\n"
BGP_STR
VNC_STR)
@@ -157,14 +150,6 @@ DEFUN (no_debug_bgp_vnc_all,
return CMD_SUCCESS;
}
-ALIAS (no_debug_bgp_vnc_all,
- undebug_bgp_vnc_all_cmd,
- "undebug all bgp vnc",
- UNDEBUG_STR
- "Disable all VNC debugging\n"
- BGP_STR
- VNC_STR)
-
/***********************************************************************
* show/save
***********************************************************************/
@@ -226,8 +211,6 @@ vnc_debug_init (void)
install_element (ENABLE_NODE, &debug_bgp_vnc_cmd);
install_element (CONFIG_NODE, &debug_bgp_vnc_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_vnc_cmd);
- install_element (ENABLE_NODE, &undebug_bgp_vnc_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_vnc_all_cmd);
- install_element (ENABLE_NODE, &undebug_bgp_vnc_all_cmd);
}