2004-05-31 Sowmini Varadhan <sowmini.varadhan@sun.com>

        * ripd.c: Fixup compile warnings
        * rip_routemap.c: Ditto
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 2cf199e..932c624 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-31 Sowmini Varadhan <sowmini.varadhan@sun.com>
+
+	* ripd.c: Fixup compile warnings
+	* rip_routemap.c: Ditto
+	
 2004-05-08 Paul Jakma <paul@dishone.st>
 
 	* rip_zebra.c: sync with zclient changes.
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index bab29f3..45a45f4 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -59,11 +59,9 @@
 	case RMAP_RULE_MISSING:
 	  vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	case RMAP_COMPILE_ERROR:
 	  vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	}
     }
   return CMD_SUCCESS;
@@ -84,11 +82,9 @@
 	case RMAP_RULE_MISSING:
 	  vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	case RMAP_COMPILE_ERROR:
 	  vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	}
     }
   return CMD_SUCCESS;
@@ -109,11 +105,9 @@
 	case RMAP_RULE_MISSING:
 	  vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	case RMAP_COMPILE_ERROR:
 	  vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	}
     }
   return CMD_SUCCESS;
@@ -134,19 +128,18 @@
 	case RMAP_RULE_MISSING:
 	  vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	case RMAP_COMPILE_ERROR:
 	  vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
 	  return CMD_WARNING;
-	  break;
 	}
     }
   return CMD_SUCCESS;
 }
 
 /* Hook function for updating route_map assignment. */
+/* ARGSUSED */
 void
-rip_route_map_update ()
+rip_route_map_update (char *notused)
 {
   int i;
 
diff --git a/ripd/ripd.c b/ripd/ripd.c
index b2c99f0..05fdeb9 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -885,7 +885,7 @@
 
   /* Overwrite digest by my secret. */
   memset (md5data->digest, 0, RIP_AUTH_MD5_SIZE);
-  strncpy (md5data->digest, auth_str, RIP_AUTH_MD5_SIZE);
+  strncpy ((char *)md5data->digest, auth_str, RIP_AUTH_MD5_SIZE);
 
   md5_init_ctx (&ctx);
   md5_process_bytes (packet, packet_len + md5->auth_len, &ctx);
@@ -993,7 +993,7 @@
 
   /* Generate a digest for the RIP packet. */
   memset (secret, 0, RIP_AUTH_MD5_SIZE);
-  strncpy (secret, auth_str, RIP_AUTH_MD5_SIZE);
+  strncpy ((char *)secret, auth_str, RIP_AUTH_MD5_SIZE);
   md5_init_ctx (&ctx);
   md5_process_bytes (s->data, s->endp, &ctx);
   md5_process_bytes (secret, RIP_AUTH_MD5_SIZE, &ctx);
@@ -1247,7 +1247,7 @@
 
 /* RIP packet send to destination address. */
 int
-rip_send_packet (caddr_t buf, int size, struct sockaddr_in *to, 
+rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, 
 		 struct interface *ifp, struct connected *connected)
 {
   int ret, send_sock;
@@ -1556,7 +1556,7 @@
 	}
       packet->command = RIP_RESPONSE;
 
-      rip_send_packet ((caddr_t) packet, size, from, ifp, NULL);
+      rip_send_packet ((u_char *)packet, size, from, ifp, NULL);
     }
   rip_global_queries++;
 }
@@ -1647,7 +1647,8 @@
   union rip_buf rip_buf;
   struct rip_packet *packet;
   struct sockaddr_in from;
-  int fromlen, len;
+  int len;
+  socklen_t fromlen;
   struct interface *ifp;
   struct rip_interface *ri;
 
@@ -1989,7 +1990,7 @@
 		  stream_putw (s, RIP_AUTH_SIMPLE_PASSWORD);
 
 		  memset ((s->data + s->putp), 0, 16);
-		  strncpy ((s->data + s->putp), ri->auth_str, 16);
+		  strncpy ((char *)(s->data + s->putp), ri->auth_str, 16);
 		  stream_set_putp (s, s->putp + 16);
 
 		  num++;
@@ -2011,7 +2012,8 @@
 			  stream_putw (s, RIP_AUTH_SIMPLE_PASSWORD);
 
 			  memset ((s->data + s->putp), 0, 16);
-			  strncpy ((s->data + s->putp), key->string, 16);
+			  strncpy ((char *)(s->data + s->putp), 
+				   key->string, 16);
 			  stream_set_putp (s, s->putp + 16);
 
 			  num++;
@@ -2683,7 +2685,7 @@
        * interface does not support multicast.  Caller loops
        * over each connected address for this case.
        */
-      if (rip_send_packet ((caddr_t) &rip_packet, sizeof (rip_packet), 
+      if (rip_send_packet ((u_char *) &rip_packet, sizeof (rip_packet), 
                             to, ifp, connected) != sizeof (rip_packet))
         return -1;
       else
@@ -2700,7 +2702,7 @@
       if (p->family != AF_INET)
         continue;
 
-      if (rip_send_packet ((caddr_t) &rip_packet, sizeof (rip_packet), 
+      if (rip_send_packet ((u_char *) &rip_packet, sizeof (rip_packet), 
                             to, ifp, connected) != sizeof (rip_packet))
         return -1;
     }
@@ -3719,6 +3721,12 @@
       rip_distribute_update_interface (ifp);
     }
 }
+/* ARGSUSED */
+void
+rip_distribute_update_all_wrapper(struct access_list *notused)
+{
+        rip_distribute_update_all();
+}
 
 /* Delete all added rip route. */
 void
@@ -3894,8 +3902,9 @@
     }
 }
 
+/* ARGSUSED */
 void
-rip_routemap_update ()
+rip_routemap_update (char *notused)
 {
   struct interface *ifp;
   listnode node;
@@ -3956,8 +3965,8 @@
 
   /* Access list install. */
   access_list_init ();
-  access_list_add_hook (rip_distribute_update_all);
-  access_list_delete_hook (rip_distribute_update_all);
+  access_list_add_hook (rip_distribute_update_all_wrapper);
+  access_list_delete_hook (rip_distribute_update_all_wrapper);
 
   /* Prefix list initialize.*/
   prefix_list_init ();