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

BGP redesign

Integrated and extensible BGP with generalized AFI handling,
support for IPv4+IPv6 AFI and unicast+multicast SAFI.
This commit is contained in:
Ondrej Zajicek (work)
2016-12-07 14:11:28 +01:00
parent 5df4073c81
commit d15b0b0a1b
25 changed files with 4786 additions and 3545 deletions

View File

@@ -69,4 +69,22 @@ put_u64(void *p, u64 x)
memcpy(p+4, &xl, 4);
}
static inline void
get_u32s(const void *p, u32 *x, int n)
{
int i;
memcpy(x, p, 4*n);
for (i = 0; i < n; i++)
x[i] = ntohl(x[i]);
}
static inline void
put_u32s(void *p, const u32 *x, int n)
{
int i;
for (i = 0; i < n; i++)
put_u32((byte *) p + 4*i, x[i]);
}
#endif