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_api.h b/ospfd/ospf_api.h
index 77e1b23..eb5ad0a 100644
--- a/ospfd/ospf_api.h
+++ b/ospfd/ospf_api.h
@@ -65,13 +65,13 @@
 };
 
 /* Prototypes for generic messages. */
-struct msg *msg_new (u_char msgtype, void *msgbody,
+extern struct msg *msg_new (u_char msgtype, void *msgbody,
 		     u_int32_t seqnum, u_int16_t msglen);
-struct msg *msg_dup (struct msg *msg);
-void msg_print (struct msg *msg);	/* XXX debug only */
-void msg_free (struct msg *msg);
+extern struct msg *msg_dup (struct msg *msg);
+extern void msg_print (struct msg *msg);	/* XXX debug only */
+extern void msg_free (struct msg *msg);
 struct msg *msg_read (int fd);
-int msg_write (int fd, struct msg *msg);
+extern int msg_write (int fd, struct msg *msg);
 
 /* For requests, the message sequence number is between MIN_SEQ and
    MAX_SEQ. For notifications, the sequence number is 0. */
@@ -79,8 +79,8 @@
 #define MIN_SEQ          1
 #define MAX_SEQ 2147483647
 
-void msg_set_seq (struct msg *msg, u_int32_t seqnr);
-u_int32_t msg_get_seq (struct msg *msg);
+extern void msg_set_seq (struct msg *msg, u_int32_t seqnr);
+extern u_int32_t msg_get_seq (struct msg *msg);
 
 /* -----------------------------------------------------------
  * Message fifo queues
@@ -97,12 +97,12 @@
 };
 
 /* Prototype for message fifo queues. */
-struct msg_fifo *msg_fifo_new ();
-void msg_fifo_push (struct msg_fifo *, struct msg *msg);
-struct msg *msg_fifo_pop (struct msg_fifo *fifo);
-struct msg *msg_fifo_head (struct msg_fifo *fifo);
-void msg_fifo_flush (struct msg_fifo *fifo);
-void msg_fifo_free (struct msg_fifo *fifo);
+extern struct msg_fifo *msg_fifo_new (void);
+extern void msg_fifo_push (struct msg_fifo *, struct msg *msg);
+extern struct msg *msg_fifo_pop (struct msg_fifo *fifo);
+extern struct msg *msg_fifo_head (struct msg_fifo *fifo);
+extern void msg_fifo_flush (struct msg_fifo *fifo);
+extern void msg_fifo_free (struct msg_fifo *fifo);
 
 /* -----------------------------------------------------------
  * Specific message type and format definitions
@@ -306,52 +306,56 @@
  */
 
 /* For debugging only. */
-void api_opaque_lsa_print (struct lsa_header *data);
+extern void api_opaque_lsa_print (struct lsa_header *data);
 
 /* Messages sent by client */
-struct msg *new_msg_register_opaque_type (u_int32_t seqnum, u_char ltype,
-					  u_char otype);
-struct msg *new_msg_register_event (u_int32_t seqnum,
-				    struct lsa_filter_type *filter);
-struct msg *new_msg_sync_lsdb (u_int32_t seqnum,
-			       struct lsa_filter_type *filter);
-struct msg *new_msg_originate_request (u_int32_t seqnum,
-				       struct in_addr ifaddr,
-				       struct in_addr area_id,
-				       struct lsa_header *data);
-struct msg *new_msg_delete_request (u_int32_t seqnum,
-				    struct in_addr area_id,
-				    u_char lsa_type,
-				    u_char opaque_type, u_int32_t opaque_id);
+extern struct msg *new_msg_register_opaque_type (u_int32_t seqnum,
+						 u_char ltype, u_char otype);
+extern struct msg *new_msg_register_event (u_int32_t seqnum,
+					   struct lsa_filter_type *filter);
+extern struct msg *new_msg_sync_lsdb (u_int32_t seqnum,
+				      struct lsa_filter_type *filter);
+extern struct msg *new_msg_originate_request (u_int32_t seqnum,
+					      struct in_addr ifaddr,
+					      struct in_addr area_id,
+					      struct lsa_header *data);
+extern struct msg *new_msg_delete_request (u_int32_t seqnum,
+					   struct in_addr area_id,
+					   u_char lsa_type,
+					   u_char opaque_type,
+					   u_int32_t opaque_id);
 
 /* Messages sent by OSPF daemon */
-struct msg *new_msg_reply (u_int32_t seqnum, u_char rc);
+extern struct msg *new_msg_reply (u_int32_t seqnum, u_char rc);
 
-struct msg *new_msg_ready_notify (u_int32_t seqnr, u_char lsa_type,
-				  u_char opaque_type, struct in_addr addr);
+extern struct msg *new_msg_ready_notify (u_int32_t seqnr, u_char lsa_type,
+					 u_char opaque_type,
+					 struct in_addr addr);
 
-struct msg *new_msg_new_if (u_int32_t seqnr,
-			    struct in_addr ifaddr, struct in_addr area);
+extern struct msg *new_msg_new_if (u_int32_t seqnr,
+				   struct in_addr ifaddr,
+				   struct in_addr area);
 
-struct msg *new_msg_del_if (u_int32_t seqnr, struct in_addr ifaddr);
+extern struct msg *new_msg_del_if (u_int32_t seqnr, struct in_addr ifaddr);
 
-struct msg *new_msg_ism_change (u_int32_t seqnr, struct in_addr ifaddr,
-				struct in_addr area, u_char status);
+extern struct msg *new_msg_ism_change (u_int32_t seqnr, struct in_addr ifaddr,
+				       struct in_addr area, u_char status);
 
-struct msg *new_msg_nsm_change (u_int32_t seqnr, struct in_addr ifaddr,
-				struct in_addr nbraddr,
-				struct in_addr router_id, u_char status);
+extern struct msg *new_msg_nsm_change (u_int32_t seqnr, struct in_addr ifaddr,
+				       struct in_addr nbraddr,
+				       struct in_addr router_id,
+				       u_char status);
 
 /* msgtype is MSG_LSA_UPDATE_NOTIFY or MSG_LSA_DELETE_NOTIFY */
-struct msg *new_msg_lsa_change_notify (u_char msgtype,
-				       u_int32_t seqnum,
-				       struct in_addr ifaddr,
-				       struct in_addr area_id,
-				       u_char is_self_originated,
-				       struct lsa_header *data);
+extern struct msg *new_msg_lsa_change_notify (u_char msgtype,
+					      u_int32_t seqnum,
+					      struct in_addr ifaddr,
+					      struct in_addr area_id,
+					      u_char is_self_originated,
+					      struct lsa_header *data);
 
 /* string printing functions */
-const char *ospf_api_errname (int errcode);
-const char *ospf_api_typename (int msgtype);
+extern const char *ospf_api_errname (int errcode);
+extern const char *ospf_api_typename (int msgtype);
 
 #endif /* _OSPF_API_H */