Rework zone flush logic
[project/firewall3.git] / options.h
index 7881375f41b589fc3646dab026a30280e8a17428..9422f81b52991846d01e4805836c2dab3450f1f4 100644 (file)
--- a/options.h
+++ b/options.h
@@ -70,16 +70,19 @@ enum fw3_target
        FW3_TARGET_NOTRACK       = 9,
        FW3_TARGET_DNAT          = 10,
        FW3_TARGET_SNAT          = 11,
-       FW3_TARGET_CUSTOM_CHAINS = 12, /* alias to FW3_DEFAULT_CUSTOM_CHAINS */
+       FW3_TARGET_SRC_ACCEPT    = 12,
+       FW3_TARGET_SRC_REJECT    = 13,
+       FW3_TARGET_SRC_DROP      = 14,
+       FW3_TARGET_CUSTOM_CHAINS = 15,
 };
 
 enum fw3_default
 {
        FW3_DEFAULT_UNSPEC        = 0,
-       FW3_DEFAULT_CUSTOM_CHAINS = 12,
-       FW3_DEFAULT_SYN_FLOOD     = 13,
-       FW3_DEFAULT_MTU_FIX       = 14,
-       FW3_DEFAULT_DROP_INVALID  = 15,
+       FW3_DEFAULT_CUSTOM_CHAINS = 16,
+       FW3_DEFAULT_SYN_FLOOD     = 17,
+       FW3_DEFAULT_MTU_FIX       = 18,
+       FW3_DEFAULT_DROP_INVALID  = 19,
 };
 
 extern const char *fw3_flag_names[FW3_DEFAULT_DROP_INVALID + 1];
@@ -170,7 +173,7 @@ struct fw3_protocol
 
        bool any;
        bool invert;
-       uint16_t protocol;
+       uint32_t protocol;
 };
 
 struct fw3_port
@@ -238,7 +241,7 @@ struct fw3_defaults
 
        bool disable_ipv6;
 
-       uint16_t flags;
+       uint32_t flags[2];
 };
 
 struct fw3_zone
@@ -274,8 +277,7 @@ struct fw3_zone
 
        bool custom_chains;
 
-       uint16_t src_flags;
-       uint16_t dst_flags;
+       uint32_t flags[2];
 };
 
 struct fw3_rule
@@ -393,7 +395,7 @@ struct fw3_ipset
 
        const char *external;
 
-       uint16_t flags;
+       uint32_t flags[2];
 };
 
 struct fw3_include
@@ -420,7 +422,6 @@ struct fw3_state
        struct list_head ipsets;
        struct list_head includes;
 
-       struct fw3_defaults running_defaults;
        struct list_head running_zones;
        struct list_head running_ipsets;