diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-03 00:19:41 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-03 00:19:41 +0200 |
commit | c45f48fba5a0904f9c3512c3b42c38183fef348b (patch) | |
tree | 3679fc0a54a1bc3f316d6024d4c90d4997d065ff /proto/ospf/lsalib.c | |
parent | a92847e78fabd637938f324c78d5eb41538a5692 (diff) | |
download | bird-c45f48fba5a0904f9c3512c3b42c38183fef348b.tar bird-c45f48fba5a0904f9c3512c3b42c38183fef348b.zip |
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 261ed34..8c5ec68 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) { |