Compiler warnings fixes.
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index ee0b311..2bcce1c 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
+	* bgp_aspath.c, bgp_packet.c, bgp_vty.c: Fix compiler warnings.
+
 2004-09-23 Hasso Tepper <hasso at quagga.net>
 
 	* *.[c|h]: list -> struct list *, listnode -> struct listnode *.
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index d30ef4c..bcb8f16 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -136,7 +136,7 @@
   struct assegment *assegment;
   int str_size = ASPATH_STR_DEFAULT_LEN;
   int str_pnt;
-  u_char *str_buf;
+  char *str_buf;
   int count = 0;
 
   /* Empty aspath. */
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 4282027..b4cd130 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -2253,7 +2253,7 @@
 	  bgp_notify_send_with_data (peer,
 				     BGP_NOTIFY_HEADER_ERR,
 			  	     BGP_NOTIFY_HEADER_BAD_MESLEN,
-				     notify_data_length, 2);
+				     (u_char *) notify_data_length, 2);
 	  goto done;
 	}
 
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 92918bd..27a3c2e 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -2584,7 +2584,7 @@
   b = buffer_new (1024);
   for (i = 1; i < argc; i++)
     {
-      buffer_putstr (b, (u_char *)argv[i]);
+      buffer_putstr (b, argv[i]);
       buffer_putc (b, ' ');
     }
   buffer_putc (b, '\0');
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 53ae8f2..8423cab 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
+	* ospf_abr.c, ospf_dump.c, ospf_lsa.c, ospf_packet.c, ospf_vty.c,
+	  ospf_zebra.c: Fix compiler warnings.
+
 2004-09-24 Paul Jakma <paul@dishone.st>
 
         * ospf_apiserver.{c,h}: lists typedef removal cleanup.
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 9f3a587..e23ace2 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -596,7 +596,7 @@
   struct summary_lsa *header;
   u_char *mp;
   metric = htonl (metric);
-  mp = (char *) &metric;
+  mp = (u_char *) &metric;
   mp++;
   header = (struct summary_lsa *) lsa->data;
   memcpy(header->metric, mp, 3);
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 3711e9f..958baa4 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -649,7 +649,7 @@
       break;
     case OSPF_AUTH_SIMPLE:
       memset (buf, 0, 9);
-      strncpy (buf, ospfh->u.auth_data, 8);
+      strncpy (buf, (char *) ospfh->u.auth_data, 8);
       zlog_info ("  Simple Password %s", buf);
       break;
     case OSPF_AUTH_CRYPTOGRAPHIC:
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 34d71b6..944af64 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -186,7 +186,7 @@
 
   lsa->checksum = 0;
   length = ntohs (lsa->length) - 2;
