summaryrefslogtreecommitdiffstats
path: root/lib/pbr.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-06-12 18:31:52 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-06-28 08:52:15 +0200
commit2da7d62e94997683e141e4b1d092eaedff16d3fb (patch)
tree3a0667c66a56f1f4b74c4e9ce5e0eee41646de85 /lib/pbr.h
parentbgpd: fix display with flowspec tcp flags option (diff)
downloadfrr-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/pbr.h b/lib/pbr.h
index 1704d8d37..0f9dfdd09 100644
--- a/lib/pbr.h
+++ b/lib/pbr.h
@@ -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);