summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsa.h
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_lsa.h')
-rw-r--r--ospfd/ospf_lsa.h144
1 files changed, 72 insertions, 72 deletions
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 952ca774..d7ead3d4 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -23,6 +23,8 @@
#ifndef _ZEBRA_OSPF_LSA_H
#define _ZEBRA_OSPF_LSA_H
+#include "stream.h"
+
/* OSPF LSA Range definition. */
#define OSPF_MIN_LSA 1 /* begin range here */
#if defined (HAVE_OPAQUE_LSA)
@@ -217,115 +219,113 @@ struct as_external_lsa
if (!(T)) \
(T) = thread_add_timer (master, (F), 0, 2)
-struct ospf_route;
-struct ospf_lsdb;
-
/* Prototypes. */
-struct timeval tv_adjust (struct timeval);
-int tv_ceil (struct timeval);
-int tv_floor (struct timeval);
-struct timeval int2tv (int);
-struct timeval tv_add (struct timeval, struct timeval);
-struct timeval tv_sub (struct timeval, struct timeval);
-int tv_cmp (struct timeval, struct timeval);
-
-int get_age (struct ospf_lsa *);
-u_int16_t ospf_lsa_checksum (struct lsa_header *);
-
-struct stream;
-const char *dump_lsa_key (struct ospf_lsa *);
-u_int32_t lsa_seqnum_increment (struct ospf_lsa *);
-void lsa_header_set (struct stream *, u_char, u_char, struct in_addr,
+/* XXX: Eek, time functions, similar are in lib/thread.c */
+extern struct timeval tv_adjust (struct timeval);
+extern int tv_ceil (struct timeval);
+extern int tv_floor (struct timeval);
+extern struct timeval int2tv (int);
+extern struct timeval tv_add (struct timeval, struct timeval);
+extern struct timeval tv_sub (struct timeval, struct timeval);
+extern int tv_cmp (struct timeval, struct timeval);
+
+extern int get_age (struct ospf_lsa *);
+extern u_int16_t ospf_lsa_checksum (struct lsa_header *);
+extern int ospf_lsa_refresh_delay (struct ospf_lsa *);
+
+extern const char *dump_lsa_key (struct ospf_lsa *);
+extern u_int32_t lsa_seqnum_increment (struct ospf_lsa *);
+extern void lsa_header_set (struct stream *, u_char, u_char, struct in_addr,
struct in_addr);
-struct ospf_neighbor *ospf_nbr_lookup_ptop (struct ospf_interface *);
+extern struct ospf_neighbor *ospf_nbr_lookup_ptop (struct ospf_interface *);
/* Prototype for LSA primitive. */
-struct ospf_lsa *ospf_lsa_new ();
-struct ospf_lsa *ospf_lsa_dup ();
-void ospf_lsa_free (struct ospf_lsa *);
-struct ospf_lsa *ospf_lsa_lock (struct ospf_lsa *);
-void ospf_lsa_unlock (struct ospf_lsa *);
-void ospf_lsa_discard (struct ospf_lsa *);
+extern struct ospf_lsa *ospf_lsa_new (void);
+extern struct ospf_lsa *ospf_lsa_dup (struct ospf_lsa *);
+extern void ospf_lsa_free (struct ospf_lsa *);
+extern struct ospf_lsa *ospf_lsa_lock (struct ospf_lsa *);
+extern void ospf_lsa_unlock (struct ospf_lsa *);
+extern void ospf_lsa_discard (struct ospf_lsa *);
-struct lsa_header *ospf_lsa_data_new (size_t);
-struct lsa_header *ospf_lsa_data_dup (struct lsa_header *);
-void ospf_lsa_data_free (struct lsa_header *);
+extern struct lsa_header *ospf_lsa_data_new (size_t);
+extern struct lsa_header *ospf_lsa_data_dup (struct lsa_header *);
+extern void ospf_lsa_data_free (struct lsa_header *);
/* Prototype for various LSAs */
-struct ospf_lsa *ospf_router_lsa_originate (struct ospf_area *);
-int ospf_router_lsa_update_timer (struct thread *);
-void ospf_router_lsa_timer_add (struct ospf_area *);
+extern struct ospf_lsa *ospf_router_lsa_originate (struct ospf_area *);
+extern int ospf_router_lsa_update_timer (struct thread *);
+extern void ospf_router_lsa_timer_add (struct ospf_area *);
-int ospf_network_lsa_refresh (struct ospf_lsa *, struct ospf_interface *);
-void ospf_network_lsa_timer_add (struct ospf_interface *);
+extern int ospf_network_lsa_refresh (struct ospf_lsa *, struct ospf_interface *);
+extern void ospf_network_lsa_timer_add (struct ospf_interface *);
-struct ospf_lsa *ospf_summary_lsa_originate (struct prefix_ipv4 *, u_int32_t,
+extern struct ospf_lsa *ospf_summary_lsa_originate (struct prefix_ipv4 *, u_int32_t,
struct ospf_area *);
-struct ospf_lsa *ospf_summary_asbr_lsa_originate (struct prefix_ipv4 *,
+extern struct ospf_lsa *ospf_summary_asbr_lsa_originate (struct prefix_ipv4 *,
u_int32_t,
struct ospf_area *);
-struct ospf_lsa *ospf_summary_lsa_refresh (struct ospf *, struct ospf_lsa *);
-struct ospf_lsa *ospf_summary_asbr_lsa_refresh (struct ospf *, struct ospf_lsa *);
+extern struct ospf_lsa *ospf_summary_lsa_refresh (struct ospf *, struct ospf_lsa *);
+extern struct ospf_lsa *ospf_summary_asbr_lsa_refresh (struct ospf *, struct ospf_lsa *);
-struct ospf_lsa *ospf_lsa_install (struct ospf *,
+extern struct ospf_lsa *ospf_lsa_install (struct ospf *,
struct ospf_interface *, struct ospf_lsa *);
-void ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p);
-void ospf_external_lsa_flush (struct ospf *, u_char, struct prefix_ipv4 *,
+extern void ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p);
+extern void ospf_external_lsa_flush (struct ospf *, u_char, struct prefix_ipv4 *,
unsigned int, struct in_addr);
-struct in_addr ospf_get_ip_from_ifp (struct ospf_interface *);
+extern struct in_addr ospf_get_ip_from_ifp (struct ospf_interface *);
-struct ospf_lsa *ospf_external_lsa_originate (struct ospf *, struct external_info *);
-int ospf_external_lsa_originate_timer (struct thread *);
-struct ospf_lsa *ospf_lsa_lookup (struct ospf_area *, u_int32_t,
+extern struct ospf_lsa *ospf_external_lsa_originate (struct ospf *, struct external_info *);
+extern int ospf_external_lsa_originate_timer (struct thread *);
+extern struct ospf_lsa *ospf_lsa_lookup (struct ospf_area *, u_int32_t,
struct in_addr, struct in_addr);
-struct ospf_lsa *ospf_lsa_lookup_by_id (struct ospf_area *,
+extern struct ospf_lsa *ospf_lsa_lookup_by_id (struct ospf_area *,
u_int32_t,
struct in_addr);
-struct ospf_lsa *ospf_lsa_lookup_by_header (struct ospf_area *,
+extern struct ospf_lsa *ospf_lsa_lookup_by_header (struct ospf_area *,
struct lsa_header *);
-int ospf_lsa_more_recent (struct ospf_lsa *, struct ospf_lsa *);
-int ospf_lsa_different (struct ospf_lsa *, struct ospf_lsa *);
-void ospf_flush_self_originated_lsas_now (struct ospf *);
+extern int ospf_lsa_more_recent (struct ospf_lsa *, struct ospf_lsa *);
+extern int ospf_lsa_different (struct ospf_lsa *, struct ospf_lsa *);
+extern void ospf_flush_self_originated_lsas_now (struct ospf *);
-int ospf_lsa_is_self_originated (struct ospf *, struct ospf_lsa *);
+extern int ospf_lsa_is_self_originated (struct ospf *, struct ospf_lsa *);
-struct ospf_lsa *ospf_lsa_lookup_by_prefix (struct ospf_lsdb *, u_char,
+extern struct ospf_lsa *ospf_lsa_lookup_by_prefix (struct ospf_lsdb *, u_char,
struct prefix_ipv4 *,
struct in_addr);
-void ospf_lsa_maxage (struct ospf *, struct ospf_lsa *);
-u_int32_t get_metric (u_char *);
+extern void ospf_lsa_maxage (struct ospf *, struct ospf_lsa *);
+extern u_int32_t get_metric (u_char *);
-int ospf_lsa_maxage_walker (struct thread *);
+extern int ospf_lsa_maxage_walker (struct thread *);
-void ospf_external_lsa_refresh_default (struct ospf *);
+extern void ospf_external_lsa_refresh_default (struct ospf *);
-void ospf_external_lsa_refresh_type (struct ospf *, u_char, int);
-void ospf_external_lsa_refresh (struct ospf *, struct ospf_lsa *,
+extern void ospf_external_lsa_refresh_type (struct ospf *, u_char, int);
+extern void ospf_external_lsa_refresh (struct ospf *, struct ospf_lsa *,
struct external_info *, int);
-struct in_addr ospf_lsa_unique_id (struct ospf *, struct ospf_lsdb *, u_char,
+extern struct in_addr ospf_lsa_unique_id (struct ospf *, struct ospf_lsdb *, u_char,
struct prefix_ipv4 *);
-void ospf_schedule_lsa_flood_area (struct ospf_area *, struct ospf_lsa *);
-void ospf_schedule_lsa_flush_area (struct ospf_area *, struct ospf_lsa *);
+extern void ospf_schedule_lsa_flood_area (struct ospf_area *, struct ospf_lsa *);
+extern void ospf_schedule_lsa_flush_area (struct ospf_area *, struct ospf_lsa *);
-void ospf_refresher_register_lsa (struct ospf *, struct ospf_lsa *);
-void ospf_refresher_unregister_lsa (struct ospf *, struct ospf_lsa *);
-int ospf_lsa_refresh_walker (struct thread *);
+extern void ospf_refresher_register_lsa (struct ospf *, struct ospf_lsa *);
+extern void ospf_refresher_unregister_lsa (struct ospf *, struct ospf_lsa *);
+extern int ospf_lsa_refresh_walker (struct thread *);
-void ospf_lsa_maxage_delete (struct ospf *, struct ospf_lsa *);
+extern void ospf_lsa_maxage_delete (struct ospf *, struct ospf_lsa *);
-void ospf_discard_from_db (struct ospf *, struct ospf_lsdb *, struct ospf_lsa*);
-int is_prefix_default (struct prefix_ipv4 *);
+extern void ospf_discard_from_db (struct ospf *, struct ospf_lsdb *, struct ospf_lsa*);
+extern int is_prefix_default (struct prefix_ipv4 *);
-int metric_type (struct ospf *, u_char);
-int metric_value (struct ospf *, u_char);
+extern int metric_type (struct ospf *, u_char);
+extern int metric_value (struct ospf *, u_char);
-struct in_addr ospf_get_nssa_ip (struct ospf_area *);
-int ospf_translated_nssa_compare (struct ospf_lsa *, struct ospf_lsa *);
-struct ospf_lsa *ospf_translated_nssa_refresh (struct ospf *, struct ospf_lsa *,
+extern struct in_addr ospf_get_nssa_ip (struct ospf_area *);
+extern int ospf_translated_nssa_compare (struct ospf_lsa *, struct ospf_lsa *);
+extern struct ospf_lsa *ospf_translated_nssa_refresh (struct ospf *, struct ospf_lsa *,
struct ospf_lsa *);
-struct ospf_lsa *ospf_translated_nssa_originate (struct ospf *, struct ospf_lsa *);
+extern struct ospf_lsa *ospf_translated_nssa_originate (struct ospf *, struct ospf_lsa *);
#endif /* _ZEBRA_OSPF_LSA_H */