1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

OSPF: Opaque LSAs and Router Information LSA

Add support for OSPFv2 Opaque LSAs (RFC 5250) and for Router Information
LSA (RFC 7770). The second part is here mainly for testing opaque LSAs.
This commit is contained in:
Ondrej Zajicek (work)
2019-01-24 22:34:33 +01:00
parent 3e60932a28
commit 5a50a98980
9 changed files with 224 additions and 40 deletions

View File

@@ -56,6 +56,13 @@ static inline int u64_cmp(u64 i1, u64 i2)
#define BIT32_CLR(b,p) ((b)[(p)/32] &= ~BIT32_VAL(p))
#define BIT32_ZERO(b,l) memset((b), 0, (l)/8)
/* The same, but counting bits from MSB */
#define BIT32R_VAL(p) ((((u32) 1) << 31) >> ((p) % 32))
#define BIT32R_TEST(b,p) ((b)[(p)/32] & BIT32R_VAL(p))
#define BIT32R_SET(b,p) ((b)[(p)/32] |= BIT32R_VAL(p))
#define BIT32R_CLR(b,p) ((b)[(p)/32] &= ~BIT32R_VAL(p))
#define BIT32R_ZERO(b,l) memset((b), 0, (l)/8)
#ifndef NULL
#define NULL ((void *) 0)
#endif