Make nat reflection src address configurable by introducing a reflection_src paramete...
[project/firewall3.git] / utils.h
diff --git a/utils.h b/utils.h
index 77d0d73..eee1f40 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <limits.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/file.h>
@@ -34,6 +35,7 @@
 
 #define FW3_STATEFILE  "/var/run/fw3.state"
 #define FW3_LOCKFILE   "/var/run/fw3.lock"
+#define FW3_HOTPLUG     "/sbin/hotplug-call"
 
 extern bool fw3_pr_debug;
 
@@ -86,7 +88,8 @@ enum fw3_statefile_type
 {
        FW3_TYPE_DEFAULTS = 0,
        FW3_TYPE_ZONE     = 1,
-       FW3_TYPE_IPSET    = 2,
+       FW3_TYPE_NETWORK  = 2,
+       FW3_TYPE_IPSET    = 3,
 };
 
 bool fw3_read_statefile(void *state);
@@ -96,4 +99,17 @@ void fw3_set_running(void *object, struct list_head *dest);
 
 void fw3_free_object(void *obj, const void *opts);
 
+
+struct fw3_rule_spec {
+       int family;
+       int table;
+       int flag;
+       const char *format;
+};
+
+bool fw3_pr_rulespec(int table, int family, uint32_t *flags, uint32_t mask,
+                     const struct fw3_rule_spec *r, const char *fmt, ...);
+
+bool fw3_hotplug(bool add, void *zone, void *device);
+
 #endif