diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 37ca2fb..2267e0f 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,17 @@
+2007-04-22 Sebastien Tandel <sebastien@tandel.be>
+
+	* bgp_advertise.c : (baa_hash_alloc, baa_hash_key, baa_hash_cmp)
+	  conforms to quagga hash API. Defines _hash_[alloc|key|cmp] with
+	  void * arguments as defined by the API.
+	* bgp_aspath.c,h : (aspath_key_make) conforms to quagga hash API.
+	  Defines _hash_[alloc|key|cmp] with void * arguments as defined by
+	  the API.
+	* bgp_attr.c,h : (cluster_hash_alloc, cluster_hash_key_make,
+	  cluster_hash_cmp, transit_hash_alloc, transit_hash_key_make,
+	  transit_hash_cmp, attrhash_key_make, attrhash_cmp,
+	  bgp_attr_hash_alloc) conforms to quagga hash API. Defines
+	  _hash_[alloc|key|cmp] with void * arguments as defined by the API.
+
 2007-04-15 Sebastien Tandel <sebastien@tandel.be>
 
 	* bgp_aspath.c: (aspath_as_add, aspath_segment_add) Minor performance
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c
index 3a40b1a..73b868a 100644
--- a/bgpd/bgp_advertise.c
+++ b/bgpd/bgp_advertise.c
@@ -53,8 +53,9 @@
 }
 
 static void *
-baa_hash_alloc (struct bgp_advertise_attr *ref)
+baa_hash_alloc (void *p)
 {
+  struct bgp_advertise_attr * ref = (struct bgp_advertise_attr *) p;
   struct bgp_advertise_attr *baa;
 
   baa = baa_new ();
@@ -63,14 +64,19 @@
 }
 
 static unsigned int
-baa_hash_key (struct bgp_advertise_attr *baa)
+baa_hash_key (void *p)
 {
+  struct bgp_advertise_attr * baa = (struct bgp_advertise_attr *) p;
+
   return attrhash_key_make (baa->attr);
 }
 
 static int
-baa_hash_cmp (struct bgp_advertise_attr *baa1, struct bgp_advertise_attr *baa2)
+baa_hash_cmp (void *p1, void *p2)
 {
+  struct bgp_advertise_attr * baa1 = (struct bgp_advertise_attr *) p1;
+  struct bgp_advertise_attr * baa2 = (struct bgp_advertise_attr *) p2;
+
   return attrhash_cmp (baa1->attr, baa2->attr);
 }
 
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 1f522d7..b328e38 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -1447,8 +1447,9 @@
 
 /* Make hash value by raw aspath data. */
 unsigned int
-aspath_key_make (struct aspath *aspath)
+aspath_key_make (void *p)
 {
+  struct aspath * aspath = (struct aspath *) p;
   unsigned int key = 0;
   unsigned int i;
   struct assegment *seg = aspath->segments;
diff --git a/bgpd/bgp_aspath.h b/bgpd/bgp_aspath.h
index 5400c57..efec24c 100644
--- a/bgpd/bgp_aspath.h
+++ b/bgpd/bgp_aspath.h
@@ -79,7 +79,7 @@
 extern const char *aspath_print (struct aspath *);
 extern void aspath_print_vty (struct vty *, const char *, struct aspath *);
 extern void aspath_print_all_vty (struct vty *);
-extern unsigned int aspath_key_make (struct aspath *);
+extern unsigned int aspath_key_make (void *);
 extern int aspath_loop_check (struct aspath *, as_t);
 extern int aspath_private_as_check (struct aspath *);
 extern int aspath_firstas_check (struct aspath *, as_t);
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index fc25d21..b30c86a 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -63,8 +63,9 @@
 struct hash *cluster_hash;
 
 static void *
-cluster_hash_alloc (struct cluster_list *val)
+cluster_hash_alloc (void *p)
 {
+  struct cluster_list * val = (struct cluster_list *) p;
   struct cluster_list *cluster;
 
   cluster = XMALLOC (MTYPE_CLUSTER, sizeof (struct cluster_list));
@@ -110,8 +111,9 @@
 }
 
 static unsigned int
-cluster_hash_key_make (struct cluster_list *cluster)
+cluster_hash_key_make (void *p)
 {
+  struct cluster_list * cluster = (struct cluster_list *) p;
   unsigned int key = 0;
   int length;
   caddr_t pnt;
@@ -126,8 +128,11 @@
 }
 
 static int
-cluster_hash_cmp (struct cluster_list *cluster1, struct cluster_list *cluster2)
+cluster_hash_cmp (void *p1, void *p2)
 {
+  struct cluster_list * cluster1 = (struct cluster_list *) p1;
+  struct cluster_list * cluster2 = (struct cluster_list *) p2;
+
   if (cluster1->length == cluster2->length &&
       memcmp (cluster1->list, cluster2->list, cluster1->length) == 0)
     return 1;
@@ -205,11 +210,12 @@
   XFREE (MTYPE_TRANSIT, transit);
 }
 
+
 static void *
-transit_hash_alloc (struct transit *transit)
+transit_hash_alloc (void *p)
 {
   /* Transit structure is already allocated.  */
-  return transit;
+  return p;
 }
 
 static struct transit *
@@ -241,8 +247,9 @@
 }
 
 static unsigned int
-transit_hash_key_make (struct transit *transit)
+transit_hash_key_make (void *p)
 {
+  struct transit * transit = (struct transit *) p;
   unsigned int key = 0;
   int length;
   caddr_t pnt;
@@ -257,8 +264,11 @@
 }
 
 static int
-transit_hash_cmp (struct transit *transit1, struct transit *transit2)
+transit_hash_cmp (void *p1, void *p2)
 {
+  struct transit * transit1 = (struct transit *) p1;
+  struct transit * transit2 = (struct transit *) p2;
+
   if (transit1->length == transit2->length &&
       memcmp (transit1->val, transit2->val, transit1->length) == 0)
     return 1;
@@ -288,8 +298,9 @@
 }
 
 unsigned int
-attrhash_key_make (struct attr *attr)
+attrhash_key_make (void *p)
 {
+  struct attr * attr = (struct attr *) p;
   unsigned int key = 0;
 
   key += attr->origin;
@@ -328,8 +339,11 @@
 }
 
 int
-attrhash_cmp (struct attr *attr1, struct attr *attr2)
+attrhash_cmp (void *p1, void *p2)
 {
+  struct attr * attr1 = (struct attr *) p1;
+  struct attr * attr2 = (struct attr *) p2;
+
   if (attr1->flag == attr2->flag
       && attr1->origin == attr2->origin
       && attr1->nexthop.s_addr == attr2->nexthop.s_addr
@@ -379,8 +393,9 @@
 }
 
 static void *
-bgp_attr_hash_alloc (struct attr *val)
+bgp_attr_hash_alloc (void *p)
 {
+  struct attr * val = (struct attr *) p;
   struct attr *attr;
 
   attr = XMALLOC (MTYPE_ATTR, sizeof (struct attr));
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index 777869c..124c450 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -129,8 +129,8 @@
                                 struct prefix_rd *, u_char *);
 extern void bgp_dump_routes_attr (struct stream *, struct attr *,
 				  struct prefix *);
-extern unsigned int attrhash_key_make (struct attr *);
-extern int attrhash_cmp (struct attr *, struct attr *);
+extern int attrhash_cmp (void *, void *);
+extern unsigned int attrhash_key_make (void *);
 extern void attr_show_all (struct vty *);
 extern unsigned long int attr_count (void);
 extern unsigned long int attr_unknown_count (void);
