X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=options.h;h=392db13467ed30d548374df9e47da3e6bb2e1bbd;hp=e731eefff4d430cab63cfd7458f55ee51316307c;hb=62863ea95d3c2c7dd0b56ac0f1dee5a4590ca70c;hpb=c320b26725989af881bceb13bdefa767cae56e49 diff --git a/options.h b/options.h index e731eef..392db13 100644 --- a/options.h +++ b/options.h @@ -61,29 +61,27 @@ enum fw3_family FW3_FAMILY_V6 = 5, }; -enum fw3_target +enum fw3_flag { - FW3_TARGET_UNSPEC = 0, - FW3_TARGET_ACCEPT = 6, - FW3_TARGET_REJECT = 7, - FW3_TARGET_DROP = 8, - FW3_TARGET_NOTRACK = 9, - FW3_TARGET_DNAT = 10, - FW3_TARGET_SNAT = 11, - FW3_TARGET_CUSTOM_CNS_V4 = 12, - FW3_TARGET_CUSTOM_CNS_V6 = 13, + FW3_FLAG_UNSPEC = 0, + FW3_FLAG_ACCEPT = 6, + FW3_FLAG_REJECT = 7, + FW3_FLAG_DROP = 8, + FW3_FLAG_NOTRACK = 9, + FW3_FLAG_DNAT = 10, + FW3_FLAG_SNAT = 11, + FW3_FLAG_SRC_ACCEPT = 12, + FW3_FLAG_SRC_REJECT = 13, + FW3_FLAG_SRC_DROP = 14, + FW3_FLAG_CUSTOM_CHAINS = 15, + FW3_FLAG_SYN_FLOOD = 16, + FW3_FLAG_MTU_FIX = 17, + FW3_FLAG_DROP_INVALID = 18, + + __FW3_FLAG_MAX }; -enum fw3_default -{ - FW3_DEFAULT_UNSPEC = 0, - FW3_DEFAULT_CUSTOM_CHAINS = 14, - FW3_DEFAULT_SYN_FLOOD = 15, - FW3_DEFAULT_MTU_FIX = 16, - FW3_DEFAULT_DROP_INVALID = 17, -}; - -extern const char *fw3_flag_names[FW3_DEFAULT_DROP_INVALID + 1]; +extern const char *fw3_flag_names[__FW3_FLAG_MAX]; enum fw3_limit_unit @@ -133,6 +131,7 @@ struct fw3_device bool any; bool invert; char name[32]; + struct fw3_device *network; }; struct fw3_address @@ -219,9 +218,9 @@ struct fw3_time struct fw3_defaults { - enum fw3_target policy_input; - enum fw3_target policy_output; - enum fw3_target policy_forward; + enum fw3_flag policy_input; + enum fw3_flag policy_output; + enum fw3_flag policy_forward; bool drop_invalid; @@ -239,8 +238,7 @@ struct fw3_defaults bool disable_ipv6; - uint32_t flags; - uint32_t running_flags; + uint32_t flags[2]; }; struct fw3_zone @@ -253,14 +251,17 @@ struct fw3_zone enum fw3_family family; - enum fw3_target policy_input; - enum fw3_target policy_output; - enum fw3_target policy_forward; + enum fw3_flag policy_input; + enum fw3_flag policy_output; + enum fw3_flag policy_forward; struct list_head networks; struct list_head devices; struct list_head subnets; + struct list_head running_networks; + struct list_head running_devices; + const char *extra_src; const char *extra_dest; @@ -276,11 +277,7 @@ struct fw3_zone bool custom_chains; - uint32_t src_flags; - uint32_t dst_flags; - - uint32_t running_src_flags; - uint32_t running_dst_flags; + uint32_t flags[2]; }; struct fw3_rule @@ -315,7 +312,7 @@ struct fw3_rule struct fw3_limit limit; struct fw3_time time; - enum fw3_target target; + enum fw3_flag target; const char *extra; }; @@ -352,7 +349,7 @@ struct fw3_redirect struct fw3_time time; - enum fw3_target target; + enum fw3_flag target; const char *extra; @@ -398,7 +395,7 @@ struct fw3_ipset const char *external; - uint32_t flags; + uint32_t flags[2]; }; struct fw3_include