diff options
-rw-r--r-- | babeld/babel_zebra.c | 16 | ||||
-rw-r--r-- | bgpd/bgp_debug.c | 12 | ||||
-rw-r--r-- | bgpd/rfapi/vnc_debug.c | 14 | ||||
-rw-r--r-- | eigrpd/eigrp_dump.c | 12 | ||||
-rw-r--r-- | isisd/isisd.c | 19 | ||||
-rw-r--r-- | ldpd/ldp_vty_cmds.c | 14 | ||||
-rw-r--r-- | nhrpd/nhrp_vty.c | 10 | ||||
-rw-r--r-- | ospf6d/ospf6d.c | 18 | ||||
-rw-r--r-- | ospfd/ospf_dump.c | 26 | ||||
-rw-r--r-- | pimd/pim_cmd.c | 15 | ||||
-rw-r--r-- | ripd/rip_debug.c | 12 | ||||
-rw-r--r-- | ripngd/ripng_debug.c | 12 | ||||
-rw-r--r-- | vtysh/vtysh.c | 30 | ||||
-rw-r--r-- | zebra/debug.c | 12 |
14 files changed, 129 insertions, 93 deletions
diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index 11b9c5956..2ec5c3d7c 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -310,6 +310,20 @@ debug_babel_config_write (struct vty * vty) #endif /* NO_DEBUG */ } +DEFUN_NOSH (show_debugging_babel, + show_debugging_babel_cmd, + "show debugging [babel]", + SHOW_STR + DEBUG_STR + "Babel") +{ + vty_out(vty, "BABEL debugging status\n"); + + debug_babel_config_write(vty); + + return CMD_SUCCESS; +} + static void babel_zebra_connected (struct zclient *zclient) { @@ -339,6 +353,8 @@ void babelz_zebra_init(void) install_element(ENABLE_NODE, &no_debug_babel_cmd); install_element(CONFIG_NODE, &debug_babel_cmd); install_element(CONFIG_NODE, &no_debug_babel_cmd); + + install_element(VIEW_NODE, &show_debugging_babel_cmd); } static int diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index bcb3c5fc1..c1c4f2b39 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -1615,12 +1615,12 @@ DEFUN (no_debug_bgp, return CMD_SUCCESS; } -DEFUN (show_debugging_bgp, - show_debugging_bgp_cmd, - "show debugging bgp", - SHOW_STR - DEBUG_STR - BGP_STR) +DEFUN_NOSH (show_debugging_bgp, + show_debugging_bgp_cmd, + "show debugging [bgp]", + SHOW_STR + DEBUG_STR + BGP_STR) { vty_out(vty, "BGP debugging status:\n"); diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c index d4ff9451c..3e9b5ed6b 100644 --- a/bgpd/rfapi/vnc_debug.c +++ b/bgpd/rfapi/vnc_debug.c @@ -142,13 +142,13 @@ DEFUN (no_debug_bgp_vnc_all, * show/save ***********************************************************************/ -DEFUN (show_debugging_bgp_vnc, - show_debugging_bgp_vnc_cmd, - "show debugging bgp vnc", - SHOW_STR - DEBUG_STR - BGP_STR - VNC_STR) +DEFUN_NOSH (show_debugging_bgp_vnc, + show_debugging_bgp_vnc_cmd, + "show debugging bgp vnc", + SHOW_STR + DEBUG_STR + BGP_STR + VNC_STR) { size_t i; diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index aca6e5981..0cb1ee587 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -323,12 +323,12 @@ void show_ip_eigrp_neighbor_entry(struct vty *vty, struct eigrp *eigrp, } -DEFUN (show_debugging_eigrp, - show_debugging_eigrp_cmd, - "show debugging eigrp", - SHOW_STR - DEBUG_STR - EIGRP_STR) +DEFUN_NOSH (show_debugging_eigrp, + show_debugging_eigrp_cmd, + "show debugging [eigrp]", + SHOW_STR + DEBUG_STR + EIGRP_STR) { int i; diff --git a/isisd/isisd.c b/isisd/isisd.c index 60b9367da..dba34e8e3 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -758,17 +758,18 @@ void print_debug(struct vty *vty, int flags, int onoff) vty_out(vty, "IS-IS LSP scheduling debugging is %s\n", onoffs); } -DEFUN (show_debugging, - show_debugging_isis_cmd, - "show debugging isis", - SHOW_STR - "State of each debugging option\n" - ISIS_STR) +DEFUN_NOSH (show_debugging, + show_debugging_isis_cmd, + "show debugging [isis]", + SHOW_STR + "State of each debugging option\n" + ISIS_STR) { - if (isis->debugs) { - vty_out(vty, "IS-IS:\n"); + vty_out (vty, "IS-IS debugging status:\n"); + + if (isis->debugs) print_debug(vty, isis->debugs, 1); - } + return CMD_SUCCESS; } diff --git a/ldpd/ldp_vty_cmds.c b/ldpd/ldp_vty_cmds.c index db92b9362..be473063c 100644 --- a/ldpd/ldp_vty_cmds.c +++ b/ldpd/ldp_vty_cmds.c @@ -684,13 +684,13 @@ DEFPY (ldp_show_l2vpn_atom_vc, return (ldp_vty_show_atom_vc(vty, json)); } -DEFPY (ldp_show_debugging_mpls_ldp, - ldp_show_debugging_mpls_ldp_cmd, - "show debugging mpls ldp", - "Show running system information\n" - "Debugging functions\n" - "MPLS information\n" - "Label Distribution Protocol\n") +DEFUN_NOSH (ldp_show_debugging_mpls_ldp, + ldp_show_debugging_mpls_ldp_cmd, + "show debugging [mpls ldp]", + "Show running system information\n" + "Debugging functions\n" + "MPLS information\n" + "Label Distribution Protocol\n") { return (ldp_vty_show_debugging(vty)); } diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 20ef17de0..6d78fc1d2 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -110,11 +110,11 @@ static int toggle_flag( #ifndef NO_DEBUG -DEFUN(show_debugging_nhrp, show_debugging_nhrp_cmd, - "show debugging nhrp", - SHOW_STR - "Debugging information\n" - "NHRP configuration\n") +DEFUN_NOSH(show_debugging_nhrp, show_debugging_nhrp_cmd, + "show debugging [nhrp]", + SHOW_STR + "Debugging information\n" + "NHRP configuration\n") { int i; diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 48c34b797..f6b9e0ec1 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -85,10 +85,24 @@ static int config_write_ospf6_debug(struct vty *vty) config_write_ospf6_debug_asbr(vty); config_write_ospf6_debug_abr(vty); config_write_ospf6_debug_flood(vty); - vty_out(vty, "!\n"); + return 0; } +DEFUN_NOSH (show_debugging_ospf6, + show_debugging_ospf6_cmd, + "show debugging [ospf6]", + SHOW_STR + DEBUG_STR + OSPF6_STR) +{ + vty_out(vty, "OSPF6 debugging status:"); + + config_write_ospf6_debug(vty); + + return CMD_SUCCESS; +} + #define AREA_LSDB_TITLE_FORMAT \ "\n Area Scoped Link State Database (Area %s)\n\n" #define IF_LSDB_TITLE_FORMAT \ @@ -1157,6 +1171,8 @@ void ospf6_init(void) install_element_ospf6_clear_interface(); + install_element(VIEW_NODE, &show_debugging_ospf6_cmd); + install_element(VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd); install_element(VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd); diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index d3d1ffed5..619bd4e5f 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1597,12 +1597,12 @@ static int show_debugging_ospf_common(struct vty *vty, struct ospf *ospf) return CMD_SUCCESS; } -DEFUN (show_debugging_ospf, - show_debugging_ospf_cmd, - "show debugging ospf", - SHOW_STR - DEBUG_STR - OSPF_STR) +DEFUN_NOSH (show_debugging_ospf, + show_debugging_ospf_cmd, + "show debugging [ospf]", + SHOW_STR + DEBUG_STR + OSPF_STR) { struct ospf *ospf; @@ -1612,13 +1612,13 @@ DEFUN (show_debugging_ospf, return show_debugging_ospf_common(vty, ospf); } -DEFUN (show_debugging_ospf_instance, - show_debugging_ospf_instance_cmd, - "show debugging ospf (1-65535)", - SHOW_STR - DEBUG_STR - OSPF_STR - "Instance ID\n") +DEFUN_NOSH (show_debugging_ospf_instance, + show_debugging_ospf_instance_cmd, + "show debugging ospf (1-65535)", + SHOW_STR + DEBUG_STR + OSPF_STR + "Instance ID\n") { int idx_number = 3; struct ospf *ospf; diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 3bffaf855..9c79fd87e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -7254,14 +7254,17 @@ DEFUN (no_debug_msdp_packets, ALIAS(no_debug_msdp_packets, undebug_msdp_packets_cmd, "undebug msdp packets", UNDEBUG_STR DEBUG_MSDP_STR DEBUG_MSDP_PACKETS_STR) -DEFUN (show_debugging_pim, - show_debugging_pim_cmd, - "show debugging pim", - SHOW_STR - DEBUG_STR - PIM_STR) +DEFUN_NOSH (show_debugging_pim, + show_debugging_pim_cmd, + "show debugging [pim]", + SHOW_STR + DEBUG_STR + PIM_STR) { + vty_out(vty, "PIM debugging status\n"); + pim_debug_config_write(vty); + return CMD_SUCCESS; } diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 492d03699..56ba8e7f3 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -27,12 +27,12 @@ unsigned long rip_debug_event = 0; unsigned long rip_debug_packet = 0; unsigned long rip_debug_zebra = 0; -DEFUN (show_debugging_rip, - show_debugging_rip_cmd, - "show debugging rip", - SHOW_STR - DEBUG_STR - RIP_STR) +DEFUN_NOSH (show_debugging_rip, + show_debugging_rip_cmd, + "show debugging [rip]", + SHOW_STR + DEBUG_STR + RIP_STR) { vty_out(vty, "RIP debugging status:\n"); diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index d56161d39..9ebc302b1 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -28,12 +28,12 @@ unsigned long ripng_debug_event = 0; unsigned long ripng_debug_packet = 0; unsigned long ripng_debug_zebra = 0; -DEFUN (show_debugging_ripng, - show_debugging_ripng_cmd, - "show debugging ripng", - SHOW_STR - DEBUG_STR - "RIPng configuration\n") +DEFUN_NOSH (show_debugging_ripng, + show_debugging_ripng_cmd, + "show debugging [ripng]", + SHOW_STR + DEBUG_STR + "RIPng configuration\n") { vty_out(vty, "RIPng debugging status:\n"); diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index f7bfd9e42..70c644247 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1915,6 +1915,16 @@ static int show_per_daemon(const char *line, const char *headline) return ret; } +DEFUN (vtysh_show_debugging, + vtysh_show_debugging_cmd, + "show debugging", + SHOW_STR + DEBUG_STR) +{ + return show_per_daemon("do show debugging\n", + "Debugging Information for %s:\n"); +} + /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, @@ -1922,7 +1932,8 @@ DEFUN (vtysh_show_memory, SHOW_STR "Memory statistics\n") { - return show_per_daemon("show memory\n", "Memory statistics for %s:\n"); + return show_per_daemon("show memory\n", + "Memory statistics for %s:\n"); } DEFUN (vtysh_show_modules, @@ -1942,20 +1953,8 @@ DEFUN (vtysh_show_logging, SHOW_STR "Show current logging configuration\n") { - unsigned int i; - int ret = CMD_SUCCESS; - char line[] = "do show logging\n"; - - for (i = 0; i < array_size(vtysh_client); i++) - if (vtysh_client[i].fd >= 0) { - fprintf(stdout, "Logging configuration for %s:\n", - vtysh_client[i].name); - ret = vtysh_client_execute(&vtysh_client[i], line, - stdout); - fprintf(stdout, "\n"); - } - - return ret; + return show_per_daemon("do show logging\n", + "Logging configuration for %s:\n"); } DEFUNSH(VTYSH_ALL, vtysh_log_stdout, vtysh_log_stdout_cmd, "log stdout", @@ -3233,6 +3232,7 @@ void vtysh_init_vty(void) install_element(ENABLE_NODE, &vtysh_start_zsh_cmd); #endif + install_element(VIEW_NODE, &vtysh_show_debugging_cmd); install_element(VIEW_NODE, &vtysh_show_memory_cmd); install_element(VIEW_NODE, &vtysh_show_modules_cmd); diff --git a/zebra/debug.c b/zebra/debug.c index 25f47bc51..afeba1c6d 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -34,12 +34,12 @@ unsigned long zebra_debug_mpls; unsigned long zebra_debug_vxlan; unsigned long zebra_debug_pw; -DEFUN (show_debugging_zebra, - show_debugging_zebra_cmd, - "show debugging zebra", - SHOW_STR - "Debugging information\n" - "Zebra configuration\n") +DEFUN_NOSH (show_debugging_zebra, + show_debugging_zebra_cmd, + "show debugging [zebra]", + SHOW_STR + "Debugging information\n" + "Zebra configuration\n") { vty_out(vty, "Zebra debugging status:\n"); |