]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netfilter/x_tables.h
[NETFILTER]: x_tables: add data member to struct xt_match
[linux-2.6-omap-h63xx.git] / include / linux / netfilter / x_tables.h
index f6bdef82a322a7faf54e217f975903873eef878a..03d1027fb0e88568a9598a3d9d976192c298760a 100644 (file)
@@ -174,12 +174,10 @@ struct xt_match
                          const void *ip,
                          const struct xt_match *match,
                          void *matchinfo,
-                         unsigned int matchinfosize,
                          unsigned int hook_mask);
 
        /* Called when entry of this type deleted. */
-       void (*destroy)(const struct xt_match *match, void *matchinfo,
-                       unsigned int matchinfosize);
+       void (*destroy)(const struct xt_match *match, void *matchinfo);
 
        /* Called when userspace align differs from kernel space one */
        int (*compat)(void *match, void **dstptr, int *size, int convert);
@@ -187,6 +185,9 @@ struct xt_match
        /* Set this to THIS_MODULE if you are a module, otherwise NULL */
        struct module *me;
 
+       /* Free to use by each match */
+       unsigned long data;
+
        char *table;
        unsigned int matchsize;
        unsigned int hooks;
@@ -211,8 +212,7 @@ struct xt_target
                               const struct net_device *out,
                               unsigned int hooknum,
                               const struct xt_target *target,
-                              const void *targinfo,
-                              void *userdata);
+                              const void *targinfo);
 
        /* Called when user tries to insert an entry of this type:
            hook_mask is a bitmask of hooks from which it can be
@@ -222,12 +222,10 @@ struct xt_target
                          const void *entry,
                          const struct xt_target *target,
                          void *targinfo,
-                         unsigned int targinfosize,
                          unsigned int hook_mask);
 
        /* Called when entry of this type deleted. */
-       void (*destroy)(const struct xt_target *target, void *targinfo,
-                       unsigned int targinfosize);
+       void (*destroy)(const struct xt_target *target, void *targinfo);
 
        /* Called when userspace align differs from kernel space one */
        int (*compat)(void *target, void **dstptr, int *size, int convert);
@@ -290,8 +288,13 @@ struct xt_table_info
 
 extern int xt_register_target(struct xt_target *target);
 extern void xt_unregister_target(struct xt_target *target);
+extern int xt_register_targets(struct xt_target *target, unsigned int n);
+extern void xt_unregister_targets(struct xt_target *target, unsigned int n);
+
 extern int xt_register_match(struct xt_match *target);
 extern void xt_unregister_match(struct xt_match *target);
+extern int xt_register_matches(struct xt_match *match, unsigned int n);
+extern void xt_unregister_matches(struct xt_match *match, unsigned int n);
 
 extern int xt_check_match(const struct xt_match *match, unsigned short family,
                          unsigned int size, const char *table, unsigned int hook,
@@ -337,6 +340,10 @@ struct compat_xt_entry_match
                        char name[XT_FUNCTION_MAXNAMELEN - 1];
                        u_int8_t revision;
                } user;
+               struct {
+                       u_int16_t match_size;
+                       compat_uptr_t match;
+               } kernel;
                u_int16_t match_size;
        } u;
        unsigned char data[0];
@@ -350,6 +357,10 @@ struct compat_xt_entry_target
                        char name[XT_FUNCTION_MAXNAMELEN - 1];
                        u_int8_t revision;
                } user;
+               struct {
+                       u_int16_t target_size;
+                       compat_uptr_t target;
+               } kernel;
                u_int16_t target_size;
        } u;
        unsigned char data[0];
@@ -361,7 +372,11 @@ struct compat_xt_entry_target
 
 struct compat_xt_counters
 {
+#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
        u_int32_t cnt[4];
+#else
+       u_int64_t cnt[2];
+#endif
 };
 
 struct compat_xt_counters_info