summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--isisd/ChangeLog7
-rw-r--r--isisd/isis_adjacency.c4
-rw-r--r--isisd/isis_circuit.c16
-rw-r--r--isisd/isis_events.c16
-rw-r--r--isisd/isis_events.h2
-rw-r--r--isisd/isis_lsp.c10
-rw-r--r--isisd/isis_misc.c22
-rw-r--r--isisd/isis_network.c6
-rw-r--r--isisd/isis_pdu.c6
-rw-r--r--isisd/isis_route.c12
-rw-r--r--isisd/isis_routemap.c2
-rw-r--r--isisd/isis_spf.c10
-rw-r--r--isisd/isis_tlv.c2
-rw-r--r--isisd/isis_tlv.h2
-rw-r--r--isisd/isis_zebra.c4
-rw-r--r--isisd/isisd.c14
16 files changed, 64 insertions, 71 deletions
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 4b0659a0..35296fb4 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,5 +1,12 @@
2004-09-26 Hasso Tepper <hasso at quagga.net>
+ * *.[c|h]: Fix a lot of compiler warnings.
+ * isis_events.c: Remove isis_event_int_reach_change() function, as it
+ doesn't make sense for now. Call lsp_regenerate_schedule() directly
+ where needed.
+
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
* isis_lsp.h: Cast-as-lvalue extension is deprecated and is not
accpted any more in gcc-4.0.
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index 3770ebde..beba0d95 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -263,7 +263,7 @@ isis_adj_print (struct isis_adjacency *adj)
for (node = listhead (adj->ipv6_addrs); node; nextnode (node))
{
ipv6_addr = getdata (node);
- inet_ntop (AF_INET6, ipv6_addr, ip6, INET6_ADDRSTRLEN);
+ inet_ntop (AF_INET6, ipv6_addr, (char *)ip6, INET6_ADDRSTRLEN);
zlog_info ("%s", ip6);
}
}
@@ -413,7 +413,7 @@ isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail)
for (node = listhead (adj->ipv6_addrs); node; nextnode (node))
{
ipv6_addr = getdata (node);
- inet_ntop (AF_INET6, ipv6_addr, ip6, INET6_ADDRSTRLEN);
+ inet_ntop (AF_INET6, ipv6_addr, (char *)ip6, INET6_ADDRSTRLEN);
vty_out (vty, " %s%s", ip6, VTY_NEWLINE);
}
}
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 21aa59e4..2dbdba3e 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -241,7 +241,7 @@ isis_circuit_add_addr (struct isis_circuit *circuit,
ipv4->prefixlen = connected->address->prefixlen;
ipv4->prefix = connected->address->u.prefix4;
listnode_add (circuit->ip_addrs, ipv4);
- isis_event_int_reach_change (circuit);
+ lsp_regenerate_schedule (circuit->area);
#ifdef EXTREME_DEBUG
prefix2str (connected->address, buf, BUFSIZ);
@@ -261,7 +261,7 @@ isis_circuit_add_addr (struct isis_circuit *circuit,
else
listnode_add (circuit->ipv6_non_link, ipv6);
- isis_event_int_reach_change(circuit);
+ lsp_regenerate_schedule (circuit->area);
#ifdef EXTREME_DEBUG
prefix2str (connected->address, buf, BUFSIZ);
@@ -302,11 +302,11 @@ isis_circuit_del_addr (struct isis_circuit *circuit,
if (ip)
{
listnode_delete (circuit->ip_addrs, ip);
- isis_event_int_reach_change (circuit);
+ lsp_regenerate_schedule (circuit->area);
}
else
{
- prefix2str (connected->address, buf, BUFSIZ);
+ prefix2str (connected->address, (char *)buf, BUFSIZ);
zlog_warn("Nonexitant ip address %s removal attempt from circuit \
%d", buf, circuit->circuit_id);
}
@@ -349,12 +349,12 @@ isis_circuit_del_addr (struct isis_circuit *circuit,
if (!found)
{
- prefix2str (connected->address, buf, BUFSIZ);
+ prefix2str (connected->address, (char *)buf, BUFSIZ);
zlog_warn("Nonexitant ip address %s removal attempt from \
circuit %d", buf, circuit->circuit_id);
}
else
- isis_event_int_reach_change (circuit);
+ lsp_regenerate_schedule (circuit->area);
}
#endif /* HAVE_IPV6 */
return;
@@ -960,7 +960,7 @@ DEFUN (isis_circuit_type,
assert (circuit);
- circuit_t = string2circuit_t (argv[0]);
+ circuit_t = string2circuit_t ((u_char *)argv[0]);
if (!circuit_t)
{
@@ -1036,7 +1036,7 @@ DEFUN (isis_passwd,
}
circuit->passwd.len = len;
circuit->passwd.type = ISIS_PASSWD_TYPE_CLEARTXT;
- strncpy (circuit->passwd.passwd, argv[0], 255);
+ strncpy ((char *)circuit->passwd.passwd, argv[0], 255);
return CMD_SUCCESS;
}
diff --git a/isisd/isis_events.c b/isisd/isis_events.c
index 4f843887..353c29ba 100644
--- a/isisd/isis_events.c
+++ b/isisd/isis_events.c
@@ -295,20 +295,6 @@ isis_event_adjacency_state_change (struct isis_adjacency *adj, int newstate)
return;
}
-void
-isis_event_int_reach_change (struct isis_circuit *circuit)
-{
- if (!circuit || !circuit->area)
- return;
-
- zlog_info ("ISIS-Evt (%s) Internal reachability change",
- circuit->area->area_tag);
-
- lsp_regenerate_schedule (circuit->area);
-
- return;
-}
-
/* events supporting code */
int
@@ -331,7 +317,7 @@ isis_event_dis_status_change (struct thread *thread)
}
void
-isis_event_auth_failure (char *area_tag, char *error_string, char *sysid)
+isis_event_auth_failure (char *area_tag, char *error_string, u_char *sysid)
{
zlog_info ("ISIS-Evt (%s) Authentication failure %s from %s",
area_tag, error_string, sysid_print (sysid));
diff --git a/isisd/isis_events.h b/isisd/isis_events.h
index a6ec2e8c..c4bd8ab7 100644
--- a/isisd/isis_events.h
+++ b/isisd/isis_events.h
@@ -50,6 +50,6 @@ int isis_event_dis_status_change (struct thread *thread);
#define AUTH_ERROR_TYPE_SNP 2
#define AUTH_ERROR_TYPE_HELLO 1
void isis_event_auth_failure (char *area_tag, char *error_string,
- char *sysid);
+ u_char *sysid);
#endif /* _ZEBRA_ISIS_EVENTS_H */
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 5467b483..2f185437 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -653,18 +653,18 @@ lspid_print (u_char * lsp_id, u_char * trg, char dynhost, char frag)
dyn = NULL;
if (dyn)
- sprintf (id, "%.14s", dyn->name.name);
+ sprintf ((char *)id, "%.14s", dyn->name.name);
else if (!memcmp (isis->sysid, lsp_id, ISIS_SYS_ID_LEN) & dynhost)
- sprintf (id, "%.14s", unix_hostname ());
+ sprintf ((char *)id, "%.14s", unix_hostname ());
else
{
memcpy (id, sysid_print (lsp_id), 15);
}
if (frag)
- sprintf (trg, "%s.%02x-%02x", id, LSP_PSEUDO_ID (lsp_id),
+ sprintf ((char *)trg, "%s.%02x-%02x", id, LSP_PSEUDO_ID (lsp_id),
LSP_FRAGMENT (lsp_id));
else
- sprintf (trg, "%s.%02x", id, LSP_PSEUDO_ID (lsp_id));
+ sprintf ((char *)trg, "%s.%02x", id, LSP_PSEUDO_ID (lsp_id));
}
/* Convert the lsp attribute bits to attribute string */
@@ -832,7 +832,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
memset (&in6, 0, sizeof (in6));
memcpy (in6.s6_addr, ipv6_reach->prefix,
PSIZE (ipv6_reach->prefix_len));
- inet_ntop (AF_INET6, &in6, buff, BUFSIZ);
+ inet_ntop (AF_INET6, &in6, (char *)buff, BUFSIZ);
if ((ipv6_reach->control_info &&
CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL)
vty_out (vty, " Metric: %d IPv6-Intern %s/%d%s",
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c
index 51c4d929..53a2a85d 100644
--- a/isisd/isis_misc.c
+++ b/isisd/isis_misc.c
@@ -112,7 +112,7 @@ dotformat2buff (u_char * buff, u_char * dotted)
int nextdotpos = 2;
number[2] = '\0';
- dotlen = strlen (dotted);
+ dotlen = strlen ((char *)dotted);
if (dotlen > 50)
{
/* this can't be an iso net, its too long */
@@ -151,7 +151,7 @@ dotformat2buff (u_char * buff, u_char * dotted)
break;
}
- *(buff + len) = (char) strtol (number, NULL, 16);
+ *(buff + len) = (char) strtol ((char *)number, NULL, 16);
len++;
}
@@ -170,7 +170,7 @@ sysid2buff (u_char * buff, u_char * dotted)
number[2] = '\0';
// surely not a sysid_string if not 14 length
- if (strlen (dotted) != 14)
+ if (strlen ((char *)dotted) != 14)
{
return 0;
}
@@ -199,7 +199,7 @@ sysid2buff (u_char * buff, u_char * dotted)
break;
}
- *(buff + len) = (char) strtol (number, NULL, 16);
+ *(buff + len) = (char) strtol ((char *)number, NULL, 16);
len++;
}
@@ -282,13 +282,13 @@ string2circuit_t (u_char * str)
if (!str)
return 0;
- if (!strcmp (str, "level-1"))
+ if (!strcmp ((char *)str, "level-1"))
return IS_LEVEL_1;
- if (!strcmp (str, "level-2-only") || !strcmp (str, "level-2"))
+ if (!strcmp ((char *)str, "level-2-only") || !strcmp ((char *)str, "level-2"))
return IS_LEVEL_2;
- if (!strcmp (str, "level-1-2"))
+ if (!strcmp ((char *)str, "level-1-2"))
return IS_LEVEL_1_AND_2;
return 0;
@@ -339,7 +339,7 @@ char *
snpa_print (u_char * from)
{
int i = 0;
- u_char *pos = snpa;
+ u_char *pos = (u_char *)snpa;
if (!from)
return "unknown";
@@ -348,19 +348,19 @@ snpa_print (u_char * from)
{
if (i & 1)
{
- sprintf (pos, "%02x.", *(from + i));
+ sprintf ((char *)pos, "%02x.", *(from + i));
pos += 3;
}
else
{
- sprintf (pos, "%02x", *(from + i));
+ sprintf ((char *)pos, "%02x", *(from + i));
pos += 2;
}
i++;
}
- sprintf (pos, "%02x", *(from + (ISIS_SYS_ID_LEN - 1)));
+ sprintf ((char *)pos, "%02x", *(from + (ISIS_SYS_ID_LEN - 1)));
pos += 2;
*(pos) = '\0';
diff --git a/isisd/isis_network.c b/isisd/isis_network.c
index 080863bd..4fbf16ff 100644
--- a/isisd/isis_network.c
+++ b/isisd/isis_network.c
@@ -390,7 +390,7 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa)
bytesread = recvfrom (circuit->fd, (void *) &llc,
LLC_LEN, MSG_PEEK,
- (struct sockaddr *) &s_addr, &addr_len);
+ (struct sockaddr *) &s_addr, (socklen_t *) &addr_len);
if (bytesread < 0)
{
@@ -417,7 +417,7 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa)
/* on lan we have to read to the static buff first */
bytesread = recvfrom (circuit->fd, sock_buff, circuit->interface->mtu, 0,
- (struct sockaddr *) &s_addr, &addr_len);
+ (struct sockaddr *) &s_addr, (socklen_t *) &addr_len);
/* then we lose the LLC */
memcpy (STREAM_DATA (circuit->rcv_stream),
@@ -442,7 +442,7 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa)
/* we can read directly to the stream */
bytesread = recvfrom (circuit->fd, STREAM_DATA (circuit->rcv_stream),
circuit->interface->mtu, 0,
- (struct sockaddr *) &s_addr, &addr_len);
+ (struct sockaddr *) &s_addr, (socklen_t *) &addr_len);
if (s_addr.sll_pkttype == PACKET_OUTGOING)
{
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index bf8c14f7..436240ef 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -334,7 +334,7 @@ process_p2p_hello (struct isis_circuit *circuit)
adj = circuit->u.p2p.neighbor;
if (!adj)
{
- adj = isis_new_adj (hdr->source_id, " ", 0, circuit);
+ adj = isis_new_adj (hdr->source_id, (u_char *) " ", 0, circuit);
if (adj == NULL)
return ISIS_ERROR;
circuit->u.p2p.neighbor = adj;
@@ -1587,7 +1587,7 @@ process_is_hello (struct isis_circuit *circuit)
if (!adj)
{
/* 8.2.2 */
- adj = isis_new_adj (sysid, " ", 0, circuit);
+ adj = isis_new_adj (sysid, (u_char *) " ", 0, circuit);
if (adj == NULL)
return ISIS_ERROR;
@@ -1603,7 +1603,7 @@ process_is_hello (struct isis_circuit *circuit)
/* 8.2.2 a) 2) delete the adj */
XFREE (MTYPE_ISIS_ADJACENCY, adj);
/* 8.2.2 a) 3) create a new adj */
- adj = isis_new_adj (sysid, " ", 0, circuit);
+ adj = isis_new_adj (sysid, (u_char *) " ", 0, circuit);
if (adj == NULL)
return ISIS_ERROR;
diff --git a/isisd/isis_route.c b/isisd/isis_route.c
index 90808681..c6151f9a 100644
--- a/isisd/isis_route.c
+++ b/isisd/isis_route.c
@@ -122,7 +122,7 @@ nexthop_print (struct isis_nexthop *nh)
{
u_char buf[BUFSIZ];
- inet_ntop (AF_INET, &nh->ip, buf, BUFSIZ);
+ inet_ntop (AF_INET, &nh->ip, (char *) buf, BUFSIZ);
zlog_info (" %s %u", buf, nh->ifindex);
}
@@ -218,7 +218,7 @@ nexthop6_print (struct isis_nexthop6 *nh6)
{
u_char buf[BUFSIZ];
- inet_ntop (AF_INET6, &nh6->ip6, buf, BUFSIZ);
+ inet_ntop (AF_INET6, &nh6->ip6, (char *) buf, BUFSIZ);
zlog_info (" %s %u", buf, nh6->ifindex);
}
@@ -331,14 +331,14 @@ isis_route_info_delete (struct isis_route_info *route_info)
{
if (route_info->nexthops)
{
- route_info->nexthops->del = (void *) isis_nexthop_delete;
+ route_info->nexthops->del = (void (*)(void *)) isis_nexthop_delete;
list_delete (route_info->nexthops);
}
#ifdef HAVE_IPV6
if (route_info->nexthops6)
{
- route_info->nexthops6->del = (void *) isis_nexthop6_delete;
+ route_info->nexthops6->del = (void (*)(void *)) isis_nexthop6_delete;
list_delete (route_info->nexthops6);
}
#endif /* HAVE_IPV6 */
@@ -484,7 +484,7 @@ isis_route_create (struct prefix *prefix, u_int32_t cost, u_int32_t depth,
family = prefix->family;
/* for debugs */
- prefix2str (prefix, buff, BUFSIZ);
+ prefix2str (prefix, (char *) buff, BUFSIZ);
rinfo_new = isis_route_info_new (cost, depth, family, adjacencies);
if (!rinfo_new)
@@ -623,7 +623,7 @@ again:
if (isis->debugs & DEBUG_RTE_EVENTS)
{
- prefix2str (&rode->p, buff, BUFSIZ);
+ prefix2str (&rode->p, (char *) buff, BUFSIZ);
zlog_info ("ISIS-Rte (%s): route validate: %s %s %s",
area->area_tag,
(CHECK_FLAG (rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNC) ?
diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c
index 56e44b88..688ca58b 100644
--- a/isisd/isis_routemap.c
+++ b/isisd/isis_routemap.c
@@ -52,7 +52,7 @@
extern struct isis *isis;
void
-isis_route_map_upd ()
+isis_route_map_upd (char *name)
{
int i = 0;
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c
index b2845ae1..1c32f8fc 100644
--- a/isisd/isis_spf.c
+++ b/isisd/isis_spf.c
@@ -192,13 +192,13 @@ vid2string (struct isis_vertex *vertex, u_char * buff)
case VTYPE_IP6REACH_INTERNAL:
case VTYPE_IP6REACH_EXTERNAL:
#endif /* HAVE_IPV6 */
- prefix2str ((struct prefix *) &vertex->N.prefix, buff, BUFSIZ);
+ prefix2str ((struct prefix *) &vertex->N.prefix, (char *) buff, BUFSIZ);
break;
default:
return "UNKNOWN";
}
- return buff;
+ return (char *) buff;
}
struct isis_spftree *
@@ -232,10 +232,10 @@ isis_vertex_del (struct isis_vertex *vertex)
void
isis_spftree_del (struct isis_spftree *spftree)
{
- spftree->tents->del = (void *) isis_vertex_del;
+ spftree->tents->del = (void (*)(void *)) isis_vertex_del;
list_delete (spftree->tents);
- spftree->paths->del = (void *) isis_vertex_del;
+ spftree->paths->del = (void (*)(void *)) isis_vertex_del;
list_delete (spftree->paths);
XFREE (MTYPE_ISIS_SPFTREE, spftree);
@@ -935,7 +935,7 @@ add_to_paths (struct isis_spftree *spftree, struct isis_vertex *vertex,
void
init_spt (struct isis_spftree *spftree)
{
- spftree->tents->del = spftree->paths->del = (void *) isis_vertex_del;
+ spftree->tents->del = spftree->paths->del = (void (*)(void *)) isis_vertex_del;
list_delete_all_node (spftree->tents);
list_delete_all_node (spftree->paths);
spftree->tents->del = spftree->paths->del = NULL;
diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c
index 70b3c177..c859ef0e 100644
--- a/isisd/isis_tlv.c
+++ b/isisd/isis_tlv.c
@@ -881,7 +881,7 @@ tlv_add_nlpid (struct nlpids *nlpids, struct stream *stream)
}
int
-tlv_add_authinfo (char auth_type, char auth_len, char *auth_value,
+tlv_add_authinfo (char auth_type, char auth_len, u_char *auth_value,
struct stream *stream)
{
u_char value[255];
diff --git a/isisd/isis_tlv.h b/isisd/isis_tlv.h
index 0883547d..72f883db 100644
--- a/isisd/isis_tlv.h
+++ b/isisd/isis_tlv.h
@@ -265,7 +265,7 @@ int tlv_add_is_neighs (struct list *is_neighs, struct stream *stream);
int tlv_add_lan_neighs (struct list *lan_neighs, struct stream *stream);
int tlv_add_nlpid (struct nlpids *nlpids, struct stream *stream);
int tlv_add_checksum (struct checksum *checksum, struct stream *stream);
-int tlv_add_authinfo (char auth_type, char authlen, char *auth_value,
+int tlv_add_authinfo (char auth_type, char authlen, u_char *auth_value,
struct stream *stream);
int tlv_add_ip_addrs (struct list *ip_addrs, struct stream *stream);
int tlv_add_dynamic_hostname (struct hostname *hostname,
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index e2f1dc59..8e122082 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -97,7 +97,7 @@ zebra_interface_if_lookup (struct stream *s)
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)
@@ -169,7 +169,7 @@ isis_zebra_if_address_add (int command, struct zclient *zclient,
{
struct connected *c;
struct prefix *p;
- u_char buf[BUFSIZ];
+ char buf[BUFSIZ];
c = zebra_interface_address_read (ZEBRA_INTERFACE_ADDRESS_ADD,
zclient->ibuf);
diff --git a/isisd/isisd.c b/isisd/isisd.c
index af05cd15..8656d22b 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -220,7 +220,7 @@ isis_area_destroy (struct vty *vty, char *area_tag)
}
int
-area_net_title (struct vty *vty, char *net_title)
+area_net_title (struct vty *vty, u_char *net_title)
{
struct isis_area *area;
struct area_addr *addr;
@@ -314,7 +314,7 @@ area_net_title (struct vty *vty, char *net_title)
}
int
-area_clear_net_title (struct vty *vty, char *net_title)
+area_clear_net_title (struct vty *vty, u_char *net_title)
{
struct isis_area *area;
struct area_addr addr, *addrp = NULL;
@@ -1006,7 +1006,7 @@ DEFUN (net,
"A Network Entity Title for this process (OSI only)\n"
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
{
- return area_net_title (vty, argv[0]);
+ return area_net_title (vty, (u_char *)argv[0]);
}
/*
@@ -1019,7 +1019,7 @@ DEFUN (no_net,
"A Network Entity Title for this process (OSI only)\n"
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
{
- return area_clear_net_title (vty, argv[0]);
+ return area_clear_net_title (vty, (u_char *)argv[0]);
}
DEFUN (area_passwd,
@@ -1047,7 +1047,7 @@ DEFUN (area_passwd,
}
area->area_passwd.len = (u_char) len;
area->area_passwd.type = ISIS_PASSWD_TYPE_CLEARTXT;
- strncpy (area->area_passwd.passwd, argv[0], 255);
+ strncpy ((char *)area->area_passwd.passwd, argv[0], 255);
return CMD_SUCCESS;
}
@@ -1098,7 +1098,7 @@ DEFUN (domain_passwd,
}
area->domain_passwd.len = (u_char) len;
area->domain_passwd.type = ISIS_PASSWD_TYPE_CLEARTXT;
- strncpy (area->domain_passwd.passwd, argv[0], 255);
+ strncpy ((char *)area->domain_passwd.passwd, argv[0], 255);
return CMD_SUCCESS;
}
@@ -1143,7 +1143,7 @@ DEFUN (is_type,
return CMD_WARNING;
}
- type = string2circuit_t (argv[0]);
+ type = string2circuit_t ((u_char *)argv[0]);
if (!type)
{
vty_out (vty, "Unknown IS level %s", VTY_NEWLINE);