summaryrefslogtreecommitdiffstats
path: root/lib/pbr.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-06-13 11:12:08 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-06-28 08:52:15 +0200
commit2e1f721e65e0b81bf11cb14f7ecf5927cb6e1813 (patch)
treef9a1dc2292167d426474d863a6d1a2f92e7d0dfd /lib/pbr.h
parentzebra: handling of policy routing iptable tcpflags (diff)
downloadfrr-2e1f721e65e0b81bf11cb14f7ecf5927cb6e1813.tar.xz
frr-2e1f721e65e0b81bf11cb14f7ecf5927cb6e1813.zip
bgpd, lib: share flags values for iptable configuration
Those flags can be shared between BGP and Zebra. That is why those flags are moved to common pbr.h header file. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/pbr.h')
-rw-r--r--lib/pbr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/pbr.h b/lib/pbr.h
index 0f9dfdd09..5936851e4 100644
--- a/lib/pbr.h
+++ b/lib/pbr.h
@@ -103,6 +103,16 @@ struct pbr_rule {
| TCP_HEADER_RST | TCP_HEADER_PSH \
| TCP_HEADER_ACK | TCP_HEADER_URG)
+/* Pbr IPTable defines
+ * those are common flags shared between BGP and Zebra
+ */
+#define MATCH_IP_SRC_SET (1 << 0)
+#define MATCH_IP_DST_SET (1 << 1)
+#define MATCH_PORT_SRC_SET (1 << 2)
+#define MATCH_PORT_DST_SET (1 << 3)
+#define MATCH_PORT_SRC_RANGE_SET (1 << 4)
+#define MATCH_PORT_DST_RANGE_SET (1 << 5)
+
extern int zapi_pbr_rule_encode(uint8_t cmd, struct stream *s,
struct pbr_rule *zrule);