-  sp = (char *) &lsa->options;
+  sp = (u_char *) &lsa->options;
 
   for (ep = sp + length; sp < ep; sp = q)
     {
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 5952d18..67926fc 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -351,7 +351,7 @@
   else
     {
       ck = getdata (OSPF_IF_PARAM (oi, auth_crypt)->tail);
-      auth_key = ck->auth_key;
+      auth_key = (char *) ck->auth_key;
     }
 
   /* Generate a digest for the entire packet + our secret key. */
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 6b0dabb..ab73f7b 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -718,7 +718,7 @@
   if (vl_config->auth_key)
     {
       memset(IF_DEF_PARAMS (ifp)->auth_simple, 0, OSPF_AUTH_SIMPLE_SIZE+1);
-      strncpy (IF_DEF_PARAMS (ifp)->auth_simple, vl_config->auth_key, 
+      strncpy ((char *) IF_DEF_PARAMS (ifp)->auth_simple, vl_config->auth_key, 
 	       OSPF_AUTH_SIMPLE_SIZE);
     }
   else if (vl_config->md5_key)
@@ -733,7 +733,7 @@
       ck = ospf_crypt_key_new ();
       ck->key_id = vl_config->crypto_key_id;
       memset(ck->auth_key, 0, OSPF_AUTH_MD5_SIZE+1);
-      strncpy (ck->auth_key, vl_config->md5_key, OSPF_AUTH_MD5_SIZE);
+      strncpy ((char *) ck->auth_key, vl_config->md5_key, OSPF_AUTH_MD5_SIZE);
       
       ospf_crypt_key_add (IF_DEF_PARAMS (ifp)->auth_crypt, ck);
     }
@@ -4130,7 +4130,7 @@
 
 
   memset (params->auth_simple, 0, OSPF_AUTH_SIMPLE_SIZE + 1);
-  strncpy (params->auth_simple, argv[0], OSPF_AUTH_SIMPLE_SIZE);
+  strncpy ((char *) params->auth_simple, argv[0], OSPF_AUTH_SIMPLE_SIZE);
   SET_IF_PARAM (params, auth_simple);
 
   return CMD_SUCCESS;
@@ -4255,7 +4255,7 @@
   ck = ospf_crypt_key_new ();
   ck->key_id = (u_char) key_id;
   memset (ck->auth_key, 0, OSPF_AUTH_MD5_SIZE+1);
-  strncpy (ck->auth_key, argv[1], OSPF_AUTH_MD5_SIZE);
+  strncpy ((char *) ck->auth_key, argv[1], OSPF_AUTH_MD5_SIZE);
 
   ospf_crypt_key_add (params->auth_crypt, ck);
   SET_IF_PARAM (params, auth_crypt);
@@ -6882,9 +6882,9 @@
 
 	/* Create Area ID string by specified Area ID format. */
 	if (n->format == OSPF_AREA_ID_FORMAT_ADDRESS)
-	  strncpy (buf, inet_ntoa (n->area_id), INET_ADDRSTRLEN);
+	  strncpy ((char *) buf, inet_ntoa (n->area_id), INET_ADDRSTRLEN);
 	else
-	  sprintf (buf, "%lu", 
+	  sprintf ((char *) buf, "%lu", 
 		   (unsigned long int) ntohl (n->area_id.s_addr));
 
 	/* Network print. */
@@ -6908,7 +6908,7 @@
       struct ospf_area *area = getdata (node);
       struct route_node *rn1;
 
-      area_id2str (buf, INET_ADDRSTRLEN, area);
+      area_id2str ((char *) buf, INET_ADDRSTRLEN, area);
 
       if (area->auth_type != OSPF_AUTH_NULL)
 	{
@@ -7041,9 +7041,9 @@
 	  memset (buf, 0, INET_ADDRSTRLEN);
 	  
 	  if (vl_data->format == OSPF_AREA_ID_FORMAT_ADDRESS)
-	    strncpy (buf, inet_ntoa (vl_data->vl_area_id), INET_ADDRSTRLEN);
+	    strncpy ((char *) buf, inet_ntoa (vl_data->vl_area_id), INET_ADDRSTRLEN);
 	  else
-	    sprintf (buf, "%lu", 
+	    sprintf ((char *) buf, "%lu", 
 		     (unsigned long int) ntohl (vl_data->vl_area_id.s_addr));
 	  oi = vl_data->vl_oi;
 
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 5520c08..6a675a5 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -139,7 +139,7 @@
   stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
 
   /* Lookup this by interface index. */
-  ifp = if_lookup_by_name (ifname_tmp);
+  ifp = if_lookup_by_name ((char *) ifname_tmp);
 
   /* If such interface does not exist, indicate an error */
   if (!ifp)
diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog
index 92dbf6f..112aa19 100644
--- a/ripngd/ChangeLog
+++ b/ripngd/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
+	* ripingd.c: Access list hook argument function must have struct
+	  access_list * argument. Solution taken from ripd.
+	* ripngd.c, ripnf_nexthop.c: Fix compiler warnings.
+
 2004-09-23 Hasso Tepper <hasso at quagga.net>
 
 	* *.[c|h]: list -> struct list *, listnode -> struct listnode *.
diff --git a/ripngd/ripng_nexthop.c b/ripngd/ripng_nexthop.c
index 04b13c5..e946dc9 100644
--- a/ripngd/ripng_nexthop.c
+++ b/ripngd/ripng_nexthop.c
@@ -161,7 +161,7 @@
 
       /* A nexthop entry should be at least followed by 1 RTE */
       if (num == (rtemax-1)) {
-	ret = ripng_send_packet (STREAM_DATA (s), stream_get_endp (s),
+	ret = ripng_send_packet ((caddr_t) STREAM_DATA (s), stream_get_endp (s),
 				 to, ifp);
 
         if (ret >= 0 && IS_RIPNG_DEBUG_SEND)
@@ -191,7 +191,7 @@
 			  TAG_OUT(data), METRIC_OUT(data));
 
     if (num == rtemax) {
-      ret = ripng_send_packet (STREAM_DATA (s), stream_get_endp (s),
+      ret = ripng_send_packet ((caddr_t) STREAM_DATA (s), stream_get_endp (s),
 			       to, ifp);
 
       if (ret >= 0 && IS_RIPNG_DEBUG_SEND)
@@ -204,7 +204,7 @@
 
   /* If unwritten RTE exist, flush it. */
   if (num != 0) {
-    ret = ripng_send_packet (STREAM_DATA (s), stream_get_endp (s),
+    ret = ripng_send_packet ((caddr_t) STREAM_DATA (s), stream_get_endp (s),
 			     to, ifp);
 
     if (ret >= 0 && IS_RIPNG_DEBUG_SEND)
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 874848c..4d7c021 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1585,9 +1585,9 @@
 
   /* Write routing table entry. */
   if (!nexthop)
-    stream_write (s, (caddr_t) &p->prefix, sizeof (struct in6_addr));
+    stream_write (s, (u_char *) &p->prefix, sizeof (struct in6_addr));
   else
-    stream_write (s, (caddr_t) nexthop, sizeof (struct in6_addr));
+    stream_write (s, (u_char *) nexthop, sizeof (struct in6_addr));
   stream_putw (s, tag);
   if (p)
     stream_putc (s, p->prefixlen);
@@ -2813,7 +2813,7 @@
 
 /* Update all interface's distribute list. */
 void
-ripng_distribute_update_all ()
+ripng_distribute_update_all (struct prefix_list *notused)
 {
   struct interface *ifp;
   struct listnode *node;
@@ -2824,6 +2824,12 @@
       ripng_distribute_update_interface (ifp);
     }
 }
+
+void
+ripng_distribute_update_all_wrapper (struct access_list *notused)
+{
+  ripng_distribute_update_all(NULL);
+}
 
 /* delete all the added ripng routes. */
 void
@@ -2985,7 +2991,7 @@
 }
 
 void
-ripng_routemap_update ()
+ripng_routemap_update (char *unused)
 {
   struct interface *ifp;
   struct listnode *node;
@@ -3049,8 +3055,8 @@
 
   /* Access list install. */
   access_list_init ();
-  access_list_add_hook (ripng_distribute_update_all);
-  access_list_delete_hook (ripng_distribute_update_all);
+  access_list_add_hook (ripng_distribute_update_all_wrapper);
+  access_list_delete_hook (ripng_distribute_update_all_wrapper);
 
   /* Prefix list initialize.*/
   prefix_list_init ();
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 27deda7..a62fb6c 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
+	* irdp_interface.c, irdp_main.c, irdp_packet.c, rt_netlink.c,
+	  rtadv.c, zebra_vty.c: Fix compiler warnings.
+
 2004-09-24 Paul Jakma <paul@dishone.st>
 
 	* irdp_interface.c: (no_ip_irdp_address_preference_cmd)
diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c
index 9aace8c..76654c4 100644
--- a/zebra/irdp_interface.c
+++ b/zebra/irdp_interface.c
@@ -245,7 +245,7 @@
   timer =  (random () % IRDP_DEFAULT_INTERVAL) + 1; 
 
   irdp->AdvPrefList = list_new();
-  irdp->AdvPrefList->del =  (void *) Adv_free; /* Destructor */
+  irdp->AdvPrefList->del =  (void (*)(void *)) Adv_free; /* Destructor */
 
 
   /* And this for startup. Speed limit from 1991 :-). But it's OK*/
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 9e31950..5ee50e7 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -41,6 +41,7 @@
 #include "if.h"
 #include "vty.h"
 #include "sockunion.h"
+#include "sockopt.h"
 #include "prefix.h"
 #include "command.h"
 #include "memory.h"
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index bb3513a..67609b3 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -227,7 +227,7 @@
   int irdp_sock = THREAD_FD (r);
   t_irdp_raw = thread_add_read (zebrad.master, irdp_read_raw, NULL, irdp_sock);
   
-  ret = irdp_recvmsg (irdp_sock, buf, IRDP_RX_BUF,  &ifindex);
+  ret = irdp_recvmsg (irdp_sock, (u_char *) buf, IRDP_RX_BUF,  &ifindex);
  
   if (ret < 0) zlog_warn ("IRDP: RX Error length = %d", ret);
 
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 9e6c440..cb69187 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -179,7 +179,7 @@
 
   /* multiple netlink sockets will have different nl_pid */
   namelen = sizeof snl;
-  ret = getsockname (sock, (struct sockaddr *) &snl, &namelen);
+  ret = getsockname (sock, (struct sockaddr *) &snl, (socklen_t *) &namelen);
   if (ret < 0 || namelen != sizeof snl)
     {
       zlog (NULL, LOG_ERR, "Can't get %s socket name: %s", nl->name,
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 4bab03b..e5a026e 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -1110,7 +1110,7 @@
       rprefix = getdata (node);
       vty_out (vty, " ipv6 nd prefix %s/%d",
 	       inet_ntop (AF_INET6, &rprefix->prefix.u.prefix6, 
-			  buf, INET6_ADDRSTRLEN),
+			  (char *) buf, INET6_ADDRSTRLEN),
 	       rprefix->prefix.prefixlen);
       if ((rprefix->AdvValidLifetime != RTADV_VALID_LIFETIME) || 
 	  (rprefix->AdvPreferredLifetime != RTADV_PREFERRED_LIFETIME))
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 4bcd29f..b2f0932 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -59,7 +59,7 @@
 };
 
 /* Return route type string for VTY output.  */
-const char
+char
 route_type_char (u_char type)
 {
   switch (type)