]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netfilter/x_tables.h
[NETFILTER]: x_tables: switch xt_target->checkentry to bool
[linux-2.6-omap-h63xx.git] / include / linux / netfilter / x_tables.h
index 022edfa97ed977dfe6fd8f74b28472804067d5a8..64f425a855bb7c191467c2e537a3fc4ce4b6af51 100644 (file)
@@ -54,6 +54,14 @@ struct xt_entry_target
        unsigned char data[0];
 };
 
+#define XT_TARGET_INIT(__name, __size)                                        \
+{                                                                             \
+       .target.u.user = {                                                     \
+               .target_size    = XT_ALIGN(__size),                            \
+               .name           = __name,                                      \
+       },                                                                     \
+}
+
 struct xt_standard_target
 {
        struct xt_entry_target target;
@@ -133,22 +141,22 @@ struct xt_match
        /* Arguments changed since 2.6.9, as this must now handle
           non-linear skb, using skb_header_pointer and
           skb_ip_make_writable. */
-       int (*match)(const struct sk_buff *skb,
-                    const struct net_device *in,
-                    const struct net_device *out,
-                    const struct xt_match *match,
-                    const void *matchinfo,
-                    int offset,
-                    unsigned int protoff,
-                    int *hotdrop);
+       bool (*match)(const struct sk_buff *skb,
+                     const struct net_device *in,
+                     const struct net_device *out,
+                     const struct xt_match *match,
+                     const void *matchinfo,
+                     int offset,
+                     unsigned int protoff,
+                     bool *hotdrop);
 
        /* Called when user tries to insert an entry of this type. */
        /* Should return true or false. */
-       int (*checkentry)(const char *tablename,
-                         const void *ip,
-                         const struct xt_match *match,
-                         void *matchinfo,
-                         unsigned int hook_mask);
+       bool (*checkentry)(const char *tablename,
+                          const void *ip,
+                          const struct xt_match *match,
+                          void *matchinfo,
+                          unsigned int hook_mask);
 
        /* Called when entry of this type deleted. */
        void (*destroy)(const struct xt_match *match, void *matchinfo);
@@ -194,11 +202,11 @@ struct xt_target
            hook_mask is a bitmask of hooks from which it can be
            called. */
        /* Should return true or false. */
-       int (*checkentry)(const char *tablename,
-                         const void *entry,
-                         const struct xt_target *target,
-                         void *targinfo,
-                         unsigned int hook_mask);
+       bool (*checkentry)(const char *tablename,
+                          const void *entry,
+                          const struct xt_target *target,
+                          void *targinfo,
+                          unsigned int hook_mask);
 
        /* Called when entry of this type deleted. */
        void (*destroy)(const struct xt_target *target, void *targinfo);