2005-05-06 Paul Jakma <paul.jakma@sun.com>
* (general) extern and static qualifiers added.
unspecified arguments in definitions fixed, typically they should
be 'void'.
function casts added for callbacks.
Guards added to headers which lacked them.
Proper headers included rather than relying on incomplete
definitions.
gcc noreturn function attribute where appropriate.
* ospf_opaque.c: remove the private definition of ospf_lsa's
ospf_lsa_refresh_delay.
* ospf_lsa.h: export ospf_lsa_refresh_delay
* ospf_packet.c: (ospf_make_md5_digest) make *auth_key const,
correct thing to do - removes need for the casts later.
* ospf_vty.c: Use vty.h's VTY_GET_INTEGER rather than ospf_vty's
home-brewed versions, shuts up several warnings.
* ospf_vty.h: remove VTY_GET_UINT32. VTY_GET_IPV4_ADDRESS and
VTY_GET_IPV4_PREFIX moved to lib/vty.h.
* ospf_zebra.c: (ospf_distribute_list_update_timer) hacky
overloading of the THREAD_ARG pointer should at least use
uintptr_t.
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index cbc3d13..30164d0 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -136,7 +136,7 @@
}
/* For OSPF area sort by area id. */
-int
+static int
ospf_area_id_cmp (struct ospf_area *a1, struct ospf_area *a2)
{
if (ntohl (a1->area_id.s_addr) > ntohl (a2->area_id.s_addr))
@@ -147,8 +147,8 @@
}
/* Allocate new ospf structure. */
-struct ospf *
-ospf_new ()
+static struct ospf *
+ospf_new (void)
{
int i;
@@ -228,13 +228,13 @@
return listgetdata (listhead (om->ospf));
}
-void
+static void
ospf_add (struct ospf *ospf)
{
listnode_add (om->ospf, ospf);
}
-void
+static void
ospf_delete (struct ospf *ospf)
{
listnode_delete (om->ospf, ospf);
@@ -418,7 +418,7 @@
/* allocate new OSPF Area object */
-struct ospf_area *
+static struct ospf_area *
ospf_area_new (struct ospf *ospf, struct in_addr area_id)
{
struct ospf_area *new;
@@ -567,7 +567,7 @@
/* Config network statement related functions. */
-struct ospf_network *
+static struct ospf_network *
ospf_network_new (struct in_addr area_id, int format)
{
struct ospf_network *new;
@@ -903,7 +903,7 @@
};
int ospf_area_type_msg_max = OSPF_AREA_TYPE_MAX;
-void
+static void
ospf_area_type_set (struct ospf_area *area, int type)
{
struct listnode *node;
@@ -990,7 +990,7 @@
return 1;
}
-int
+static int
ospf_area_vlink_count (struct ospf *ospf, struct ospf_area *area)
{
struct ospf_vl_data *vl;
@@ -1124,7 +1124,8 @@
return 1;
}
-int
+/* XXX: unused? Leave for symmetry? */
+static int
ospf_area_nssa_translator_role_unset (struct ospf *ospf,
struct in_addr area_id)
{
@@ -1273,8 +1274,8 @@
}
-struct ospf_nbr_nbma *
-ospf_nbr_nbma_new ()
+static struct ospf_nbr_nbma *
+ospf_nbr_nbma_new (void)
{
struct ospf_nbr_nbma *nbr_nbma;
@@ -1288,13 +1289,13 @@
return nbr_nbma;
}
-void
+static void
ospf_nbr_nbma_free (struct ospf_nbr_nbma *nbr_nbma)
{
XFREE (MTYPE_OSPF_NEIGHBOR_STATIC, nbr_nbma);
}
-void
+static void
ospf_nbr_nbma_delete (struct ospf *ospf, struct ospf_nbr_nbma *nbr_nbma)
{
struct route_node *rn;
@@ -1314,7 +1315,7 @@
}
}
-void
+static void
ospf_nbr_nbma_down (struct ospf_nbr_nbma *nbr_nbma)
{
OSPF_TIMER_OFF (nbr_nbma->t_poll);
@@ -1329,7 +1330,7 @@
listnode_delete (nbr_nbma->oi->nbr_nbma, nbr_nbma);
}
-void
+static void
ospf_nbr_nbma_add (struct ospf_nbr_nbma *nbr_nbma,
struct ospf_interface *oi)
{