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

BGP: Add support for flowspec (RFC 5575)

This commit is contained in:
Ondrej Zajicek (work)
2016-12-07 18:28:07 +01:00
parent b7605d5c95
commit ac3ad139f6
6 changed files with 247 additions and 6 deletions

View File

@@ -42,6 +42,9 @@ const char *flow_type_str(enum flow_type type, int ipv6);
uint flow_write_length(byte *data, u16 len);
static inline u16 flow_hdr_length(const byte *data)
{ return ((*data & 0xf0) == 0xf0) ? 2 : 1; }
static inline u16 flow_read_length(const byte *data)
{ return ((*data & 0xf0) == 0xf0) ? get_u16(data) & 0x0fff : *data; }