summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsa.h
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2010-01-24 22:42:13 +0000
committerPaul Jakma <paul@quagga.net>2010-12-08 17:13:19 +0000
commitc363d3861b5384a31465a72ddc3b0f6ff007a95a (patch)
tree3fcbfc071dc2a376979ca6a80d06599a5b574047 /ospfd/ospf_lsa.h
parent7eb5b47e54169ac0da40ed1a6760db5d5f915a4d (diff)
ospfd: Unify router and network LSA refresh logic with general refresher
* (general) Get rid of the router and network LSA specific refresh timers and make the general refresher do this instead. Get rid of the twiddling of timers for router/network LSA that was spread across the code. This lays the foundations for future, general LSA refresh improvements, such as making sequence rollover work, and having generic LSA delays. * ospfd.h: (struct ospf) Bye bye to the router-lsa update timer thread pointer. (struct ospf_area) and to the router-lsa refresh timer. * ospf_interface.h: Remove the network_lsa_self timer thread pointer * ospf_lsa.h: (struct ospf_lsa) oi field should always be there, for benefit of type-2/network LSA processing. (ospf_{router,network}_lsa_{update_timer,timer_add}) no timers for these more (ospf_{router,network}_lsa_update) more generic functions to indicate that some router/network LSAs need updating (ospf_router_lsa_update_area) update router lsa in a particular area alone. (ospf_{summary,summary_asbr,network}_lsa_refresh) replaced by the general ospf_lsa_refresh function. (ospf_lsa_refresh) general LSA refresh function
Diffstat (limited to 'ospfd/ospf_lsa.h')
-rw-r--r--ospfd/ospf_lsa.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 251d4731..0959a638 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -115,10 +115,8 @@ struct ospf_lsa
/* Refreshement List or Queue */
int refresh_list;
-#ifdef HAVE_OPAQUE_LSA
- /* For Type-9 Opaque-LSAs, reference to ospf-interface is required. */
+ /* For Type-9 Opaque-LSAs or Type-2 Network-LSAs */
struct ospf_interface *oi;
-#endif /* HAVE_OPAQUE_LSA */
};
/* OSPF LSA Link Type. */
@@ -254,19 +252,16 @@ extern struct lsa_header *ospf_lsa_data_dup (struct lsa_header *);
extern void ospf_lsa_data_free (struct lsa_header *);
/* Prototype for various LSAs */
-extern int ospf_router_lsa_update_timer (struct thread *);
-extern void ospf_router_lsa_timer_add (struct ospf_area *);
+extern int ospf_router_lsa_update (struct ospf *);
+extern int ospf_router_lsa_update_area (struct ospf_area *);
-extern int ospf_network_lsa_refresh (struct ospf_lsa *, struct ospf_interface *);
-extern void ospf_network_lsa_timer_add (struct ospf_interface *);
+extern void ospf_network_lsa_update (struct ospf_interface *);
extern struct ospf_lsa *ospf_summary_lsa_originate (struct prefix_ipv4 *, u_int32_t,
struct ospf_area *);
extern struct ospf_lsa *ospf_summary_asbr_lsa_originate (struct prefix_ipv4 *,
u_int32_t,
struct ospf_area *);
-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 *);
extern struct ospf_lsa *ospf_lsa_install (struct ospf *,
struct ospf_interface *, struct ospf_lsa *);
@@ -300,12 +295,15 @@ extern void ospf_lsa_maxage (struct ospf *, struct ospf_lsa *);
extern u_int32_t get_metric (u_char *);
extern int ospf_lsa_maxage_walker (struct thread *);
-
+extern struct ospf_lsa *ospf_lsa_refresh (struct ospf *, struct ospf_lsa *);
+
extern void ospf_external_lsa_refresh_default (struct ospf *);
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);
+extern struct ospf_lsa *ospf_external_lsa_refresh (struct ospf *,
+ struct ospf_lsa *,
+ struct external_info *,
+ int);
extern struct in_addr ospf_lsa_unique_id (struct ospf *, struct ospf_lsdb *, u_char,
struct prefix_ipv4 *);
extern void ospf_schedule_lsa_flood_area (struct ospf_area *, struct ospf_lsa *);