diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-02 22:19:41 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-02 22:19:41 +0000 |
commit | c45f48fba5a0904f9c3512c3b42c38183fef348b (patch) | |
tree | 3679fc0a54a1bc3f316d6024d4c90d4997d065ff /proto/ospf/lsalib.c | |
parent | a92847e78fabd637938f324c78d5eb41538a5692 (diff) |
Aging of lsa database added.
Diffstat (limited to 'proto/ospf/lsalib.c')
-rw-r--r-- | proto/ospf/lsalib.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 261ed341..8c5ec680 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -8,6 +8,34 @@ #include "ospf.h" +/* FIXME Go on */ +void +flush_lsa(struct top_hash_entry *en) +{ + return; +} + +void +ospf_age(struct top_hash_entry *en, bird_clock_t delta, int flush, + struct proto *p) +{ + if(en->lsa.age==LSA_MAXAGE) + { + if(flush) flush_lsa(en); + return; + } + if((en->lsa.rt==p->cf->global->router_id)&&(en->lsa.age>LSREFRESHTIME)) + { + /* FIXME Reflood again my self originated LSA */ + } + if((en->lsa.age+=delta)>LSA_MAXAGE) + { + if(flush) flush_lsa(en); + else en->lsa.age=LSA_MAXAGE; + return; + } +} + void htonlsah(struct ospf_lsa_header *h, struct ospf_lsa_header *n) { |