#include "stream.h"
+/* OSPF LSA Default metric values */
+#define DEFAULT_DEFAULT_METRIC 20
+#define DEFAULT_DEFAULT_ORIGINATE_METRIC 10
+#define DEFAULT_DEFAULT_ALWAYS_METRIC 1
+#define DEFAULT_METRIC_TYPE EXTERNAL_METRIC_TYPE_2
+
/* OSPF LSA Range definition. */
#define OSPF_MIN_LSA 1 /* begin range here */
#define OSPF_MAX_LSA 12
uint16_t length;
};
+struct vertex;
+
/* OSPF LSA. */
struct ospf_lsa {
/* LSA origination flag. */
int lock;
/* Flags for the SPF calculation. */
- int stat;
-#define LSA_SPF_NOT_EXPLORED -1
-#define LSA_SPF_IN_SPFTREE -2
- /* If stat >= 0, stat is LSA position in candidates heap. */
+ struct vertex *stat;
/* References to this LSA in neighbor retransmission lists*/
int retransmit_counter;
/* Prototype for LSA primitive. */
extern struct ospf_lsa *ospf_lsa_new(void);
+extern struct ospf_lsa *ospf_lsa_new_and_data(size_t size);
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 struct ospf_lsa *ospf_external_lsa_originate(struct ospf *,
struct external_info *);
-extern int ospf_external_lsa_originate_timer(struct thread *);
-extern int ospf_default_originate_timer(struct thread *);
+extern void ospf_external_lsa_rid_change(struct ospf *ospf);
extern struct ospf_lsa *ospf_lsa_lookup(struct ospf *ospf, struct ospf_area *,
uint32_t, struct in_addr,
struct in_addr);