summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_pbr.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-03-07 15:46:00 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-04-16 14:40:43 +0200
commit425bdd6bf10123c2027ed602536490aeb5fb72a0 (patch)
treec4247c9a59e7a103f1b26d62763912e558a5e74d /zebra/zebra_pbr.h
parentlib: add ZEBRA IPSET defines (diff)
downloadfrr-425bdd6bf10123c2027ed602536490aeb5fb72a0.tar.xz
frr-425bdd6bf10123c2027ed602536490aeb5fb72a0.zip
zebra: handling notifications upon ipset creation/destruction done
Once ipset entries are injected in the kernel, the relevant daemon is informed with a zebra message sent back. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/zebra_pbr.h')
-rw-r--r--zebra/zebra_pbr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/zebra/zebra_pbr.h b/zebra/zebra_pbr.h
index 2060cc25e..c4af66b05 100644
--- a/zebra/zebra_pbr.h
+++ b/zebra/zebra_pbr.h
@@ -183,6 +183,16 @@ extern void kernel_pbr_rule_add_del_status(struct zebra_pbr_rule *rule,
enum southbound_results res);
/*
+ * Handle success or failure of ipset kinds (un)install in the kernel.
+ */
+extern void kernel_pbr_ipset_add_del_status(struct zebra_pbr_ipset *ipset,
+ enum southbound_results res);
+
+extern void kernel_pbr_ipset_entry_add_del_status(
+ struct zebra_pbr_ipset_entry *ipset,
+ enum southbound_results res);
+
+/*
* Handle rule delete notification from kernel.
*/
extern int kernel_pbr_rule_del(struct zebra_pbr_rule *rule);
@@ -193,6 +203,11 @@ extern void zebra_pbr_rules_free(void *arg);
extern uint32_t zebra_pbr_rules_hash_key(void *arg);
extern int zebra_pbr_rules_hash_equal(const void *arg1, const void *arg2);
+/* has operates on 32bit pointer
+ * and field is a string of 8bit
+ */
+#define ZEBRA_IPSET_NAME_HASH_SIZE (ZEBRA_IPSET_NAME_SIZE / 4)
+
extern void zebra_pbr_ipset_free(void *arg);
extern uint32_t zebra_pbr_ipset_hash_key(void *arg);
extern int zebra_pbr_ipset_hash_equal(const void *arg1, const void *arg2);