netfilter: xtables: consistent struct compat_xt_counters definition
[safe/jmp/linux-2.6] / include / linux / netfilter / x_tables.h
index 88261b9..8b6c0e7 100644 (file)
@@ -216,6 +216,7 @@ struct xt_mtchk_param {
 
 /* Match destructor parameters */
 struct xt_mtdtor_param {
+       struct net *net;
        const struct xt_match *match;
        void *matchinfo;
        u_int8_t family;
@@ -248,6 +249,7 @@ struct xt_target_param {
  * Other fields see above.
  */
 struct xt_tgchk_param {
+       struct net *net;
        const char *table;
        const void *entryinfo;
        const struct xt_target *target;
@@ -258,6 +260,7 @@ struct xt_tgchk_param {
 
 /* Target destructor parameters */
 struct xt_tgdtor_param {
+       struct net *net;
        const struct xt_target *target;
        void *targinfo;
        u_int8_t family;
@@ -282,11 +285,11 @@ struct xt_match {
 
        /* Called when entry of this type deleted. */
        void (*destroy)(const struct xt_mtdtor_param *);
-
+#ifdef CONFIG_COMPAT
        /* Called when userspace align differs from kernel space one */
        void (*compat_from_user)(void *dst, void *src);
        int (*compat_to_user)(void __user *dst, void *src);
-
+#endif
        /* Set this to THIS_MODULE if you are a module, otherwise NULL */
        struct module *me;
 
@@ -295,7 +298,9 @@ struct xt_match {
 
        const char *table;
        unsigned int matchsize;
+#ifdef CONFIG_COMPAT
        unsigned int compatsize;
+#endif
        unsigned int hooks;
        unsigned short proto;
 
@@ -322,17 +327,19 @@ struct xt_target {
 
        /* Called when entry of this type deleted. */
        void (*destroy)(const struct xt_tgdtor_param *);
-
+#ifdef CONFIG_COMPAT
        /* Called when userspace align differs from kernel space one */
        void (*compat_from_user)(void *dst, void *src);
        int (*compat_to_user)(void __user *dst, void *src);
-
+#endif
        /* Set this to THIS_MODULE if you are a module, otherwise NULL */
        struct module *me;
 
        const char *table;
        unsigned int targetsize;
+#ifdef CONFIG_COMPAT
        unsigned int compatsize;
+#endif
        unsigned int hooks;
        unsigned short proto;
 
@@ -555,11 +562,7 @@ struct compat_xt_entry_target {
  * current task alignment */
 
 struct compat_xt_counters {
-#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
-       u_int32_t cnt[4];
-#else
-       u_int64_t cnt[2];
-#endif
+       compat_u64 pcnt, bcnt;                  /* Packet and byte counters */
 };
 
 struct compat_xt_counters_info {