summaryrefslogtreecommitdiff
path: root/proto/ospf/lsalib.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-06-20 18:03:06 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-07 13:53:42 +0100
commitb32d557a6eca10c1e1dc2f2ab83e201f53d134b4 (patch)
tree2cb47dd9aca4d52ebafce84826da2903e43ca6b2 /proto/ospf/lsalib.h
parentee528fbd5dc482ceece52832d4a8ea5a08251bfa (diff)
OSPF: Update to new timers
Note that recurrent timers are currently limited to ~1 hour.
Diffstat (limited to 'proto/ospf/lsalib.h')
-rw-r--r--proto/ospf/lsalib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/ospf/lsalib.h b/proto/ospf/lsalib.h
index 0d477f58..fca7faec 100644
--- a/proto/ospf/lsalib.h
+++ b/proto/ospf/lsalib.h
@@ -60,4 +60,7 @@ void lsa_parse_sum_rt(struct top_hash_entry *en, int ospf2, u32 *drid, u32 *metr
void lsa_parse_ext(struct top_hash_entry *en, int ospf2, int af, struct ospf_lsa_ext_local *rt);
int lsa_validate(struct ospf_lsa_header *lsa, u32 lsa_type, int ospf2, void *body);
+static inline btime lsa_inst_age(struct top_hash_entry *en)
+{ return current_time() - en->inst_time; }
+
#endif /* _BIRD_OSPF_LSALIB_H_ */