]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripngd/ripng_debug.c
bgpd: Reformat bpacket_reformat_for_peer
[mirror_frr.git] / ripngd / ripng_debug.c
index 5d7a2cf9ff8d6bda310dc5dfd3459d46e4ef08c6..fe63d8fdead1f5cc0db9ccebea0f386cf67b8cb1 100644 (file)
@@ -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");
 
@@ -67,7 +67,7 @@ DEFUN (debug_ripng_events,
        "Debug option set for ripng events\n")
 {
        ripng_debug_event = RIPNG_DEBUG_EVENT;
-       return CMD_WARNING_CONFIG_FAILED;
+       return CMD_SUCCESS;
 }
 
 DEFUN (debug_ripng_packet,
@@ -94,13 +94,9 @@ DEFUN (debug_ripng_packet_direct,
 {
        int idx_recv_send = 3;
        ripng_debug_packet |= RIPNG_DEBUG_PACKET;
-       if (strncmp("send", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0)
+       if (strcmp("send", argv[idx_recv_send]->text) == 0)
                ripng_debug_packet |= RIPNG_DEBUG_SEND;
-       if (strncmp("recv", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0)
+       if (strcmp("recv", argv[idx_recv_send]->text) == 0)
                ripng_debug_packet |= RIPNG_DEBUG_RECV;
 
        return CMD_SUCCESS;
@@ -114,7 +110,7 @@ DEFUN (debug_ripng_zebra,
        "Debug option set for ripng and zebra communication\n")
 {
        ripng_debug_zebra = RIPNG_DEBUG_ZEBRA;
-       return CMD_WARNING_CONFIG_FAILED;
+       return CMD_SUCCESS;
 }
 
 DEFUN (no_debug_ripng_events,
@@ -152,16 +148,12 @@ DEFUN (no_debug_ripng_packet_direct,
        "Debug option set for send packet\n")
 {
        int idx_recv_send = 4;
-       if (strncmp("send", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0) {
+       if (strcmp("send", argv[idx_recv_send]->text) == 0) {
                if (IS_RIPNG_DEBUG_RECV)
                        ripng_debug_packet &= ~RIPNG_DEBUG_SEND;
                else
                        ripng_debug_packet = 0;
-       } else if (strncmp("recv", argv[idx_recv_send]->arg,
-                          strlen(argv[idx_recv_send]->arg))
-                  == 0) {
+       } else if (strcmp("recv", argv[idx_recv_send]->text) == 0) {
                if (IS_RIPNG_DEBUG_SEND)
                        ripng_debug_packet &= ~RIPNG_DEBUG_RECV;
                else
@@ -179,7 +171,7 @@ DEFUN (no_debug_ripng_zebra,
        "Debug option set for ripng and zebra communication\n")
 {
        ripng_debug_zebra = 0;
-       return CMD_WARNING_CONFIG_FAILED;
+       return CMD_SUCCESS;
 }
 
 /* Debug node. */
@@ -215,14 +207,7 @@ static int config_write_debug(struct vty *vty)
        return write;
 }
 
-void ripng_debug_reset()
-{
-       ripng_debug_event = 0;
-       ripng_debug_packet = 0;
-       ripng_debug_zebra = 0;
-}
-
-void ripng_debug_init()
+void ripng_debug_init(void)
 {
        ripng_debug_event = 0;
        ripng_debug_packet = 0;