summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ChangeLog5
-rw-r--r--ripd/rip_routemap.c11
-rw-r--r--ripd/ripd.c33
3 files changed, 28 insertions, 21 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 2cf199e8..932c6245 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 bab29f32..45a45f4b 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -59,11 +59,9 @@ rip_route_match_add (struct vty *vty, struct route_map_index *index,
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 @@ rip_route_match_delete (struct vty *vty, struct route_map_index *index,
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 @@ rip_route_set_add (struct vty *vty, struct route_map_index *index,
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 @@ rip_route_set_delete (struct vty *vty, struct route_map_index *index,
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 b2c99f05..05fdeb97 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -885,7 +885,7 @@ rip_auth_md5 (struct rip_packet *packet, struct sockaddr_in *from,
/* 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 @@ rip_auth_md5_set (struct stream *s, struct interface *ifp)
/* 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_response_process (struct rip_packet *packet, int size,
/* 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 @@ rip_request_process (struct rip_packet *packet, int size,
}
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 @@ rip_read (struct thread *t)
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 @@ rip_write_rte (int num, struct stream *s, struct prefix_ipv4 *p,
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 @@ rip_write_rte (int num, struct stream *s, struct prefix_ipv4 *p,
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 @@ rip_request_send (struct sockaddr_in *to, struct interface *ifp,
* 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 @@ rip_request_send (struct sockaddr_in *to, struct interface *ifp,
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_all ()
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 @@ rip_routemap_update_redistribute (void)
}
}
+/* ARGSUSED */
void
-rip_routemap_update ()
+rip_routemap_update (char *notused)
{
struct interface *ifp;
listnode node;
@@ -3956,8 +3965,8 @@ rip_init ()
/* 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 ();