diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-06-12 18:31:52 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-06-28 08:52:15 +0200 |
commit | 2da7d62e94997683e141e4b1d092eaedff16d3fb (patch) | |
tree | 3a0667c66a56f1f4b74c4e9ce5e0eee41646de85 /lib/pbr.h | |
parent | bgpd: fix display with flowspec tcp flags option (diff) | |
download | frr-2da7d62e94997683e141e4b1d092eaedff16d3fb.tar.xz frr-2da7d62e94997683e141e4b1d092eaedff16d3fb.zip |
bgpd: support for flowspec tcp flags
Ability to handle flowspec tcp flags.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/pbr.h')
-rw-r--r-- | lib/pbr.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -89,6 +89,20 @@ struct pbr_rule { uint32_t ifindex; }; +/* TCP flags value shared + * those are values of byte 13 of TCP header + * as mentioned in rfc793 + */ +#define TCP_HEADER_FIN (0x01) +#define TCP_HEADER_SYN (0x02) +#define TCP_HEADER_RST (0x04) +#define TCP_HEADER_PSH (0x08) +#define TCP_HEADER_ACK (0x10) +#define TCP_HEADER_URG (0x20) +#define TCP_HEADER_ALL_FLAGS (TCP_HEADER_FIN | TCP_HEADER_SYN \ + | TCP_HEADER_RST | TCP_HEADER_PSH \ + | TCP_HEADER_ACK | TCP_HEADER_URG) + extern int zapi_pbr_rule_encode(uint8_t cmd, struct stream *s, struct pbr_rule *zrule); |