summaryrefslogtreecommitdiffstats
path: root/ripngd/ripng_debug.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 01:51:23 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-09-23 01:51:23 +0200
commitdd4f9f99ed4f5012e11a1c1eed0180345217eaa9 (patch)
treee836d5035fed1c6f2e7e4d6bd29b5a12dbc5bee3 /ripngd/ripng_debug.c
parentlib: argv update for routemap.c (diff)
downloadfrr-dd4f9f99ed4f5012e11a1c1eed0180345217eaa9.tar.xz
frr-dd4f9f99ed4f5012e11a1c1eed0180345217eaa9.zip
ripngd: argv update
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'ripngd/ripng_debug.c')
-rw-r--r--ripngd/ripng_debug.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c
index c1eb39ba2..73bfcb4d6 100644
--- a/ripngd/ripng_debug.c
+++ b/ripngd/ripng_debug.c
@@ -99,30 +99,9 @@ DEFUN (debug_ripng_packet_direct,
"Debug option set for send packet\n")
{
ripng_debug_packet |= RIPNG_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0)
ripng_debug_packet |= RIPNG_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
- ripng_debug_packet |= RIPNG_DEBUG_RECV;
-
- return CMD_SUCCESS;
-}
-
-/* N.B. the "detail" modifier is a no-op. we leave this command
- for legacy compatibility. */
-DEFUN_DEPRECATED (debug_ripng_packet_detail,
- debug_ripng_packet_detail_cmd,
- "debug ripng packet (recv|send) detail",
- DEBUG_STR
- "RIPng configuration\n"
- "Debug option set for ripng packet\n"
- "Debug option set for receive packet\n"
- "Debug option set for send packet\n"
- "Debug option set detaied information\n")
-{
- ripng_debug_packet |= RIPNG_DEBUG_PACKET;
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
- ripng_debug_packet |= RIPNG_DEBUG_SEND;
- if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0)
ripng_debug_packet |= RIPNG_DEBUG_RECV;
return CMD_SUCCESS;
@@ -173,14 +152,14 @@ DEFUN (no_debug_ripng_packet_direct,
"Debug option set for receive packet\n"
"Debug option set for send packet\n")
{
- if (strncmp ("send", argv[0], strlen (argv[0])) == 0)
+ if (strncmp ("send", argv[4]->arg, strlen (argv[4]->arg)) == 0)
{
if (IS_RIPNG_DEBUG_RECV)
ripng_debug_packet &= ~RIPNG_DEBUG_SEND;
else
ripng_debug_packet = 0;
}
- else if (strncmp ("recv", argv[0], strlen (argv[0])) == 0)
+ else if (strncmp ("recv", argv[4]->arg, strlen (argv[4]->arg)) == 0)
{
if (IS_RIPNG_DEBUG_SEND)
ripng_debug_packet &= ~RIPNG_DEBUG_RECV;
@@ -270,7 +249,6 @@ ripng_debug_init ()
install_element (ENABLE_NODE, &debug_ripng_events_cmd);
install_element (ENABLE_NODE, &debug_ripng_packet_cmd);
install_element (ENABLE_NODE, &debug_ripng_packet_direct_cmd);
- install_element (ENABLE_NODE, &debug_ripng_packet_detail_cmd);
install_element (ENABLE_NODE, &debug_ripng_zebra_cmd);
install_element (ENABLE_NODE, &no_debug_ripng_events_cmd);
install_element (ENABLE_NODE, &no_debug_ripng_packet_cmd);
@@ -280,7 +258,6 @@ ripng_debug_init ()
install_element (CONFIG_NODE, &debug_ripng_events_cmd);
install_element (CONFIG_NODE, &debug_ripng_packet_cmd);
install_element (CONFIG_NODE, &debug_ripng_packet_direct_cmd);
- install_element (CONFIG_NODE, &debug_ripng_packet_detail_cmd);
install_element (CONFIG_NODE, &debug_ripng_zebra_cmd);
install_element (CONFIG_NODE, &no_debug_ripng_events_cmd);
install_element (CONFIG_NODE, &no_debug_ripng_packet_cmd);