Merge git://git.infradead.org/mtd-2.6
[cascardo/linux.git] / include / linux / netfilter_ipv6 / ip6_tables.h
index 61aa104..4686f83 100644 (file)
@@ -123,6 +123,28 @@ struct ip6t_error
        struct ip6t_error_target target;
 };
 
+#define IP6T_ENTRY_INIT(__size)                                                       \
+{                                                                             \
+       .target_offset  = sizeof(struct ip6t_entry),                           \
+       .next_offset    = (__size),                                            \
+}
+
+#define IP6T_STANDARD_INIT(__verdict)                                         \
+{                                                                             \
+       .entry          = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)),       \
+       .target         = XT_TARGET_INIT(IP6T_STANDARD_TARGET,                 \
+                                        sizeof(struct ip6t_standard_target)), \
+       .target.verdict = -(__verdict) - 1,                                    \
+}
+
+#define IP6T_ERROR_INIT                                                               \
+{                                                                             \
+       .entry          = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)),          \
+       .target         = XT_TARGET_INIT(IP6T_ERROR_TARGET,                    \
+                                        sizeof(struct ip6t_error_target)),    \
+       .target.errorname = "ERROR",                                           \
+}
+
 /*
  * New IP firewall options for [gs]etsockopt at the RAW IP level.
  * Unlike BSD Linux inherits IP options so you don't have to use