introduce support for ip ranges
[project/firewall3.git] / options.h
index c45a9d4..f62f0de 100644 (file)
--- a/options.h
+++ b/options.h
@@ -130,6 +130,7 @@ struct fw3_address
        struct list_head list;
 
        bool set;
+       bool range;
        bool invert;
        enum fw3_family family;
        int mask;
@@ -138,6 +139,11 @@ struct fw3_address
                struct in6_addr v6;
                struct ether_addr mac;
        } address;
+       union {
+               struct in_addr v4;
+               struct in6_addr v6;
+               struct ether_addr mac;
+       } address2;
 };
 
 struct fw3_mac
@@ -413,7 +419,7 @@ bool fw3_parse_protocol(void *ptr, const char *val);
 bool fw3_parse_ipset_method(void *ptr, const char *val);
 bool fw3_parse_ipset_datatype(void *ptr, const char *val);
 
-void fw3_parse_options(void *s, struct fw3_option *opts, int n,
+void fw3_parse_options(void *s, const struct fw3_option *opts,
                        struct uci_section *section);
 
 void fw3_format_in_out(struct fw3_device *in, struct fw3_device *out);