summaryrefslogtreecommitdiff
path: root/ldpd/ldp_debug.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2017-06-16 15:53:50 -0400
committerGitHub <noreply@github.com>2017-06-16 15:53:50 -0400
commit430000deeed77491c249b81d1a11512e6ff3f4e7 (patch)
treee978fa4b3fc40d699acb2be706a049383711a596 /ldpd/ldp_debug.c
parent62e4232010330e515630399838288f6281d04de6 (diff)
parent180fc2cd704708442d3a7fcf555dcbc1a5f1831f (diff)
Merge pull request #702 from opensourcerouting/ldpd-cli-rewrite
ldpd: convert cli and get rid of the xml interface
Diffstat (limited to 'ldpd/ldp_debug.c')
-rw-r--r--ldpd/ldp_debug.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/ldpd/ldp_debug.c b/ldpd/ldp_debug.c
index 4419f853b4..7915fb709d 100644
--- a/ldpd/ldp_debug.c
+++ b/ldpd/ldp_debug.c
@@ -1,21 +1,20 @@
/*
* Copyright (C) 2016 by Open Source Routing.
*
- * This file is part of GNU Zebra.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
+ * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
#include <zebra.h>
@@ -39,16 +38,10 @@ struct cmd_node ldp_debug_node =
};
int
-ldp_vty_debug(struct vty *vty, struct vty_arg *args[])
+ldp_vty_debug(struct vty *vty, int disable, const char *type_str,
+ const char *dir_str, int all)
{
- const char *type_str, *dir_str;
- int disable, all;
-
- disable = (vty_get_arg_value(args, "no")) ? 1 : 0;
- type_str = vty_get_arg_value(args, "type");
-
if (strcmp(type_str, "discovery") == 0) {
- dir_str = vty_get_arg_value(args, "dir");
if (dir_str == NULL)
return (CMD_WARNING);
@@ -74,8 +67,6 @@ ldp_vty_debug(struct vty *vty, struct vty_arg *args[])
else
DEBUG_ON(event, EVENT);
} else if (strcmp(type_str, "messages") == 0) {
- all = (vty_get_arg_value(args, "all")) ? 1 : 0;
- dir_str = vty_get_arg_value(args, "dir");
if (dir_str == NULL)
return (CMD_WARNING);
@@ -112,7 +103,7 @@ ldp_vty_debug(struct vty *vty, struct vty_arg *args[])
}
int
-ldp_vty_show_debugging(struct vty *vty, struct vty_arg *args[])
+ldp_vty_show_debugging(struct vty *vty)
{
vty_out(vty, "LDP debugging status:%s", VTY_NEWLINE);