diff options
author | hasso <hasso> | 2005-02-23 12:29:02 +0100 |
---|---|---|
committer | hasso <hasso> | 2005-02-23 12:29:02 +0100 |
commit | 462f20d50c8f86c26904f1c7316d910c2b83ae41 (patch) | |
tree | 3edbff28c76bdb8e1c66ea5153b1cb58d40f15aa /ospfd/ospf_lsdb.c | |
parent | * pqueue.[ch]: Introduce "update" function to meet ospf spf needs. It (diff) | |
download | frr-462f20d50c8f86c26904f1c7316d910c2b83ae41.tar.xz frr-462f20d50c8f86c26904f1c7316d910c2b83ae41.zip |
* ospf_lsa.h: New flag to the LSA structure for the SPF calculation.
* ospf_lsdb.h: Export ospf_lsdb_clean_stat() function.
* ospf_spf.h: Add link to the LSA stat structure into vertex.
* ospf_spf.c: New functions cmp() and update_stat() to manage
candidates. Remove ospf_spf_has_vertex(), ospf_vertex_lookup(),
ospf_install_candidate() and ospf_spf_register() functions not needed
any more. Update ospf_vertex_new(), ospf_spf_next() and
ospf_spf_calculate() functions to use pqueue instead of linked list.
Diffstat (limited to 'ospfd/ospf_lsdb.c')
-rw-r--r-- | ospfd/ospf_lsdb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c index 94d839f2d..56ab9e2a8 100644 --- a/ospfd/ospf_lsdb.c +++ b/ospfd/ospf_lsdb.c @@ -180,6 +180,23 @@ ospf_lsdb_delete_all (struct ospf_lsdb *lsdb) } } +void +ospf_lsdb_clean_stat (struct ospf_lsdb *lsdb) +{ + struct route_table *table; + struct route_node *rn; + struct ospf_lsa *lsa; + int i; + + for (i = OSPF_MIN_LSA; i < OSPF_MAX_LSA; i++) + { + table = lsdb->type[i].db; + for (rn = route_top (table); rn; rn = route_next (rn)) + if ((lsa = (rn->info)) != NULL) + lsa->stat = LSA_SPF_NOT_EXPLORED; + } +} + struct ospf_lsa * ospf_lsdb_lookup (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa) { |