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/ospf_routemap.c b/ospfd/ospf_routemap.c
index 074a2de..6c89b22 100644
--- a/ospfd/ospf_routemap.c
+++ b/ospfd/ospf_routemap.c
@@ -40,7 +40,7 @@
 #include "ospfd/ospf_zebra.h"
 
 /* Hook function for updating route_map assignment. */
-void
+static void
 ospf_route_map_update (const char *name)
 {
   struct ospf *ospf;
@@ -73,7 +73,7 @@
     }
 }
 
-void
+static void
 ospf_route_map_event (route_map_event_t event, const char *name)
 {
   struct ospf *ospf;
@@ -96,7 +96,7 @@
 }
 
 /* Delete rip route map rule. */
-int
+static int
 ospf_route_match_delete (struct vty *vty, struct route_map_index *index,
 			 const char *command, const char *arg)
 {
@@ -121,7 +121,7 @@
   return CMD_SUCCESS;
 }
 
-int
+static int
 ospf_route_match_add (struct vty *vty, struct route_map_index *index,
 		      const char *command, const char *arg)
 {                                                                              
@@ -146,7 +146,7 @@
   return CMD_SUCCESS;
 }
 
-int
+static int
 ospf_route_set_add (struct vty *vty, struct route_map_index *index,
 		    const char *command, const char *arg)
 {
@@ -172,7 +172,7 @@
 }
 
 /* Delete rip route map rule. */
-int
+static int
 ospf_route_set_delete (struct vty *vty, struct route_map_index *index,
 		       const char *command, const char *arg)
 {                                              
@@ -199,7 +199,7 @@
 
 /* `match ip netxthop ' */
 /* Match function return 1 if match is success else return zero. */
-route_map_result_t
+static route_map_result_t
 route_match_ip_nexthop (void *rule, struct prefix *prefix,
 			route_map_object_t type, void *object)
 {
@@ -225,14 +225,14 @@
 
 /* Route map `ip next-hop' match statement. `arg' should be
    access-list name. */
-void *
+static void *
 route_match_ip_nexthop_compile (const char *arg)
 {
   return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
 }
 
 /* Free route map's compiled `ip address' value. */
-void
+static void
 route_match_ip_nexthop_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -249,7 +249,7 @@
 
 /* `match ip next-hop prefix-list PREFIX_LIST' */
 
-route_map_result_t
+static route_map_result_t
 route_match_ip_next_hop_prefix_list (void *rule, struct prefix *prefix,
                                     route_map_object_t type, void *object)
 {
@@ -273,13 +273,13 @@
   return RMAP_NOMATCH;
 }
 
-void *
+static void *
 route_match_ip_next_hop_prefix_list_compile (const char *arg)
 {
   return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
 }
 
-void
+static void
 route_match_ip_next_hop_prefix_list_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -296,7 +296,7 @@
 /* `match ip address IP_ACCESS_LIST' */
 /* Match function should return 1 if match is success else return
    zero. */
-route_map_result_t
+static route_map_result_t
 route_match_ip_address (void *rule, struct prefix *prefix,
                         route_map_object_t type, void *object)
 {
@@ -317,14 +317,14 @@
 
 /* Route map `ip address' match statement.  `arg' should be
    access-list name. */
-void *
+static void *
 route_match_ip_address_compile (const char *arg)
 {
   return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
 }
 
 /* Free route map's compiled `ip address' value. */
-void
+static void
 route_match_ip_address_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -340,7 +340,7 @@
 };
 
 /* `match ip address prefix-list PREFIX_LIST' */
-route_map_result_t
+static route_map_result_t
 route_match_ip_address_prefix_list (void *rule, struct prefix *prefix,
                                     route_map_object_t type, void *object)
 {
@@ -358,13 +358,13 @@
   return RMAP_NOMATCH;
 }
 
-void *
+static void *
 route_match_ip_address_prefix_list_compile (const char *arg)
 {
   return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
 }
 
-void
+static void
 route_match_ip_address_prefix_list_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -381,7 +381,7 @@
 /* `match interface IFNAME' */
 /* Match function should return 1 if match is success else return
    zero. */
-route_map_result_t
+static route_map_result_t
 route_match_interface (void *rule, struct prefix *prefix,
 		       route_map_object_t type, void *object)
 {
@@ -403,14 +403,14 @@
 
 /* Route map `interface' match statement.  `arg' should be
    interface name. */
-void *
+static void *
 route_match_interface_compile (const char *arg)
 {
   return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
 }
 
 /* Free route map's compiled `interface' value. */
-void
+static void
 route_match_interface_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -427,7 +427,7 @@
 
 /* `set metric METRIC' */
 /* Set metric to attribute. */
-route_map_result_t
+static route_map_result_t
 route_set_metric (void *rule, struct prefix *prefix,
                   route_map_object_t type, void *object)
 {
@@ -447,7 +447,7 @@
 }
 
 /* set metric compilation. */
-void *
+static void *
 route_set_metric_compile (const char *arg)
 {
   u_int32_t *metric;
@@ -463,7 +463,7 @@
 }
 
 /* Free route map's compiled `set metric' value. */
-void
+static void
 route_set_metric_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -480,7 +480,7 @@
 
 /* `set metric-type TYPE' */
 /* Set metric-type to attribute. */
-route_map_result_t
+static route_map_result_t
 route_set_metric_type (void *rule, struct prefix *prefix,
 		       route_map_object_t type, void *object)
 {
@@ -500,7 +500,7 @@
 }
 
 /* set metric-type compilation. */
-void *
+static void *
 route_set_metric_type_compile (const char *arg)
 {
   u_int32_t *metric_type;
@@ -520,7 +520,7 @@
 }
 
 /* Free route map's compiled `set metric-type' value. */
-void
+static void
 route_set_metric_type_free (void *rule)
 {
   XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
@@ -760,11 +760,9 @@
        "OSPF[6] external type 2 metric\n")
 {
   if (strcmp (argv[0], "1") == 0)
-    return ospf_route_set_add (vty, vty->index, "metric-type",
-			       (char *) "type-1");
+    return ospf_route_set_add (vty, vty->index, "metric-type", "type-1");
   if (strcmp (argv[0], "2") == 0)
-    return ospf_route_set_add (vty, vty->index, "metric-type",
-			       (char *) "type-2");
+    return ospf_route_set_add (vty, vty->index, "metric-type", "type-2");
 
   return ospf_route_set_add (vty, vty->index, "metric-type", argv[0]);
 }