summaryrefslogtreecommitdiff
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-03-12 09:23:48 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-04-16 14:40:43 +0200
commit7abd6c4fa0331bc6a416c69080218457f9efc90f (patch)
treed6e0fdfceebd71c106b608fc66d9b24df40c3228 /lib/zclient.h
parent1907e4b80b03dbaea9cb13eb4b52b33d1b9d30d3 (diff)
zebra: add IPTABLE_ADD and IPTABLE_DEL commands in zapi
Those messages permit a remote daemon to configure an iptable entry. A structure is defined that maps to an iptable entry. More specifically, this structure proposes to associate fwmark, and a table ID. Adding to the configuration, the initialisation of iptables hash list is done into zebra netnamespace. Also a hook for notifying the sender that the iptables has been correctly set is done. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index b8896f6b99..2cdcefd5eb 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -52,6 +52,12 @@
*/
#define ZEBRA_IPSET_NAME_SIZE 32
+/* IPTable action is defined by two values: either
+ * forward or drop
+ */
+#define ZEBRA_IPTABLES_FORWARD 0
+#define ZEBRA_IPTABLES_DROP 1
+
extern struct sockaddr_storage zclient_addr;
extern socklen_t zclient_addr_len;
@@ -146,6 +152,9 @@ typedef enum {
ZEBRA_IPSET_ENTRY_DELETE,
ZEBRA_IPSET_NOTIFY_OWNER,
ZEBRA_IPSET_ENTRY_NOTIFY_OWNER,
+ ZEBRA_IPTABLE_ADD,
+ ZEBRA_IPTABLE_DELETE,
+ ZEBRA_IPTABLE_NOTIFY_OWNER,
} zebra_message_types_t;
struct redist_proto {
@@ -409,6 +418,12 @@ enum zapi_ipset_entry_notify_owner {
ZAPI_IPSET_ENTRY_REMOVED,
};
+enum zapi_iptable_notify_owner {
+ ZAPI_IPTABLE_FAIL_INSTALL,
+ ZAPI_IPTABLE_INSTALLED,
+ ZAPI_IPTABLE_REMOVED,
+};
+
/* Zebra MAC types */
#define ZEBRA_MACIP_TYPE_STICKY 0x01 /* Sticky MAC*/
#define ZEBRA_MACIP_TYPE_GW 0x02 /* gateway (SVI) mac*/