diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2015-05-01 14:40:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2015-05-01 14:40:56 +0200 |
commit | 77edab640925e8d1131f0d00b41de055129ff99f (patch) | |
tree | f05040c396f2683f52ebff7adf9575990f219679 /proto/ospf/lsalib.h | |
parent | 30d09eb96e8d46143d04285016a137d71a87c416 (diff) |
OSPF: Redesign LSA checksumming
New LSA checksumming code separates generic Fletcher-16 and OSPF-specific
code and avoids back and forth endianity conversions, making it much more
readable and also several times faster.
Diffstat (limited to 'proto/ospf/lsalib.h')
-rw-r--r-- | proto/ospf/lsalib.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/ospf/lsalib.h b/proto/ospf/lsalib.h index 4ad770e8..ae6af044 100644 --- a/proto/ospf/lsalib.h +++ b/proto/ospf/lsalib.h @@ -46,9 +46,9 @@ static inline u32 lsa_get_etype(struct ospf_lsa_header *h, struct ospf_proto *p) int lsa_flooding_allowed(u32 type, u32 domain, struct ospf_iface *ifa); +void lsa_generate_checksum(struct ospf_lsa_header *lsa, const u8 *body); +u16 lsa_verify_checksum(const void *lsa_n, int lsa_len); -void lsasum_calculate(struct ospf_lsa_header *header, void *body); -u16 lsasum_check(struct ospf_lsa_header *h, void *body, int update); #define CMP_NEWER 1 #define CMP_SAME 0 #define CMP_OLDER -1 |