summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_debug.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-06-12 16:39:12 +0200
committerRenato Westphal <renato@openbsd.org>2017-06-16 19:43:42 +0200
commitc740f7d3678a8ea2c70a062c1207157e999bd6e8 (patch)
tree43dd4ca1494eb53827854efa1476ee0ae9e5b838 /ldpd/ldp_debug.c
parentMerge pull request #718 from qlyoung/fix-vtysh-shit (diff)
downloadfrr-c740f7d3678a8ea2c70a062c1207157e999bd6e8.tar.xz
frr-c740f7d3678a8ea2c70a062c1207157e999bd6e8.zip
ldpd: convert cli and get rid of the xml interface
The xml2cli.pl script was useful years ago when the vty code was very rudimentary. This is not the case anymore, so convert all ldpd CLI commands to use DEFUNs directly and get rid of the XML interface. The benefits are: * Consistency with the other daemons; * One less build dependency (the LibXML perl module); * Easier to add new commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldp_debug.c')
-rw-r--r--ldpd/ldp_debug.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ldpd/ldp_debug.c b/ldpd/ldp_debug.c
index 4419f853b..4fc4a3cce 100644
--- a/ldpd/ldp_debug.c
+++ b/ldpd/ldp_debug.c
@@ -39,16 +39,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 +68,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 +104,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);